cyberine
UsageRun recipes

The fuzzy picker highlights what it matched (kenqx)

Typing in any fuzzy picker now paints the characters that matched, the way fzf, helix and telescope do. The scorer already knew them — it tracks the position of every hit to compute its contiguous-run bonus — and was returning only the number, so the render drew plain text.

Ranking is unchanged. Adding an output and retuning the score in one change would make a ranking regression indistinguishable from a rendering one, so npm run selftest:tui-fuzzy-highlight compares the current scorer against the pre-change formula across every label/query pair it tests and asserts the numbers are identical.

Two details that are easy to get wrong and are asserted: truncation happens AFTER matching, so an index past the truncated label is DROPPED rather than shifted (shifting would highlight the wrong character, which is worse than no highlight); and on the selected row the highlight sits on top of the selection band, where the raw accent measures only 1.83:1 in the light variant — so the selected row uses the band's own measured foreground and carries the emphasis by weight instead.

Known Limitations and Deferred Work. Three copies of the fuzzy scorer exist in the tree (FuzzyPicker.tsx, hooks/useAtMention.ts, folderCandidates.ts). Only the picker's returns indices, so the @-mention popup and the folder picker still render plain labels. Unifying them is a separate change with its own ranking risk.