-
-
Notifications
You must be signed in to change notification settings - Fork 448
Support volume type for quick access link #3782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
🥷 Code experts: jjw24 Jack251970 has most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds support for volume type in quick access links by introducing a new index search check and integrating volume display results.
- Added a new static method UseIndexSearch in SearchManager.cs for determining if Windows index search should be used.
- Updated ResultManager.cs with overloaded methods for drive space display result to incorporate score changes.
- Modified QuickAccess.cs to support volume type along with updating a constant's naming, and changed Settings to static in Main.cs.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs | Introduced UseIndexSearch to handle Windows index search for volume type paths. |
Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs | Added overloads and score parameter adjustments for drive space display result creation. |
Plugins/Flow.Launcher.Plugin.Explorer/Search/QuickAccessLinks/QuickAccess.cs | Integrated volume type support in the quick access link switching and updated constant naming. |
Plugins/Flow.Launcher.Plugin.Explorer/Main.cs | Updated Settings to be a static property. |
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. Forbidden patterns 🙅 (1)In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves. These forbidden patterns matched content: Reject duplicate words
If the flagged items are 🤯 false positivesIf items relate to a ...
|
📝 WalkthroughWalkthroughThe changes introduce a static method for determining index search usage, refactor result creation logic to allow flexible scoring for drive space results, and update result generation in quick access links to handle drive volumes. Additionally, the settings field in the main class is made static, affecting its scope and lifecycle. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant QuickAccess
participant ResultManager
participant SearchManager
User->>QuickAccess: Request Quick Access Links
QuickAccess->>SearchManager: UseIndexSearch(path)
SearchManager-->>QuickAccess: Returns true/false
QuickAccess->>ResultManager: CreateDriveSpaceDisplayResult(path, actionKeyword, score)
ResultManager-->>QuickAccess: Returns Result
QuickAccess-->>User: Returns Results List
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs (1)
249-260
: Consider optimizing redundant path processing.The logic correctly determines index search applicability, and making it static aligns well with the centralized settings approach. However, there's redundant path processing that should be addressed.
Apply this optimization to eliminate redundant processing:
public static bool UseIndexSearch(string path) { if (Main.Settings.IndexSearchEngine is not Settings.IndexSearchEngineOption.WindowsIndex) return false; // Check if the path is using windows index search var pathToDirectory = FilesFolders.ReturnPreviousDirectoryIfIncompleteString(path); return !Main.Settings.IndexSearchExcludedSubdirectoryPaths.Any( - x => FilesFolders.ReturnPreviousDirectoryIfIncompleteString(pathToDirectory).StartsWith(x.Path, StringComparison.OrdinalIgnoreCase)) + x => pathToDirectory.StartsWith(x.Path, StringComparison.OrdinalIgnoreCase)) && WindowsIndex.WindowsIndex.PathIsIndexed(pathToDirectory); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
Plugins/Flow.Launcher.Plugin.Explorer/Main.cs
(1 hunks)Plugins/Flow.Launcher.Plugin.Explorer/Search/QuickAccessLinks/QuickAccess.cs
(3 hunks)Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs
(2 hunks)Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs
(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
Plugins/Flow.Launcher.Plugin.Explorer/Main.cs (3)
Learnt from: taooceros
PR: Flow-Launcher/Flow.Launcher#2616
File: Flow.Launcher/Flow.Launcher.csproj:7-7
Timestamp: 2024-10-08T15:52:58.573Z
Learning: In the Flow Launcher project, the version number in the `Flow.Launcher.csproj` file is dynamically updated during the CI/CD process.
Learnt from: Jack251970
PR: Flow-Launcher/Flow.Launcher#3672
File: Flow.Launcher/MainWindow.xaml.cs:318-318
Timestamp: 2025-06-08T14:12:12.842Z
Learning: In Flow.Launcher, the App.NotifyIcon static property is initialized in the App class before MainWindow creation, so null checks are not needed when accessing App.NotifyIcon in MainWindow lifecycle methods.
Learnt from: jjw24
PR: Flow-Launcher/Flow.Launcher#2448
File: Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs:16-20
Timestamp: 2025-01-18T10:10:18.414Z
Learning: In Flow Launcher's plugin system, the PluginInitContext parameter passed to plugin constructors is guaranteed to be non-null by the plugin initialization system, making null checks unnecessary.
Plugins/Flow.Launcher.Plugin.Explorer/Search/QuickAccessLinks/QuickAccess.cs (1)
Learnt from: Koisu-unavailable
PR: Flow-Launcher/Flow.Launcher#3770
File: Flow.Launcher/ViewModel/MainViewModel.cs:0-0
Timestamp: 2025-06-24T19:06:48.344Z
Learning: In Flow.Launcher's Explorer plugin results, the SubTitle property always contains the directory containing the file. For file results, Title contains the filename and SubTitle contains the parent directory. For directory results, SubTitle contains the directory path itself.
Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs (1)
Learnt from: Yusyuriv
PR: Flow-Launcher/Flow.Launcher#3057
File: Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs:0-0
Timestamp: 2024-11-03T07:40:11.014Z
Learning: In Flow Launcher, when using Windows Forms dialogs (e.g., in `JsonRPCPluginSettings.cs`), path validation is enabled by default in `OpenFileDialog` and `FolderBrowserDialog`, preventing users from selecting invalid paths, but it's possible to opt out of this validation on individual dialogs.
Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs (1)
Learnt from: Koisu-unavailable
PR: Flow-Launcher/Flow.Launcher#3770
File: Flow.Launcher/ViewModel/MainViewModel.cs:0-0
Timestamp: 2025-06-24T19:06:48.344Z
Learning: In Flow.Launcher's Explorer plugin results, the SubTitle property always contains the directory containing the file. For file results, Title contains the filename and SubTitle contains the parent directory. For directory results, SubTitle contains the directory path itself.
🪛 GitHub Check: Check Spelling
Plugins/Flow.Launcher.Plugin.Explorer/Main.cs
[failure] 20-20:
Settings Settings
matches a line_forbidden.patterns entry: \s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s
. (forbidden-pattern)
🪛 GitHub Actions: Check Spelling
Plugins/Flow.Launcher.Plugin.Explorer/Main.cs
[error] 20-20: Spell check error: Settings Settings
matches a forbidden pattern: \s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s
. (forbidden-pattern)
Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs
[warning] 140-140: Spell check warning: opendir
is not a recognized word. (unrecognized-spelling)
[warning] 155-155: Spell check warning: opendir
is not a recognized word. (unrecognized-spelling)
[warning] 190-190: Spell check warning: drv
is not a recognized word. (unrecognized-spelling)
[warning] 191-191: Spell check warning: drv
is not a recognized word. (unrecognized-spelling)
[warning] 192-192: Spell check warning: totalspace
is not a recognized word. (unrecognized-spelling)
[warning] 193-193: Spell check warning: drv
is not a recognized word. (unrecognized-spelling)
[warning] 193-193: Spell check warning: drv
is not a recognized word. (unrecognized-spelling)
[warning] 201-201: Spell check warning: totalspace
is not a recognized word. (unrecognized-spelling)
[warning] 265-265: Spell check warning: openresultfolder
is not a recognized word. (unrecognized-spelling)
[warning] 402-402: Spell check warning: totalspace
is not a recognized word. (unrecognized-spelling)
[warning] 405-405: Spell check warning: totalspace
is not a recognized word. (unrecognized-spelling)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (6)
Plugins/Flow.Launcher.Plugin.Explorer/Search/QuickAccessLinks/QuickAccess.cs (3)
9-9
: LGTM!The constant is properly renamed to follow PascalCase naming conventions for private constants in C#.
22-24
: LGTM!The addition of
ResultType.Volume
case with appropriate scoring is well-implemented. The ordering (Volume, Folder, File) is logical and consistent.
36-38
: LGTM!Consistent implementation of volume type support in the
AccessLinkListAll
method, maintaining the same ordering and scoring approach asAccessLinkListMatched
.Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs (3)
174-177
: LGTM!Good addition of an overload that accepts explicit scoring while leveraging the static
UseIndexSearch
method for determining Windows Index usage.
179-182
: LGTM!Well-designed refactoring that maintains backward compatibility by providing a default score of 500 while delegating to the centralized private method.
184-210
: LGTM!The refactoring properly consolidates the drive space display result creation logic into a private method that accepts flexible parameters. Using the passed
score
parameter instead of a hardcoded value (line 210) correctly implements the intended flexibility.
Add support for volume type in quick access link.