Skip to content

fix(shell): paint the active tab on section routes - #92

Merged
guarzo merged 1 commit into
mainfrom
fix/nav-aria-current-paint
Aug 5, 2026
Merged

fix(shell): paint the active tab on section routes#92
guarzo merged 1 commit into
mainfrom
fix/nav-aria-current-paint

Conversation

@guarzo

@guarzo guarzo commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Follow-up to #91. Two lines of CSS plus the test that should have caught the gap.

The gap

#91 changed SiteHeader to emit aria-current="true" instead of "page" where
a tab's route is an ancestor of the current one — /payouts while you are on
/payouts/new, /payouts/[id] or the payout 404. The tab is current within its
set
without being the page you are on, and telling a screen reader otherwise is
the bug that change fixed.

globals.css:317,324 still matched [aria-current="page"] alone. So those three
routes shipped correct to a screen reader and unmarked to everyone else — no
--ink text, 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-current in the app is on the
/admin/accounts filter chips (page.tsx:163-198), which are .btn elements
under .filters and outside .shell__nav entirely.

The test

e2e/shell.spec.ts asserted the attribute on every shell route and nothing
about whether it was painted — which is exactly how the two drifted apart. It now
also reads the computed ::after height and expects 1px on each route.

Asserting the hairline rather than the text colour is deliberate: --ink is also
the :hover colour, so colour alone does not distinguish an active tab from a
hovered one. The existing comment at globals.css:300-311 makes 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.css was 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 run typecheck
> tsc --noEmit
(clean, no output)

$ npm run lint
✖ 3 problems (0 errors, 3 warnings)
(pre-existing @next/next/no-img-element warnings, untouched)

$ npm run format:check
All matched files use Prettier code style!

$ npm run test:e2e
  154 passed (2.5m)

npm test not re-run: this diff is one CSS rule and one e2e assertion, and the
unit suite covers neither. Flagging rather than implying it was run.

#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.
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 19 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 771de1ab-68c6-487d-a017-cef5e0237ae0

📥 Commits

Reviewing files that changed from the base of the PR and between 072349b and 51049de.

📒 Files selected for processing (2)
  • e2e/shell.spec.ts
  • src/app/globals.css

Comment @coderabbitai help to get the list of available commands.

@guarzo
guarzo enabled auto-merge (squash) August 5, 2026 00:08
@guarzo
guarzo merged commit c61db0c into main Aug 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants