Skip to content

Fix home page result context menus - #4600

Merged
DavidGBrett merged 2 commits into
devfrom
fix-home-page-result-context-menus
Aug 3, 2026
Merged

Fix home page result context menus#4600
DavidGBrett merged 2 commits into
devfrom
fix-home-page-result-context-menus

Conversation

@DavidGBrett

@DavidGBrett DavidGBrett commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Fixes two bugs related to home page results and context menus.

Fix 1 Arrow Input Broken

Fixes #4599 where the right arrow input to open the context menu wasn't working.

Fix 2 Stale Context Menus

Also fixes another bug where the context menu itself was stale and not rebuilt when a new result had its context menu opened.
This was becasue of the ignored query text flag incorrectly applying because each context menu used the same empty string query.
Fixed that by making that check only apply to search queries.

(the problem for fix 2 wasn't obvious before because the plugin indicator plugin for example had nothing to show in its context menu anyways)


Summary by cubic

Fixes two home page context menu bugs: the Right arrow now opens menus on results without a search query, and menus rebuild so they no longer show stale options.

  • Summary of changes

    • Changed: Right arrow key handling no longer requires a non-empty query to open the context menu.
    • Changed: _ignoredQueryText now applies only when search results are selected, preventing stale context menus/history.
    • Added: Always rebuild context menu/history when their view is active; skip only redundant searches on programmatic query restores.
    • Removed: The empty-query check blocking Right arrow; global use of _ignoredQueryText outside search views.
    • Memory impact: None expected.
    • Security risks: None.
    • Unit tests: No new unit tests; verified via manual testing.
  • Release Note

    • Context menus on the home page now open with the right arrow and show up-to-date options.

Written for commit 3c5eaaf. Summary will update on new commits.

Review in cubic

…sults

These show up when there is no query but we were ignoring the arrow key if there was no query

Removed that filter to fix this
The ignored query text flag is meant to skip a redundant search when the query text is restored programmatically,
such as returning from the context menu.

But it also stopped the context menu and history from rebuilding, so on the home page they kept showing stale results.

We now apply the flag only when running a search, so the context menu and history are always rebuilt fresh.
@github-actions github-actions Bot added this to the 2.2.0 milestone Aug 2, 2026
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Right Arrow handler now opens the result context menu for selected results with an empty query. _ignoredQueryText filtering now applies only during query-results mode, preventing it from suppressing context-menu and history queries.

Changes

Query context-menu flow

Layer / File(s) Summary
Query state and ignored text handling
Flow.Launcher/ViewModel/MainViewModel.cs
SelectedResults clears QueryText when leaving query results. _ignoredQueryText matching now runs only for query-results queries.
Empty-query context-menu shortcut
Flow.Launcher/MainWindow.xaml.cs
The Right Arrow handler no longer requires non-empty query text before opening the result context menu.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: jack251970, jjw24

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The stale context-menu fix is not covered by linked issue #4599, which focuses only on right-arrow navigation. Link an issue that covers stale context-menu rebuilding, or split that fix into a separate pull request.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy issue #4599 by enabling the right-arrow key to open home result context menus.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly summarizes the two fixes for home page result context menus.
Description check ✅ Passed The description directly explains both context-menu bugs and the implemented fixes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-home-page-result-context-menus

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 2 files

Re-trigger cubic

@DavidGBrett
DavidGBrett requested review from Jack251970 and jjw24 August 2, 2026 11:37
@DavidGBrett DavidGBrett added the bug Something isn't working label Aug 2, 2026

@Jack251970 Jack251970 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thanks for your contribution!

@DavidGBrett
DavidGBrett merged commit 9bd42d5 into dev Aug 3, 2026
6 checks passed
@DavidGBrett
DavidGBrett deleted the fix-home-page-result-context-menus branch August 3, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Home results don't open context menu with right arrow key

2 participants