Files
tty7/src
l0ng-ai d6c3ddddf3 docs(palette): note which titles can reach the exact-match bonus
`fuzzy_score` adds 120 when the folded haystack equals the needle. Only a
single-word title can: the needle drops whitespace so `newtab` and
`new tab` both match, while the haystack keeps it, so `Settings` can equal
its query and `New Tab` never can.

Nothing is wrong with the ranking -- typing any of twenty overlapping
titles in full ranks that title first, `New Tab` over `New Worktree Tab`
and `Rename Tab` over `Reopen Closed Tab`. The word-start and run bonuses
carry it without the 120. But that is not visible from the branch, and
somebody tuning either bonus deserves to know what is holding the case up.

I wrote a test for the whole-list outcome first and threw it away: it
survived weakening the word-start bonus from 12 to 1, deleting the length
penalty, the run bonus, the prefix bonus and the exact bonus. Typing a
complete title matches from position 0 with nothing skipped, which
dominates under any scoring this file is likely to have, so the test
asserted something no plausible change breaks. The pairwise tests beside
it -- initials over scattered letters, exact over mid-string -- are the
ones with teeth.
2026-08-16 13:47:47 +08:00
..