fix(shell): paint the active tab on section routes - #92
Conversation
#91 made the Payouts tab emit aria-current="true" rather than "page" on /payouts/new, /payouts/[id] and the payout 404 — the tab is current within its set without being the page you are on. The stylesheet still matched ='page' alone, so those three routes shipped correct to a screen reader and unmarked to everyone else: no --ink text, no gold hairline. Widened both selectors to the bare attribute. The only other aria-current in the app is on the /admin/accounts filter chips, which are .btn under .filters and outside the .shell__nav scope. e2e/shell.spec.ts now asserts the ::after hairline resolves to 1px on each route, not just that the attribute is present — the attribute and the stylesheet are independent, and only the attribute was covered. Mutation-checked: restoring ='page' fails it.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 19 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: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Comment |
Follow-up to #91. Two lines of CSS plus the test that should have caught the gap.
The gap
#91 changed
SiteHeaderto emitaria-current="true"instead of"page"wherea tab's route is an ancestor of the current one —
/payoutswhile you are on/payouts/new,/payouts/[id]or the payout 404. The tab is current within itsset without being the page you are on, and telling a screen reader otherwise is
the bug that change fixed.
globals.css:317,324still matched[aria-current="page"]alone. So those threeroutes shipped correct to a screen reader and unmarked to everyone else — no
--inktext, no gold hairline, nothing indicating which tab you are under.This was flagged in #91's description as a required follow-up owned by the
concurrent styles session, but #91 merged and auto-deployed first, so the
regression is live. This is the minimal close.
The change
Both selectors widened to the bare attribute. Both tokens mean "this is the
active tab" as far as paint is concerned; only the announcement differs.
The scope is safe to widen: the only other
aria-currentin the app is on the/admin/accountsfilter chips (page.tsx:163-198), which are.btnelementsunder
.filtersand outside.shell__naventirely.The test
e2e/shell.spec.tsasserted the attribute on every shell route and nothingabout whether it was painted — which is exactly how the two drifted apart. It now
also reads the computed
::afterheight and expects1pxon each route.Asserting the hairline rather than the text colour is deliberate:
--inkis alsothe
:hovercolour, so colour alone does not distinguish an active tab from ahovered one. The existing comment at
globals.css:300-311makes the same point —the 1px rule is doing necessary work rather than decorating.
Mutation-checked: restoring
="page"on both selectors makes the test fail.Ownership note
globals.csswas assigned to the concurrent styles session (1B) of this sweep,which has no open PR yet. This edit is deliberately confined to the two selectors
#91 depends on and touches nothing else in the file, so a broader styles sweep
should rebase over it cleanly.
Verification
npm testnot re-run: this diff is one CSS rule and one e2e assertion, and theunit suite covers neither. Flagging rather than implying it was run.