Add collapsible docs nav sections

Merged
KE
4mo ago
+357-1

Summary

  • add a small custom nav script that turns top-level Mintlify sidebar headers into collapsible controls
  • keep the current page section expanded while collapsing inactive sections by default
  • add chevron/focus styling and regression coverage for click and keyboard toggles

Tests

  • node --test scripts/*.test.mjs
  • node scripts/sweep-artifacts.mjs --check

Notes

  • Verified locally in Mintlify preview: Concepts page keeps Concepts open while AI in Runway/Data in collapse; AI pages keep AI in Runway open.

Summary by cubic

Make top-level docs sidebar sections collapsible to reduce noise and improve navigation. The current section stays open, and user choices are remembered.

  • New Features
    • Added nav-collapse.js to make Mintlify sidebar headers toggleable via click and keyboard, with ARIA attributes, active section kept open, and state persisted in localStorage.
    • Chevron indicator and focus styling added in styles/nav.css.
    • Unit tests added in scripts/nav-collapse.test.mjs for collapse behavior and keyboard/click toggles.
    • Updated scripts/sweep-artifacts.mjs to include nav-collapse.js as a reference file.