Route menu ids ahead of app keyword aliases (#6563)

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>
This commit is contained in:
David Heinemeier HanssonandClaude Fable 5 authored and GitHub committed 2026-08-05 22:50:41 +02:00
1 parent 4c4e17077f
commit 0269fe0031
3 files changed
+42 -11

No files matched your search

+1 -11
View File
@@ -841,17 +841,7 @@ Item {
// in JSONC (`power`, `reminder-set`). Unknown strings fall through to the
// id-as-route behavior so misspellings still attempt to open the literal id.
function resolveRoute(input) {
var raw = String(input || "").toLowerCase().replace(/_/g, "-")
if (!raw || raw === "go" || raw === "menu") return "root"
for (var i = 0; i < root.itemOrder.length; i++) {
var entry = root.items[root.itemOrder[i]]
if (!entry || !entry.aliases) continue
for (var j = 0; j < entry.aliases.length; j++) {
var alias = String(entry.aliases[j] || "").toLowerCase().replace(/_/g, "-")
if (alias === raw) return entry.id
}
}
return raw
return MenuModel.resolveRoute(root.items, root.itemOrder, input)
}
function openRoute(initialMenu) {