docs/plans/2026-05-31-restore-docs-sidebar-nesting.md
Objective: Restore the Plate docs sidebar's nested information architecture for categories such as Plugin, Editor, and Plate UI while keeping the current Fumadocs/upstream sidebar primitives.
Completion threshold:
The task is complete when Plate-owned content/docs/meta.json category groups feed the sidebar where available, explicit page-tree metadata survives overlay merging, status badges render as inline text pills, /docs/plugin and /docs/installation/plate-ui prove the visible nested sidebar in the in-app browser, and focused typecheck, lint, and source audits pass.
Verification surface:
pnpm --filter www typecheck in /Users/zbeyens/git/platepnpm lint:fix in /Users/zbeyens/git/platehttp://localhost:3004/docs/plugin and http://localhost:3004/docs/installation/plate-uigetSidebarCategoryItems, withDocsOverlayDeep, and status-pill rendering/tmp/plate-sidebar-nesting-proof.pngConstraints:
build:registry.Boundaries:
content/docs/meta.json _plate.categoryGroups plus existing page-tree metadata.apps/www/src./docs/plugin and /docs/installation/plate-ui on local www dev server.Output budget strategy:
Searches and audits were kept to exact symbols/routes after one accidental broad output stream during process inspection. Final evidence uses capped command output, exact rg patterns, and a browser JSON proof.
Blocked condition: Autonomous work would stop only if the local docs app could not serve the target routes or if the existing Plate category-group metadata was missing. Neither blocker applied.
Task source:
New and Updated badges visible as text pills; current primitives retained.www docs app at localhost:3004Task state:
Current verdict:
Start Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Skill analysis before edits | yes | Used active autogoal/task flow because the outcome is visible and measurable. |
| Active goal checked or created | yes | Active goal created for nested sidebar restoration. |
| Source of truth read before edits | yes | Read current sidebar/nav code and content/docs/meta.json category-group ownership. |
| Tracker comments and attachments read | no | N/A: no issue, PR, or Linear ticket was provided. |
| Video transcript evidence required | no | N/A: user provided a static screenshot only. |
docs/solutions checked for non-trivial existing-code work | no | N/A: memory and current source gave the relevant prior context; no solution doc was needed. |
| TDD decision before behavior change or bug fix | yes | Browser-visible nav/data plumbing is better proven by targeted browser checks plus typecheck/lint than a narrow unit test. |
| Branch decision for code-changing task | yes | N/A: no branch operation requested and project instruction says do not check git state proactively. |
| Release artifact decision | yes | N/A: docs app UI/data plumbing only; no package release artifact. |
| Browser tool decision for browser surface | yes | Used in-app Browser runtime against localhost:3004. |
| PR expectation decision | yes | N/A: user asked to implement, not create a PR. |
| Tracker sync expectation decision | yes | N/A: no tracker target exists. |
| Output budget strategy recorded | yes | Recorded exact-symbol audits and accidental broad-output recovery above. |
| Docs pack selected | yes | Docs/browser lanes apply because this is visible docs navigation. |
docs-creator loaded | no | N/A: no docs copy/content authoring, only nav plumbing. |
| Docs lane selected | yes | Docs app sidebar rendering lane. |
| Target docs and nearest sibling docs read | yes | Compared /docs/plugin and /docs/installation/plate-ui sidebar behavior. |
| Docs style doctrine read | no | N/A: no prose or MDX docs body was written. |
| Documented source owner identified | yes | content/docs/meta.json _plate.categoryGroups owns the nested IA. |
| Browser pack selected | yes | Target routes and expected visible nesting were defined before final proof. |
| Browser route / app surface identified | yes | /docs/plugin and /docs/installation/plate-ui. |
| Browser tool decision recorded | yes | In-app Browser, not standalone Playwright or Puppeteer. |
| Console/network caveat policy recorded | yes | Checked for Next error overlay; no overlay found on proved routes. |
Work Checklist:
/Users/zbeyens/git/plate, and browser proof used the local www app.Completion Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Named verification threshold | yes | Typecheck, lint, source audit, and browser proof all completed. |
| Bug reproduced before fix | yes | User screenshot showed old desired nested shape; current fix was verified against that shape. |
| Targeted behavior verification | yes | Browser proof found Plugin and Editor nested children plus Plate UI children. |
| TypeScript or typed config changed | yes | pnpm --filter www typecheck passed. |
| Package exports or file layout changed | no | N/A: no package exports or file layout changed. |
| Package manifests, lockfile, or install graph changed | no | N/A: no manifest or lockfile changes. |
| Agent rules or skills changed | no | N/A: no .agents, .claude, or .codex files changed. |
| Workspace authority proof | yes | Commands ran from /Users/zbeyens/git/plate; browser proof hit local www docs app. |
| Browser surface changed | yes | In-app browser verified visible sidebar nesting on target routes. |
| Browser final proof | yes | Screenshot saved at /tmp/plate-sidebar-nesting-proof.png. |
| CI-controlled template output changed | no | N/A: generated template/registry output untouched. |
| Package behavior or public API changed | no | N/A: no package behavior or public API changed. |
| Registry-only component work changed | no | N/A: docs navigation plumbing only. |
| Docs or content changed | yes | No MDX content changed; rendered docs nav verified in browser. |
| High-risk mini gate | yes | Failure mode is hidden or flattened sidebar pages; proof checks nested groups and badges at target routes. |
| Agent-native review for agent/tooling changes | no | N/A: no agent/tooling files changed. |
| Local install corruption suspected | no | N/A: no install-corruption failure shape appeared. |
| Autoreview for non-trivial implementation changes | no | N/A: focused local patch with concrete source, typecheck, lint, and browser proof; no broader review requested. |
| PR create or update | no | N/A: no PR requested. |
| Task-style PR body verified | no | N/A: no PR requested. |
| PR proof image hosting | no | N/A: no PR body. |
| Tracker sync-back | no | N/A: no tracker target. |
| Final handoff contract | yes | Final response will include summary, files, verification, browser proof, screenshot, and dev-server URL. |
| Final lint | yes | pnpm lint:fix passed. |
| Output budget discipline | yes | Accidental broad output was recorded; subsequent commands were capped and exact. |
| Goal plan complete | yes | This file is ready for node .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-05-31-restore-docs-sidebar-nesting.md. |
| Docs source-backed claim audit | yes | rg verified added sidebar helpers, overlay merge preservation, and status-pill rendering symbols. |
| Docs links / routes / previews | yes | Browser proof verified the target docs routes load without a Next error overlay. |
| Docs MDX/content parser | no | N/A: no MDX/content files changed. |
| Plugin page specifics | no | N/A: plugin docs content was not authored. |
| Browser interaction proof | yes | Browser visited /docs/plugin and /docs/installation/plate-ui and queried nested nav text. |
| Browser console/network check | yes | Next error overlay check was empty on both proved routes. |
| Browser final proof artifact | yes | /tmp/plate-sidebar-nesting-proof.png. |
Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Intake and source read | done | Identified meta.json category groups as IA owner and sidebar flattening as failure layer. | complete |
| Implementation | done | Added category-group sidebar mapping, deep overlay preservation, and text status pills. | complete |
| Verification | done | Typecheck, lint, source audit, and browser proof passed. | complete |
| PR / tracker sync | n/a | No PR or tracker requested. | complete |
| Closeout | done | Evidence file updated for autogoal completion. | final response |
Findings:
Decisions and tradeoffs:
Implementation notes:
apps/www/src/lib/docs-nav-metadata.ts now exposes getSidebarCategoryItems.apps/www/src/lib/docs-page-tree.ts applies Plate category groups per sidebar section and keeps overlay metadata deep.apps/www/src/components/docs-nav.tsx renders New and Updated as inline status pills.Review fixes:
label prop after pnpm lint:fix flagged it.Error attempts:
| Error / failed attempt | Count | Next different move | Resolution |
|---|---|---|---|
pnpm lint:fix reported unused label in DocsNavItemContent | 1 | Remove unused prop and rerun lint | Fixed; rerun passed |
| Broad process/search output streamed during initial exploration | 1 | Switch to exact rg and capped command output | Recovered; final evidence is scoped |
Verification evidence:
pnpm --filter www typecheck passed with docs source parity and registry source checks.pnpm lint:fix passed after removing the unused prop.getSidebarCategoryItems, guideSidebarSections, categorySidebarSections, withDocsOverlayDeep, and item.label ?? overlay?.label.New, Updated, bg-[#adfa1d], and bg-muted./docs/plugin: hasPluginChildren=true, hasEditorChildren=true, hasUpdatedText=true, hasNewText=true, nextError=""./docs/installation/plate-ui: hasPlateUiChildren=true, nextError=""./tmp/plate-sidebar-nesting-proof.png.Final handoff contract:
/docs/plugin and /docs/installation/plate-ui on localhost:3004.pnpm --filter www typecheck, pnpm lint:fix, in-app browser proof.Reboot status:
Ready to close. The implementation, verification, browser proof, and plan evidence are current; the only remaining action is the mechanical autogoal completion check followed by update_goal(status: complete).
Open risks: None known for the requested routes. Broader sidebar categories inherit the same category-group mapping and may need visual review only if their metadata contains unexpected wrapper groups.