docs: fix sidebar nav collapse behaviour and group the per-builder guides - #697
Conversation
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
|
3ad26fa to
ac3a001
Compare
| - navigation.footer | ||
| - navigation.indexes | ||
| - navigation.sections | ||
| - navigation.top |
There was a problem hiding this comment.
The PR description says navigation.prune was also added ("so the full tree isn't rendered into every page"), but it isn't in the file. Without it, MkDocs renders the complete nav tree into every page's HTML — a non-trivial payload with 72 entries. Suggest adding it here:
| - navigation.top | |
| - navigation.prune | |
| - navigation.top |
|
One finding this run: the PR description states navigation.prune was added (to prevent rendering the full nav tree in every page), but it is absent from mkdocs.yml. Flagged inline with a code suggestion. |
ac3a001 to
cc18770
Compare
|
One new finding this run:
|
cc18770 to
4504cb3
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
4504cb3 to
30a7393
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
|
One new finding this run:
|
e12139f to
bd052b3
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
bd052b3 to
081a98c
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
44e47a8 to
f818c58
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
The docs sidebar re-expanded every collapsible section on each page load, so any section the reader collapsed sprang back open when they navigated. Two causes, two fixes: - `navigation.expand` was enabled in mkdocs.yml (listed twice, in a duplicated features block). It renders every section with Material's `md-toggle--indeterminate` class, which the theme's CSS treats exactly like `:checked`. Removed, so only the current page's ancestors open. - Material has no built-in persistence of manual expand/collapse, so extra.js now records explicitly-opened sections in sessionStorage and reapplies them per load, with a CSS rule suppressing the animation while state is restored. Also ignore the remaining generated API docs. `docs/api/` was already ignored while its sibling outputs from the same `npm run docs:api` command were not, so they showed up as untracked noise. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ible node The section lists a page per builder, so it grows with every builder we add. navigation.sections blocks collapsing a top-level section, but one level down groups collapse normally, so the per-builder pages move under a Guides node. The section stays three rows however many builders we add. Nav only — no theme flags, so nothing changes elsewhere on the site. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Renames the nav section from AI App Builders to App Builder Integrations. The walkthroughs page moves to ai-app-builders/guides/index.md so it becomes the Guides section index, the same shape the API Reference uses for agents/. Clicking Guides opens it, and the four per-builder pages sit under it — no separate nav row for the page itself. Its URL changes from /ai-app-builders/videos/ to /ai-app-builders/guides/. The per-builder pages keep their URLs. Cross-links updated on the four guide pages, Getting Started, the Codex plugin page, and the Coded Apps CLI reference. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both catches around sessionStorage returned silently. agent_docs/ conventions.md requires a console.warn on any catch that does not re-throw, naming best-effort reads from an ambient channel as the case. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
f818c58 to
9baeeda
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
|



Two changes to the docs sidebar.
1. Preserve collapse state across navigation
Collapsible sections re-expanded on every page load, so any section a reader collapsed sprang back open as soon as they navigated.
navigation.expandrenders every section with Material'smd-toggle--indeterminateclass, which the theme treats as expanded; the server re-emits it on each page load, discarding the reader's choice.Removing the flag, plus a small script that remembers expand/collapse choices in
sessionStorage, with the current page's ancestors pinned open so you can't hide where you are. State is fingerprinted so a nav-tree change drops stale entries, and all storage access is wrapped intry/catch.2. Group the per-builder guides
The AI App Builders section lists one page per builder, so it grows every time we add one.
navigation.sectionsprevents collapsing a top-level section, and removing it is a site-wide change we don't want — but it only applies at the top level, so one level down groups collapse normally (Coded Apps → CI/CDalready does).The section stays three rows however many builders we add, and the entry points stay visible.
Verification
Built and loaded in a browser:
Guidesrenders as a collapsible node, not force-expanded, and the persistence script ships. The second change depends on the first — withnavigation.expandstill on, the new node would render permanently open.Docs-site only — no SDK source, no public API surface.
🤖 Generated with Claude Code