A control that moves and changes nothing
Three filter chips on our document list highlighted, held state and were keyboard reachable. The list underneath them never changed.
All, Recent, Popular. They worked in every way a control is normally checked: the right one highlighted, the state updated, focus moved correctly, a screen reader announced them.
The render read `const filteredCVs = cvs`. The selection was never consulted again. Somebody could click "Popular", watch the interface respond, and read an unchanged list.
Two of the three could not have worked in any case. "Popular" ranks documents by how much they were read, and that page had never fetched a single reading. So the repair was not a filter function — it was getting the page the data its own navigation had been promising.
A control that moves and changes nothing is worse than no control: it teaches the reader that this screen's affordances are decorative.
The search box that replaced them is tested in two halves. One half checks the matching rules. The other reads the source and asserts the filtered set is what the list is actually built from — because every test anyone would naturally write for those three chips passed.
Where this happened
The files this post is about. Named so the claim can be checked rather than taken.
- components/mycvs/CVInbox.tsx