Skip to content

feat(ci): check that every synced man page has a docs.json nav entry#41

Merged
djsauble merged 1 commit into
mainfrom
add-man-nav-check
Jul 15, 2026
Merged

feat(ci): check that every synced man page has a docs.json nav entry#41
djsauble merged 1 commit into
mainfrom
add-man-nav-check

Conversation

@djsauble

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #40, where flox run and flox deactivate shipped reachable-by-URL but missing from the sidebar: man/*.mdx is synced from flox/flox, while docs.json nav entries are curated by hand, and nothing caught the gap.

This adds scripts/check-man-nav.sh, which fails when a page under man/ is not referenced in the docs.json navigation tree:

  • ALLOWLIST in the script covers deliberate exclusions — currently the auto-activation pages (flox-activate-allow, flox-activate-deny) removed from the nav in c2f6538. Stale allowlist entries (file deleted upstream, or page added back to the nav) produce warnings.
  • During sync: sync-man-pages.sh now runs the check at the end as a non-fatal warning, so both local syncs and the daily sync workflow surface missing entries in their output.
  • On PRs: a new check-man-nav workflow runs the check as a hard gate on PRs touching man/**, docs.json, or the script — so the daily sync PR goes red when a new command needs a sidebar entry.
  • AGENTS.md documents the check and the allowlist.

Verified against a scratch copy: removing man/flox-run from the nav fails with the page listed; deleting an allowlisted page's file warns without failing.

🤖 Generated with Claude Code

man/*.mdx is synced from flox/flox, but sidebar entries in docs.json are
curated by hand, so a new command's page can ship reachable-by-URL but
invisible in the nav (this happened with flox-run and flox-deactivate,
fixed in #40).

scripts/check-man-nav.sh fails when a man page has no nav entry, with an
ALLOWLIST for deliberate exclusions (the auto-activation pages, per
c2f6538) and stale-allowlist warnings. It runs as a non-fatal warning at
the end of sync-man-pages.sh and as a required-to-pass workflow on PRs
that touch man/, docs.json, or the script itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Jul 15, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
flox 🟢 Ready View Preview Jul 15, 2026, 6:33 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@djsauble
djsauble added this pull request to the merge queue Jul 15, 2026
Merged via the queue into main with commit 113ca68 Jul 15, 2026
5 checks passed
@djsauble
djsauble deleted the add-man-nav-check branch July 15, 2026 20:34
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