Filter the sidebar refs ref-filter
Four hundred branches is a scroll; three is a list. A search field at the top of the sidebar narrows branches, remotes and tags at once, which is the point — a filter that only applied to one section would mean knowing which section a name is in before you can look for it. Matching is a plain case-insensitive substring on the shorthand, not anything fuzzy. It is predictable, and a person can see why a result appeared without learning the rules. The shorthand is what the sidebar shows, so it is what gets matched; searching text that is not on screen would be a surprise. The matched run of each name is wrapped in <mark>, which is exactly what that element is for: text made relevant by something the reader is doing right now. Splitting is done by scanning rather than with a regular expression — a branch name can contain `.` or `+`, and a lone `*` would otherwise throw rather than simply matching nothing. There is a test for each. Counts read "1 of 2" while filtering, and an <output> — a polite live region — says how many matched altogether, so the result of typing is spoken without focus leaving the field. A section with nothing left in it disappears rather than saying "None", which would read as "this repository has no tags" when the truth is "no tags match". When nothing matches anywhere, one message says so instead of three sections each saying it separately. The e2e tests caught that inconsistency: the whole-sidebar case was handled and the per-section case was not. Escape clears the field. Whether a search input does that itself is left to the browser, and WebKit and Chromium disagree, so it is handled explicitly and tested in both. The filter resets when another repository opens. One written for one repository rarely means anything in the next, and leaving it on would make a full sidebar look empty. The nav's existing tests now drive the real store rather than a hand-written stand-in, which is why they needed changing: the stub had gone stale against the store it was imitating. Using the real one means they cannot drift again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>