FIX: Selecting a History result does not bump the result until Home Page result list is refreshed again - #4638
FIX: Selecting a History result does not bump the result until Home Page result list is refreshed again#463801Dri wants to merge 2 commits into
Conversation
|
ISSUE: #4379 (comment) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthrough
ChangesLast-query restoration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change refreshes launcher results when restoring empty or previously selected queries by reusing the existing search path. No actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="Flow.Launcher/ViewModel/MainViewModel.cs">
<violation number="1" location="Flow.Launcher/ViewModel/MainViewModel.cs:2388">
P2: In LastQueryMode.Empty (the default), this forces a fresh query on every Hide whenever the query text is already empty, since ChangeQueryTextAsync hits its isReQuery branch for an unchanged empty string. That means every dismissal of the launcher — including dismissals that never result in a reopen, dismissals right after executing a result (line 610), and plugin reloads (line 334) — now runs a full background search. Consider scoping the re-query (e.g., only when reopening on Show, or only when a stale-result condition holds) instead of unconditionally re-querying on every close.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| { | ||
| case LastQueryMode.Empty: | ||
| await ChangeQueryTextAsync(string.Empty); | ||
| await ChangeQueryTextAsync(string.Empty, isReQuery: true); |
There was a problem hiding this comment.
P2: In LastQueryMode.Empty (the default), this forces a fresh query on every Hide whenever the query text is already empty, since ChangeQueryTextAsync hits its isReQuery branch for an unchanged empty string. That means every dismissal of the launcher — including dismissals that never result in a reopen, dismissals right after executing a result (line 610), and plugin reloads (line 334) — now runs a full background search. Consider scoping the re-query (e.g., only when reopening on Show, or only when a stale-result condition holds) instead of unconditionally re-querying on every close.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Flow.Launcher/ViewModel/MainViewModel.cs, line 2388:
<comment>In LastQueryMode.Empty (the default), this forces a fresh query on every Hide whenever the query text is already empty, since ChangeQueryTextAsync hits its isReQuery branch for an unchanged empty string. That means every dismissal of the launcher — including dismissals that never result in a reopen, dismissals right after executing a result (line 610), and plugin reloads (line 334) — now runs a full background search. Consider scoping the re-query (e.g., only when reopening on Show, or only when a stale-result condition holds) instead of unconditionally re-querying on every close.</comment>
<file context>
@@ -2385,19 +2385,23 @@ public async void Hide(bool reset = true)
{
case LastQueryMode.Empty:
- await ChangeQueryTextAsync(string.Empty);
+ await ChangeQueryTextAsync(string.Empty, isReQuery: true);
break;
case LastQueryMode.Preserved:
</file context>
Summary by cubic
Summary of changes
Fixes search results not refreshing when the query is empty after hiding and reopening the launcher.
ChangeQueryTextAsyncinLastQueryMode.Emptynow passesisReQuery: trueso opening the launcher triggers a fresh search.LastQueryMode.PreservedandSelectedthat passesisReQuery: true.LastQueryMode.ActionKeywordPreservedandActionKeywordSelectednow passisReQuery: truewhen the action keyword query is rebuilt.Release Note
Fixes search results not updating when the query is empty after closing and reopening the launcher.
Written for commit fba17f1. Summary will update on new commits.