Skip to content

Code Quality: Remove reflection-based Path lookup from SidebarItem#18452

Closed
0x5bfa wants to merge 4 commits into
files-community:mainfrom
0x5bfa:5bfa/CQ-Reflection1
Closed

Code Quality: Remove reflection-based Path lookup from SidebarItem#18452
0x5bfa wants to merge 4 commits into
files-community:mainfrom
0x5bfa:5bfa/CQ-Reflection1

Conversation

@0x5bfa

@0x5bfa 0x5bfa commented May 3, 2026

Copy link
Copy Markdown
Member

Resolved / Related Issues

Steps used to test these changes

  • Just build

Copilot AI review requested due to automatic review settings May 3, 2026 16:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes reflection-based access to a sidebar item’s filesystem path and replaces it with a strongly-typed Path member on ISidebarItemModel, improving performance and type safety for drag-related logic.

Changes:

  • Replaced reflection-based "Path" property lookup with ISidebarItemModel.Path in SidebarItem.
  • Added a Path member to ISidebarItemModel (defaulting to null) to support the new strongly-typed access pattern.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Files.App.Controls/Sidebar/SidebarItem.cs Uses Item.Path directly for CanDrag and drag-start path validation (removes reflection).
src/Files.App.Controls/Sidebar/ISidebarItemModel.cs Introduces Path on the model interface to support non-reflection access.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Files.App.Controls/Sidebar/ISidebarItemModel.cs Outdated
@0x5bfa

0x5bfa commented May 4, 2026

Copy link
Copy Markdown
Member Author

Ready

@yair100
yair100 requested a review from marcelwgn May 17, 2026 15:10
@yair100 yair100 added the ready to merge Pull requests that are approved and ready to merge label May 31, 2026
@yair100

yair100 commented May 31, 2026

Copy link
Copy Markdown
Member

I missed that this was approved, thank you @marcelwgn and @0x5bfa.

@0x5bfa 0x5bfa closed this May 31, 2026
@0x5bfa 0x5bfa reopened this May 31, 2026
@0x5bfa

0x5bfa commented May 31, 2026

Copy link
Copy Markdown
Member Author

bruh sorry, i clicked a wrong button. :/

@yair100

yair100 commented May 31, 2026

Copy link
Copy Markdown
Member

Can you please rebase from main?

0x5bfa and others added 4 commits June 1, 2026 00:40
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: 0x5BFA <62196528+0x5bfa@users.noreply.github.com>
@0x5bfa
0x5bfa force-pushed the 5bfa/CQ-Reflection1 branch from bf9bd20 to b69a735 Compare May 31, 2026 15:48
@0x5bfa

0x5bfa commented May 31, 2026

Copy link
Copy Markdown
Member Author

Looks like this PR no longer needed as someone already did this in some commit lol.

@0x5bfa 0x5bfa closed this May 31, 2026
@0x5bfa
0x5bfa deleted the 5bfa/CQ-Reflection1 branch May 31, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Pull requests that are approved and ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants