Trim ranking comments

Say it once and match mergeAppRows: app rows sort after all menu items,
not interleaved among them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Scott Jones
2026-07-26 14:34:43 -04:00
co-authored by Claude Opus 5
parent ab798d80b2
commit 0c6b07e2c4
2 changed files with 4 additions and 8 deletions
+2 -5
View File
@@ -309,11 +309,8 @@ function searchScore(items, entry, query) {
else if (descriptionTextMatches(needle, descriptionText)) score = 60
if (entry.kind === "menu" || entry.kind === "link") score -= 2
// mergeAppRows appends app rows after every menu item, so an app always
// loses the order tiebreak below to a menu entry that matches just as well.
// Searching an installed app's name should launch it, not offer to install
// or remove it. The bias stays under the 10-point gap between match tiers,
// so a menu entry that matches better still sorts first.
// App rows sort after all menu items, so they lose the tiebreak below to an
// equal match. Outrank those, but stay inside the tier so better ones win.
if (entry.kind === "app") score -= 5
return score * 1000 + depthFor(items, entry.id) * 25 + entry.order