Fix Explorer plugin Quick Access items missing from general search results#4294
Fix Explorer plugin Quick Access items missing from general search results#4294Jack251970 wants to merge 3 commits intodevfrom
Conversation
Remove the incorrect `QuickAccessKeywordEnabled` check from `GetQuickAccessResultsFilteredByActionKeyword`. Quick Access items should always be merged into regular search results when they match the query, regardless of whether the dedicated Quick Access action keyword is enabled. The `QuickAccessKeywordEnabled` flag should only control whether the dedicated action keyword (e.g. `q foo`) activates Quick Access-only searches. Fixes: Quick Access items missing in Explorer plugin (2.1.0 regression) Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
|
🥷 Code experts: jjw24 jjw24 has most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame: ✨ Comment |
|
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
📝 WalkthroughWalkthroughRemoved an early return guard in the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Fixes Explorer plugin behavior where Quick Access items were missing from general (non–Quick Access keyword) search results, addressing the regression reported in #4287 after the action-keyword filtering refactor in #4093.
Changes:
- Always include Quick Access matches in the merged result set for non-path searches (instead of gating on
QuickAccessKeywordEnabled). - Keep action-keyword-based result-type filtering applied to merged Quick Access results.
Comments suppressed due to low confidence (1)
Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs:309
- This change alters behavior so Quick Access links are merged into general search results even when the Quick Access action keyword is disabled. Please add/adjust a unit test to lock in the intended behavior (e.g., SearchAsync with SearchActionKeyword enabled, QuickAccessKeywordEnabled=false, and a QuickAccess link that matches the query should still be returned).
private List<Result> GetQuickAccessResultsFilteredByActionKeyword(Query query, List<ActionKeyword> actions)
{
var results = QuickAccess.AccessLinkListMatched(query, Settings.QuickAccessLinks);
if (results.Count == 0)
return [];
return results
.Where(r => r.ContextData is SearchResult result
&& !IsResultTypeFilteredByActionKeyword(result.Type, actions))
.ToList();
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Follow on with #4093
Resolve #4287
Summary by cubic
Fixes a 2.1.0 regression where Quick Access items were missing from Explorer plugin general search. Matching Quick Access links are now always merged into results, regardless of the action keyword. Closes #4287.
Written for commit ae73b48. Summary will update on new commits.