Skip to content

fix(start): add admin dashboard heading hierarchy - #643

Merged
zacjones93 merged 8 commits into
codex/start-admin-sidebar-hydration-fixfrom
codex/start-admin-dashboard-heading
Jul 15, 2026
Merged

fix(start): add admin dashboard heading hierarchy#643
zacjones93 merged 8 commits into
codex/start-admin-sidebar-hydration-fixfrom
codex/start-admin-dashboard-heading

Conversation

@zacjones93

@zacjones93 zacjones93 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

What changed

  • render the visible Admin Dashboard title as the direct /admin page's sole h1
  • render Quick Actions and Recent Activity as h2 sections while preserving their existing visual classes
  • add focused semantic-heading tests and unique LAT contracts

Why

The exact-head Start coverage pass found that /admin exposed no semantic headings because its visible titles were generic CardTitle divs. Heading navigation therefore could not identify either the page or its sections.

This is deliberately narrow: quick-action destinations, authorization, loaders, dashboard layout, stat cards, and nested admin routes are unchanged.

Validation

  • red before fix: focused heading suite failed 0/2 because Admin Dashboard and Quick Actions had no heading roles
  • focused heading + existing admin hydration suites: 5/5 passed
  • full Start suite: 148 files, 2967 tests passed
  • isolated page-coverage ledger suite: 29/29 passed after one parallel-run 5-second timeout
  • Start type-check passed
  • repository pre-push lint and type-check passed
  • focused Biome check passed
  • lat check passed
  • git diff --check passed

Authenticated exact-head browser evidence will be recaptured by the next page-coverage slice on this commit.


Summary by cubic

Improved Admin accessibility by setting a correct heading hierarchy on /admin and fixing Demo Competitions semantics. Introduced a reusable Metric pattern and standardized empty states to unify UI and keep summaries consistent across Start and Crew.

  • Bug Fixes

    • Admin Dashboard now uses one <h1> (“Admin Dashboard”) with <h2> sections for “Quick Actions” and “Recent Activity”; added route tests and captured admin evidence.
    • Demo Competitions page exposes a proper <h1> and section headings; added semantics tests.
  • Refactors

    • Added @repo/ui/metric and adopted it for summary counts (Crew import previews, heats import, template panel, copy-prior-event); preserved compact typography; added Storybook and thin adapters in apps/*/src/components/ui/metric.tsx.
    • Replaced app-local empty states with @repo/ui/empty-state across organizer components (registration questions, event mapping, invite sources, venues); added focused tests to verify section-level headings and actions.

Written for commit d6316c1. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Accessibility

    • Improved the admin dashboard’s heading structure with a single main title and clearly defined subsection headings.
    • Supports more consistent page navigation for screen readers and other assistive technologies.
  • Tests

    • Added coverage to verify the dashboard title and subsection headings appear correctly.
  • Documentation

    • Documented the expected heading hierarchy and related dashboard checks.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0e5f2f12-85c5-451f-8c3d-860e8cb10984

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The admin dashboard now renders semantic h1 and h2 headings. Tests verify their levels and visibility, and documentation records the expected hierarchy.

Changes

Admin heading hierarchy

Layer / File(s) Summary
Semantic dashboard headings
apps/wodsmith-start/src/routes/admin/index.tsx
The page title renders as an h1, while “Quick Actions” and “Recent Activity” render as h2 elements.
Heading validation and documentation
apps/wodsmith-start/test/routes/admin-dashboard-heading.test.tsx, lat.md/admin-navigation.md
Tests verify heading levels and visibility, and documentation describes the expected hierarchy.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

I’m a rabbit hopping light,
Through headings crisp and right.
One tall h1 leads the way,
Two h2s guide the day.
Tests thump softly: “All okay!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a semantic heading hierarchy to the Start admin dashboard.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/start-admin-dashboard-heading

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.

❤️ Share

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

@zacjones93

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

This was referenced Jul 11, 2026
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

Independent review of exact base c2a0cc4368271ea03826fabd0d51db511db62052 → head 6317e9c1ee0e3f3e566ae323676b987fc0df8666: LGTM — no actionable findings.

Validated:

  • Exact scope is three files. The production diff only replaces the visible CardTitle wrappers for “Admin Dashboard”, “Quick Actions”, and “Recent Activity” with h1/h2 elements while preserving the prior typography classes. Links/actions, permissions, content, containers/layout, placeholder values, and nested admin route files are unchanged.
  • /admin now has exactly one named level-one heading (Admin Dashboard) and named level-two headings for Quick Actions and Recent Activity. The three stat labels and -- values remain CardDescription/CardTitle divs, not headings.
  • The focused tests assert heading levels and accessible names, plus exactly one h1. Both tests fail against the exact base (0/2: the named heading roles are absent), then pass at the exact head.
  • The two LAT refs target distinct leaf contracts; lat check passes.
  • Focused heading tests + existing admin hydration suite: 5/5 passed. Start type-check passed. Focused Biome check passed for the changed source/test scope. git diff --check passed.
  • Live review state at review time: zero inline threads and zero submitted reviews. Git Town is green; CI was queued and E2E was in progress, so this conclusion does not claim final CI completion.

@zacjones93
zacjones93 merged commit d6316c1 into codex/start-admin-sidebar-hydration-fix Jul 15, 2026
42 of 64 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.

1 participant