feat(nav): left side-panel on every destination page#3472
Merged
Conversation
The standalone destination routes render outside the SPA workspace that owns SidebarMinimal, so /dashboard, /dashboard/familiars/growth, /weaves, /proposals, /settings, and /daily-report/[date] shipped with no side panel at all — landing there stranded you with only a breadcrumb. AnalyticsPageShell (the standalone icon rail with ?mode= deep links back into the SPA) already existed for exactly this but was applied to only 3 of 9 destination pages. Wrap all remaining destination pages in the shell, keeping each page's dr-page content as a div (aps-main is the main landmark). The rail's Dashboard foot link now carries aria-current="page" + an accent-presence tint when you're on /dashboard. route-inventory.test.ts gains a rule: every destination-kind route must mount AnalyticsPageShell, so future destination pages can't ship without the side panel. Verified in the running app: rail present on dashboard, growth, weaves, and settings; no console errors; 790 test files pass; tsc clean. Closes cave-4i6u. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ensures all destination-kind standalone routes render with the same left icon rail as the SPA workspace by consistently wrapping them in AnalyticsPageShell, and adds a route inventory invariant to prevent future destination pages from shipping without the side panel.
Changes:
- Wrap remaining destination pages (
/dashboard,/weaves,/proposals,/settings,/daily-report/[date], etc.) inAnalyticsPageShelland remove per-page root<main>to avoid nested main landmarks. - Add “current page” styling +
aria-current="page"behavior for the Dashboard rail foot link on/dashboard. - Add a
route-inventory.test.tsrule asserting destination pages mountAnalyticsPageShell.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/styles/analytics-page-shell.css | Adds [aria-current="page"] styling for the active rail link. |
| src/components/analytics-page-shell.tsx | Tracks pathname to set aria-current on the Dashboard link; updates shell docs to cover all destination routes. |
| src/app/weaves/page.tsx | Wraps Weaves destination page in AnalyticsPageShell and changes root landmark from <main> to <div>. |
| src/app/settings/page.tsx | Wraps Settings destination page in AnalyticsPageShell. |
| src/app/route-inventory.test.ts | Adds an invariant requiring all destination routes to mount AnalyticsPageShell. |
| src/app/proposals/page.tsx | Wraps Proposals destination page in AnalyticsPageShell and changes root landmark from <main> to <div>. |
| src/app/dashboard/page.tsx | Wraps Dashboard destination page in AnalyticsPageShell and changes root landmark from <main> to <div>. |
| src/app/dashboard/familiars/growth/page.tsx | Wraps Familiar Growth destination page in AnalyticsPageShell and changes root landmark from <main> to <div>. |
| src/app/dashboard-page.test.ts | Extends dashboard page source assertions to require AnalyticsPageShell and forbid nested <main>. |
| src/app/daily-report/[date]/page.tsx | Wraps both daily-report render branches in AnalyticsPageShell and changes root landmark from <main> to <div>. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+8
to
+12
| return ( | ||
| <AnalyticsPageShell> | ||
| <SettingsShell /> | ||
| </AnalyticsPageShell> | ||
| ); |
Comment on lines
+116
to
+119
| assert.ok( | ||
| source.includes("AnalyticsPageShell"), | ||
| `${route} is a destination route — it must mount AnalyticsPageShell so the left side-panel is present on every page (cave-4i6u)`, | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The left side-panel is now present on every page — especially the dashboard pages, which previously had none.
Why
Destination routes render outside the SPA workspace (which owns
SidebarMinimal), so/dashboard,/dashboard/familiars/growth,/weaves,/proposals,/settings, and/daily-report/[date]had no side panel at all — landing there stranded you with only a breadcrumb.AnalyticsPageShell(the standalone icon rail with?mode=deep links back into the SPA) already existed for exactly this purpose but was applied to only 3 of the 9 destination pages.How
AnalyticsPageShell, converting each page's root<main class="dr-page">to a<div>(the shell'saps-mainis the page's main landmark — no nested landmarks).aria-current="page"+ an accent-presence tint (12% fill / 35% border per the tint recipe) when on/dashboard.route-inventory.test.ts: everydestination-kind route must mountAnalyticsPageShell, so a future destination page can't ship without the side panel. Window-hosts (/quick-chat) and dev-only pages stay bare by design.Verification
Booted the branch and screenshotted: rail present on
/dashboard(with active tint on the foot link),/dashboard/familiars/growth,/weaves, and/settings; no console errors on the changed pages (compared against main's server). 790 test files pass;tsc --noEmitclean.Closes cave-4i6u.
🤖 Generated with Claude Code