Header magnifier reads as engaged when the filter is open#260
Conversation
The header filter magnifier now shows a muted "engaged" state the moment the filter input opens (before a query is typed), and turns solid only once a query is actually applied. Formalizes the header-toggle rule (ADR 0050): solid = the view is altered (spotlight-on, filter-applied); muted = a toggle is engaged but the view is still normal (bookmark, filter-open-empty). - query-filter-nav: reactive open-signal (useSyncExternalStore pattern) so FilterButton, which lives outside QueryFilterBar, can light while the input is open. - FilterButton: three states (ghost -> muted -> solid); aria-pressed now reflects "the input is open", not just "a query is applied". - Spotlight/bookmark already conformed; left untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 6 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Prerender safety + consistency with every other useSyncExternalStore in the repo (spotlight, coarse-pointer, tree/protection registry all pass one). Caught by /code-review. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
The header filter magnifier now shows a muted "engaged" state the moment you open the filter (before typing a query) and turns solid only once a filter is actually applied, so opening the box finally reads as a toggle. Formalizes a header-toggle rule so future contributors stop reinventing the "on" look (ADR 0050).
Changes
?q=query is actually applied — muted = tool engaged, solid = your view is altered.aria-pressednow reflects "the input is open" (open ∨ applied), not just "a query is applied".query-filter-nav(theuseSyncExternalStorehouse pattern) — it lives outsideQueryFilterBar, which owns thesummonedflag.Start here: change 4 — the button is in the header, so the open state had to become observable outside
QueryFilterBarrather than read from the route.Flow
Test plan
bun run typecheck,typecheck:test,lint— cleanbun run test— 640 unit tests passbun run build— production build +/prerender succeed (the header stays prerender-safe)filter-input.spec.tsserial — 14/14 pass, incl. a new three-state guard (idle ghost → muted open-empty → solid applied, assertingaria-pressed+ the standalonebg-muted/bg-primaryfill tokens)--muted(0.97, light grey) · applied--primary(0.205, dark) — muted is the only filled button at rest, so it's distinguishable/code-review(high): one finding —useSyncExternalStorewas missing thegetServerSnapshotarg every sibling store passes; fixed in a follow-up commit