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:
co-authored by
Claude Opus 5
parent
ab798d80b2
commit
0c6b07e2c4
@@ -110,9 +110,8 @@ assertDeepEqual(
|
||||
const defaultItems = menu.parseMenuJsonc(defaultMenuJsonc)
|
||||
const defaultById = Object.fromEntries(defaultItems.map(item => [item.id, item]))
|
||||
|
||||
// App rows land after every static item, so ranking has to survive the real
|
||||
// menu's item count: with hundreds of entries ahead of them, the order
|
||||
// tiebreak alone buries an installed app under Install and Remove.
|
||||
// Needs the real menu: app rows sort after all menu items, and only at that
|
||||
// item count does the order tiebreak alone bury an installed app.
|
||||
const rankBase = menu.mergeMenuSources(defaultItems, [])
|
||||
const ranked = menu.mergeAppRows(rankBase.items, rankBase.itemOrder, [
|
||||
{ id: 'apps.brave', parent: 'apps', kind: 'app', label: 'Brave', description: '', aliases: [] },
|
||||
|
||||
Reference in New Issue
Block a user