docs/plans/2026-05-28-docs-sidebar-accordion.md
Objective:
Implement the Plate docs sidebar accordion in apps/www: top-level doc
sections and nested nav branches collapse/expand, active branches stay open,
multiple branches can remain open, installation children stay visible when that
branch is open, and no sidebar filter is added.
Goal plan: docs/plans/2026-05-28-docs-sidebar-accordion.md
Task source:
Completion threshold:
apps/www/src/components/docs-nav.tsx owns the accordion behavior./docs renders with compact open starter sections and collapsed later
sections./docs/installation/next keeps Installation open and marks Next.js current.pnpm --filter www typecheck passes.http://localhost:3002.node .agents/rules/autogoal/scripts/check-complete.mjs docs/plans/2026-05-28-docs-sidebar-accordion.md passes.Verification surface:
apps/www/src/components/docs-nav.tsx.pnpm --filter www typecheck./docs and /docs/installation/next.pnpm dev session on http://localhost:3002.Constraints:
build:registry.Boundaries:
localhost:3002./create, theme work, mobile sidebar redesign,
strict single-open accordion.Output budget strategy:
rg hit generated font/json output; recovery was
to stop broad output and use browser/source checks.Blocked condition:
/docs or the
approved browser tool could not connect. Neither happened.Task state:
Current verdict:
Start Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Skill analysis before edits | yes | Used autogoal, task, frontend-design, and Browser for browser proof. |
| Active goal checked or created | yes | Active goal and this plan created for the sidebar task. |
| Source of truth read before edits | yes | Read apps/www/src/components/docs-nav.tsx and sidebar/collapsible primitives. |
| Tracker comments and attachments read | no | No external tracker for this request. |
| Video transcript evidence required | no | No video or recording was provided. |
docs/solutions checked for non-trivial existing-code work | no | Small local UI behavior change with source patterns in the component. |
| TDD decision before behavior change or bug fix | yes | Browser interaction proof is the right coverage; no unit seam exists for this nav state. |
| Branch decision for code-changing task | no | User did not ask for git branch or PR work in this turn. |
| Release artifact decision | yes | N/A: docs app UI source only; no package release artifact. |
| Browser tool decision for browser surface | yes | Used the Codex in-app Browser skill and current localhost:3002 tab. |
| PR expectation decision | yes | N/A: user asked to implement locally, not PR. |
| Tracker sync expectation decision | yes | N/A: no issue or Linear target. |
| Output budget strategy recorded | yes | Recorded above, including accidental broad output recovery. |
| Browser pack selected | yes | Browser proof required for visible sidebar behavior. |
| Browser route / app surface identified | yes | /docs and /docs/installation/next on http://localhost:3002. |
| Browser tool decision recorded | yes | Browser plugin via Node REPL runtime. |
| Console/network caveat policy recorded | yes | Dev server terminal checked; no runtime errors shown for verified routes. |
Work Checklist:
/Users/zbeyens/git/plate.Completion Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Named verification threshold | yes | Source changed, typecheck passed, browser behavior verified. |
| Bug reproduced before fix | no | Feature refinement, not a bug repro. |
| Targeted behavior verification | yes | Browser checked collapse/reopen Installation, independent Plugins expansion, active /docs/installation/next. |
| TypeScript or typed config changed | yes | pnpm --filter www typecheck passed. |
| Package exports or file layout changed | no | No package exports or file moves. |
| Package manifests, lockfile, or install graph changed | no | No manifest or lockfile edits. |
| Agent rules or skills changed | no | No agent rule or skill edits. |
| Workspace authority proof | yes | Commands ran in /Users/zbeyens/git/plate; app proof against apps/www. |
| Browser surface changed | yes | Codex in-app browser proof captured on localhost:3002. |
| Browser final proof | yes | Screenshot captured and browser checks recorded below. |
| CI-controlled template output changed | no | No generated template output edited. |
| Package behavior or public API changed | no | Docs app UI only; no changeset. |
| Registry-only component work changed | no | Registry not touched. |
| Docs or content changed | no | Plan file only; no user docs/content pages changed. |
| High-risk mini gate | yes | Failure mode was hidden active child or unusable nested nav; browser proof covers both. |
| Agent-native review for agent/tooling changes | no | No agent/tooling files changed. |
| Local install corruption suspected | no | No corruption-shaped failure after typecheck/browser. |
| Autoreview for non-trivial implementation changes | no | Small local UI change verified directly. |
| PR create or update | no | No PR requested. |
| Task-style PR body verified | no | No PR body. |
| PR proof image hosting | no | No PR. |
| Tracker sync-back | no | No tracker. |
| Final handoff contract | yes | Final response will list change, typecheck, browser proof, and lint caveat. |
| Final lint | yes | pnpm --filter www exec eslint src/components/docs-nav.tsx --fix passed; package-wide lint:fix still fails on existing TS parser setup. |
| Output budget discipline | yes | Broad generated-output mistake recorded; no further broad output streamed. |
| Goal plan complete | yes | This plan is ready for check-complete. |
| Browser interaction proof | yes | Browser exercised /docs and /docs/installation/next. |
| Browser console/network check | yes | Dev server terminal showed successful 200 responses and no runtime stack trace. |
| Browser final proof artifact | yes | Screenshot emitted from /docs/installation/next. |
Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Intake and source read | done | Read docs nav/sidebar/collapsible source. | implementation |
| Implementation | done | Added collapsible sections and nested branches in docs-nav.tsx. | verification |
| Verification | done | Typecheck passed and browser proof completed. | closeout |
| PR / tracker sync | n/a | No PR/tracker requested. | final response |
| Closeout | done | Plan evidence recorded. | final response |
Findings:
DocsNav.Decisions and tradeoffs:
Implementation notes:
/docs useful without showing the full tree.Review fixes:
Error attempts:
| Error / failed attempt | Count | Next different move | Resolution |
|---|---|---|---|
pnpm --filter www lint:fix parses TS as JS across existing files | 1 | Use typecheck and browser proof; record lint blocker | Typecheck/browser passed; lint caveat recorded. |
Broad rg hit generated font/json output | 1 | Stop broad output and narrow verification | Recorded as output-budget caveat. |
Verification evidence:
pnpm --filter www exec eslint src/components/docs-nav.tsx --fix passed.pnpm --filter www typecheck passed./docs: Installation collapsed hides Plate UI; reopening shows it./docs: Plugins expands independently while Installation remains
controlled separately./docs/installation/next: URL loads, Next.js is the current nav
link, Installation is open, and installation children are visible.GET /docs and
GET /docs/installation/next 200 responses with no runtime stack trace.Final handoff contract:
pnpm --filter www typecheck; browser proof on /docs and
/docs/installation/next.pnpm --filter www lint:fix is blocked by an existing ESLint parser setup
failure across unrelated TS files.DocsNav source component.Final handoff / sync:
/docs/installation/next.www lint script failure recorded.Timeline:
Reboot status:
| Question | Answer |
|---|---|
| Where am I? | Closeout after implementation and verification. |
| Where am I going? | Final response to user. |
| What is the goal? | Plate docs sidebar accordion with nested branches and no filter. |
| What have I learned? | Existing shadcn sidebar/collapsible primitives fit this cleanly. |
| What have I done? | Implemented, typechecked, browser-verified, and recorded caveats. |
Open risks: