Route menu ids ahead of app keyword aliases - #6563
Merged
Merged
Conversation
An installed app whose .desktop Keywords contain a menu id captured the route: htop ships Keywords=system;..., so SUPER+ESCAPE opened an empty "Htop" menu instead of the System menu once the Apps menu had merged its rows. Exact ids now win, and app rows are no longer routable at all — their keywords remain search-only. Fixes #6554 Reported-by: Craig Derington (https://github.com/craigderington) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes menu route collisions by prioritizing literal menu IDs and excluding application keywords from alias routing.
Changes:
- Moves route resolution into the testable menu model.
- Preserves application keyword search while preventing route capture.
- Adds regression coverage for routing precedence and normalization.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
shell/plugins/menu/MenuModel.js |
Implements ID-first, app-safe route resolution. |
shell/plugins/menu/Menu.qml |
Delegates route resolution to the shared model. |
test/shell.d/menu-test.sh |
Adds routing and search regression tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6554. Thanks to @craigderington for the excellent report and root-cause analysis.
Bug
SUPER + ESCAPE(omarchy-menu toggle system) opened an empty "Htop" menu instead of the System menu when htop is installed.resolveRoute()scanned every item's aliases before considering the input as a literal id, and app rows inherit their.desktopKeywordsas aliases — htop shipsKeywords=system;..., so the app row captured thesystemroute. App rows have no children and no action, so the fallthrough rendered an empty "Nothing here yet" menu.Two details beyond the report, from reproducing it live:
Keywords=system;process;task, becauselauncher.hideskeeps btop out of the app library. It takes htop (or any other non-hidden app with a colliding keyword) to trigger it.Fix
resolveRoutemoved intoMenuModel.js(where it's unit-testable) with two changes:nameSearchText, not route resolution — and any third-party.desktopfile could otherwise shadow a current or future menu route. Routing to an app row was never meaningful: it always produced the empty-menu fallthrough.Declared JSONC aliases (
power-menu,settings, …) keep working as before.Verified
test/shell.d/menu-test.shcovers id-over-keyword precedence, app rows being unroutable, alias routing, underscore normalization, root/literal fallthroughs, and keyword search still matching../test/shellrun: 940 passing; the one failure (model-usage-default-migration-test.sh) pre-exists on cleanquattro.Keywords=system;: before the fixsummon systemopened the empty app menu after the Apps menu had been opened once; after the fix it opens the System menu,summon power-menustill routes to it, and typing "system" in the menu still surfaces the app as the top search hit.🤖 Generated with Claude Code
https://claude.ai/code/session_01636Ddgizwt8kEWStGY4szj