feat(web): <NavSections> shared primitive (rail + drawer variants) #1026
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#1026
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As a developer building both the desktop sidebar and the mobile drawer,
I want the grouped-section nav rendered by a single shared component with a
variantprop,so that desktop (rail) and mobile (drawer) stay structurally identical and any future change happens in one place.
Acceptance criteria
Component
apps/web/src/components/nav-sections.tsxexports<NavSections variant="rail" | "drawer" collapsed?: boolean />.NAV_SECTIONSconstant declares the section order:WORK→AGENTS, plus a footer slot for Settings.WORK: Board, Workspace, Flows.AGENTS: Live, Roster, Config, Sessions, JSON.{ path, label, icon, testId }. Icons: lucide only (LayoutGrid,MessageSquare,GitBranch,Activity,Users,Sliders,History,Braces,Settings).Markup
<nav aria-label="Primary">(rail) or<nav aria-label="All routes">(drawer).<div role="group" aria-labelledby="navgrp-<id>">+ visible<h2>heading.<Link activeProps={{ "aria-current": "page" }}>.[aria-current=page]selector — no JS state.aria-hidden; visible text or (collapsed-rail)aria-labelcarries the name.h-10rows).Variant behaviour
variant="rail"+collapsed=true→ labels hidden, group<h2>replaced by<hr role="separator">, icons + tooltips (#nav-v2-7 supplies the tooltip wiring).variant="rail"+collapsed=false→ labels visible, headings visible.variant="drawer"→ labels always visible, headings always visible, no tooltips.Tests
aria-current="page"flips when route changes.aria-labelledby.Out of scope
References
docs/specs/nav-consolidation.md§ Sidebar component, § Mobile.