Tasks: Application shell navigation & scroll contract¶
Each task references
FR-*/NFR-*/AC-*IDs from spec.md. CI'sspec_validator.pyenforces that every requirement is referenced by at least one task.
Conventions¶
- Status:
[ ]todo /[~]in-progress /[x]done. - Owner: GitHub handle or
@copilot/@agent:<role>. - Each task lists exact files to touch and how to verify.
T-001 — Layout token layer¶
- Refs: FR-9, NFR-A11Y-1, NFR-A11Y-2, NFR-SEC-1
- Owner: @agent:claude-code
- Status:
[x] - Files:
frontend/ui/layout.css(new),frontend/ui/README.md(new)frontend/app/globals.css- Steps:
- Shell metrics, the three-rung sticky stack, and the
--z-*scale as custom properties. .shell-scroll/.shell-panel-scrollwith contained overscroll and a stable gutter;.focus-ring/.focus-ring-practice;.shell-motion.- Import from
globals.css; catalogue every token and class in the README. - Verify:
npm run buildcompiles the import chain and prerenders every route.
T-002 — Viewport-locked shell¶
- Refs: FR-1, FR-3, NFR-PERF-1
- Owner: @agent:claude-code
- Status:
[x] - Files:
frontend/components/shell/AppShell.tsx,ShellScroll.tsx(new),BackToTop.tsx(new)frontend/components/shell/{NavRail,ContextSidebar,InspectorPanel}.tsxfrontend/app/layout.tsx,frontend/lib/shell/scrollMemory.ts(new)- Steps:
h-dvh overflow-hiddenon the shell and the document; chrome becomes non-scrolling flex children.<main class="shell-scroll">becomes the only content scroller; panels take.shell-panel-scroll.useMainScrollControllerpublishes scroll state through context, coalescing to onerequestAnimationFrame; restore per-route offset before paint; move the UPL footer inside the scroll region.- Verify:
ShellBehaviour.test.tsx— chrome is outside<main>, footer inside it, remembered offset restored.
T-003 — Page frame and the sticky stack¶
- Refs: FR-2, FR-10, AC-2
- Owner: @agent:claude-code
- Status:
[x] - Files:
frontend/components/shell/PageLayout.tsx(new)frontend/app/(app)/{agents,analysis,graph,lsat,settings}/page.tsxfrontend/components/{LsatLab,AgentDashboard,KnowledgeGraph}.tsx- Steps:
PageLayout— sticky condensing header (title survives; eyebrow and description do not) plus a measured body container.StickyToolbarparks against--shell-pageheader-h.- Migrate the five non-hero routes; pin the LSAT section switcher, the Agent Ops polling controls, the graph case picker, and the RC/LG passage.
- Verify:
data-condensedflips withscrolled;make test-frontend.
T-004 — Keyboard contract, palette, and masthead¶
- Refs: FR-4, FR-5, FR-7, AC-4, AC-5
- Owner: @agent:claude-code
- Status:
[x] - Files:
frontend/lib/shell/{shortcuts,commands,panels}.ts(new),frontend/lib/modules/catalog.tsfrontend/components/shell/{CommandPalette,ShortcutsHelp,Masthead}.tsx- Steps:
- Pure
matchShortcutwith a typing guard;⌘KandEscstay live inside a field. - Palette generated from
MODULE_CATALOGwith alias-aware ranking and listbox semantics. - Breadcrumbs from the catalog; panel toggles wired with
aria-expanded+aria-controls. - Verify:
[typed into a textarea reaches the field; "graph" + Enter navigates to/graph.
T-005 — Compact viewport and route states¶
- Refs: FR-6, FR-8, FR-12, NFR-A11Y-1
- Owner: @agent:claude-code
- Status:
[x] - Files:
frontend/components/shell/{Overlay,MobileTabBar,useMediaQuery}.tsxfrontend/app/(app)/{loading,error}.tsx(new),frontend/app/not-found.tsx(new)frontend/app/(app)/page.tsx- Steps:
useFocusTrap+Drawer+Scrim; bottom tab bar from the same catalog; viewport-aware panel defaults.- Route-level loading skeleton and an error boundary that keeps the shell alive.
- Homepage: one
contentinfo(BL-20260830-06), honest stack copy and repo link (BL-20260830-03), no nested<main>. - Verify:
make test-frontend;python3 scripts/ux_audit.pyR3/R6/R8 clean.
T-006 — Focus indicator sweep¶
- Refs: NFR-A11Y-1
- Owner: @agent:claude-code
- Status:
[x] - Files:
frontend/components/{AgentDashboard,AnalysisStudio,KnowledgeGraph,LsatLab}.tsx,frontend/components/shell/CommandPalette.tsx - Steps: Replace the twelve
focus:outline-none+ 1px-border-tint controls with.focus-ring(.focus-ring-practicein LSAT amber contexts). - Verify:
grep -rn "focus:outline-none" frontend/components frontend/appreturns nothing;ux_audit.pyR5 clean.
T-007 — The repeatable review loop¶
- Refs: FR-11, AC-6, NFR-DOCS-1
- Owner: @agent:claude-code
- Status:
[x] - Files:
scripts/ux_audit.py(new),Makefile,.github/workflows/ci.ymldocs/ui-ux-review.md(new),.claude/skills/ux-review/SKILL.md(new),.claude/commands/ux-review.md(new)- Steps:
- Rules R1–R9, line-precise, with reasoned file-level and per-page exemption markers.
make ux-audit, folded intomake lint-specsand CI's Spec Drift Gate.- The eight-dimension rubric, the one-fix-per-pass procedure, the "promote the fix into the floor" step, and the pass log.
- Verify: each rule fails against an injected violation and passes on a clean tree;
python3 scripts/ux_audit.py --listprints the rules.
T-008 — Tests, docs, gates, backlog¶
- Refs: AC-1, AC-3, AC-7, AC-8, NFR-AUDIT-1, NFR-HITL-1, NFR-DOCS-1
- Owner: @agent:claude-code
- Status:
[x] - Files:
frontend/__tests__/lib/shellLogic.test.ts(new),frontend/__tests__/shell/ShellBehaviour.test.tsx(new),frontend/.prettierrc(new),docs/ui-ux.md,BACKLOG.md - Steps: 40 new tests across the pure logic and the shell; refresh the inventory doc; mirror follow-ups. Pin the house style in
frontend/.prettierrc(semi: false,singleQuote: true) — prettier had no config, somake formatreformatted the whole tree away from the committed style. - Verify:
make test-frontend(109 tests),make typecheck,make lint,make lint-specs.
Done-When (Definition of Done)¶
- All tasks
[x]. - All
AC-*covered by passing tests or a reproducible command. make lint && make typecheck && make test-frontend && make lint-specsgreen.- LegalBench delta: 0 pp (no LLM path touched).
## Follow-ups Discoveredpopulated and mirrored into BACKLOG.md.
Follow-ups Discovered¶
- BL-20260831-01 — refactor, low — Delete
frontend/components/NavBar.tsx(dead since spec 040, zero imports) and drop it from spec 039 FR-5's proof set. - BL-20260831-02 — feature, med — Deep-link feature view state (LSAT Lab tab, Agent Ops run filters, graph selection) into the URL so Back and sharing work inside a screen the way they now do across the shell.
- BL-20260831-03 — feature, low —
prefers-reduced-motionis still ignored by the homepage pulse animations and the Cytoscape layout. - BL-20260831-04 — feature, low —
lsat-statichas no skip link and does not consumefrontend/ui/layout.css; the two products' shells still diverge. - BL-20260831-05 — test-gap, med — No real-layout coverage of the shell: jsdom cannot lay out
position: sticky, so sticky/scroll behaviour is asserted by class name. Add a Playwright spec. - BL-20260831-06 — feature, low — The nav rail is glyph-only; add a labelled expanded variant at
xlwith a persisted preference. - BL-20260831-07 — refactor, med —
AgentDashboard's launch and trace-drill modals hand-roll a dialog with no focus trap; move them ontouseFocusTrap.