Skip to content

fix: restore 2.5 versioned docs navigation#1511

Closed
bokelley wants to merge 3 commits intomainfrom
bokelley/fix-253-docs
Closed

fix: restore 2.5 versioned docs navigation#1511
bokelley wants to merge 3 commits intomainfrom
bokelley/fix-253-docs

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented Mar 16, 2026

Summary

  • Fixes 404s on all 2.5.3 and latest versioned docs by removing "Documentation" wrapper groups from the nav config
  • The wrapper was accidentally added to non-default versions in Restructure docs nav, introduce Sage as protocol identity #1509; it works for the default version (3.0-rc) but breaks Mintlify routing for non-default versions
  • Adds tests/docs-nav-validation.test.cjs (15 tests) to prevent this class of bug

What broke

PR #1509 wrapped all versions' nav groups inside a single "Documentation" group. This nesting pattern works for 3.0-rc (the default version) but causes Mintlify to 404 on non-default versions (latest and 2.5).

Why CI didn't catch it

  1. The pre-push hook (rm -rf dist/docs) excludes versioned docs from mintlify broken-links
  2. mintlify broken-links checks cross-references, not nav structure validity
  3. No existing test validated the structural properties of versioned navigation

What the new test validates

  • All page references resolve to files on disk (including dist/docs/)
  • No empty groups
  • No duplicate page references
  • Page paths have no file extensions
  • Snapshot versions have consistent version prefixes
  • Non-default versions use flat top-level groups (catches the exact bug)

Test plan

🤖 Generated with Claude Code

bokelley and others added 3 commits March 16, 2026 17:59
The nav restructure in #1509 accidentally wrapped the 2.5 version's
groups inside a "Documentation" group. This nesting pattern works for
3.0-rc but causes Mintlify to 404 on all 2.5.3 doc pages.

Restores the flat groups array for the 2.5 version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The nav restructure in #1509 broke all 2.5.3 docs but no test caught it.
The pre-push hook deletes dist/docs before running mintlify broken-links,
and mintlify broken-links only checks cross-references, not nav structure.

Adds tests/docs-nav-validation.test.cjs which validates:
- All page references resolve to files on disk (including dist/docs/)
- No empty groups in the navigation
- Snapshot versions have consistent version prefixes
- Snapshot versions use flat top-level groups (not a single wrapper)

Wired into the test chain so it runs on every commit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The test caught that the "latest" version had the same Documentation
wrapper bug as 2.5 — confirmed broken on the live site via vibium.

Flatten the latest version's nav to use flat top-level groups.

Improve docs-nav-validation.test.cjs per review feedback:
- Check all non-default versions (not just dist/docs snapshots)
- Detect wrapper groups by structural nesting, not page count
- Add duplicate page reference detection
- Add file extension detection in page paths
- Remove dead collectGroups branch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@EmmaLouise2018
Copy link
Copy Markdown
Contributor

Closing in favor of #1505 - we need both fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants