fix(nav): include docs.json in auto-PR add-paths#38
Conversation
The Python per-submodule split landed in PR #34, but every auto-PR since then has dropped the splice step's docs.json edits because peter-evans/create-pull-request only stages files matching add-paths, which was scoped to sdks/<lang>/api/**. Result: docs.json's nav was frozen at the pre-split state (one 'overview' leaf per package), hiding all the new submodule pages from the sidebar. Add docs.json to add-paths for all three SDK templates, and re-run splice-sdk-nav.py locally to fix the current docs.json state.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation build workflows for .NET, Python, and TypeScript to include the docs.json file in automated pull requests. It also expands the navigation tree in docs.json for the resq-dsa and resq-mcp Python SDKs. Feedback focuses on improving the automated generation logic to avoid duplicate sidebar entries for submodules, ensuring overview pages are prioritized, and maintaining the Mintlify schema requirements through nested group objects rather than manual file edits.
| add-paths: | | ||
| sdks/python/api/** | ||
| docs.json |
There was a problem hiding this comment.
The navigation splicing logic (lines 393-456) currently produces duplicated entries in docs.json for modules that contain submodules (e.g., core appearing both as a page and a group). Consider updating the to_mintlify function to detect these collisions and place the module-level page as the first item inside its corresponding group using the nested group object structure required by the Mintlify schema.
References
- In Mintlify docs.json navigation configuration, use a nested group object to define custom sidebar labels for pages, as the schema does not support a label property within the pages array.
| add-paths: | | ||
| sdks/typescript/api/** | ||
| docs.json |
There was a problem hiding this comment.
The navigation splicing logic (lines 260-332) results in duplicated sidebar entries for components that have nested groups. It is recommended to refine the tree construction logic to merge component-level pages into their respective groups using nested group objects to avoid a cluttered navigation menu and adhere to the Mintlify schema.
References
- In Mintlify docs.json navigation configuration, use a nested group object to define custom sidebar labels for pages, as the schema does not support a label property within the pages array.
| "sdks/python/api/resq-dsa/bloom", | ||
| "sdks/python/api/resq-dsa/count_min", | ||
| "sdks/python/api/resq-dsa/graph", | ||
| "sdks/python/api/resq-dsa/heap", | ||
| "sdks/python/api/resq-dsa/overview", | ||
| "sdks/python/api/resq-dsa/trie" |
There was a problem hiding this comment.
The overview page should be the first item in the navigation group for better discoverability. Since docs.json is auto-generated by the build workflow, this ordering should be enforced in the generator logic rather than manually edited here to prevent the changes from being overwritten.
References
- Do not manually add entries to documentation configuration files if they are automatically populated by a build workflow, as manual entries can cause errors and will be overwritten.
| "sdks/python/api/resq-mcp/core", | ||
| "sdks/python/api/resq-mcp/drone", | ||
| "sdks/python/api/resq-mcp/dtsop", | ||
| "sdks/python/api/resq-mcp/hce", | ||
| "sdks/python/api/resq-mcp/models", | ||
| "sdks/python/api/resq-mcp/overview", | ||
| "sdks/python/api/resq-mcp/pdie", | ||
| "sdks/python/api/resq-mcp/prompts", | ||
| "sdks/python/api/resq-mcp/resources", | ||
| "sdks/python/api/resq-mcp/server", | ||
| "sdks/python/api/resq-mcp/telemetry", | ||
| "sdks/python/api/resq-mcp/tools", | ||
| { | ||
| "group": "core", | ||
| "pages": [ | ||
| "sdks/python/api/resq-mcp/core/config", | ||
| "sdks/python/api/resq-mcp/core/errors", | ||
| "sdks/python/api/resq-mcp/core/models", | ||
| "sdks/python/api/resq-mcp/core/security", | ||
| "sdks/python/api/resq-mcp/core/telemetry", | ||
| "sdks/python/api/resq-mcp/core/timeout" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "drone", | ||
| "pages": [ | ||
| "sdks/python/api/resq-mcp/drone/models", | ||
| "sdks/python/api/resq-mcp/drone/service" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "dtsop", | ||
| "pages": [ | ||
| "sdks/python/api/resq-mcp/dtsop/models", | ||
| "sdks/python/api/resq-mcp/dtsop/service", | ||
| "sdks/python/api/resq-mcp/dtsop/tools" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "hce", | ||
| "pages": [ | ||
| "sdks/python/api/resq-mcp/hce/models", | ||
| "sdks/python/api/resq-mcp/hce/service", | ||
| "sdks/python/api/resq-mcp/hce/tools" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "pdie", | ||
| "pages": [ | ||
| "sdks/python/api/resq-mcp/pdie/models", | ||
| "sdks/python/api/resq-mcp/pdie/service" | ||
| ] | ||
| } | ||
| ] |
There was a problem hiding this comment.
The resq-mcp navigation contains redundant entries where submodules (like core, drone, dtsop, hce, and pdie) are listed both as top-level pages and as group titles. Use a nested group object (e.g., group: Label, pages: [path]) to define these in the navigation configuration. This structure avoids duplication and adheres to the Mintlify schema. Ensure this logic is updated in the generator templates to prevent manual changes from being overwritten.
References
- In Mintlify docs.json navigation configuration, use a nested group object to define custom sidebar labels for pages, as the schema does not support a label property within the pages array.
- Do not manually add entries to documentation configuration files if they are automatically populated by a build workflow, as manual entries can cause errors and will be overwritten.
Sync from resq-software/docs#38. Without this, the splice step's docs.json edits get stashed and dropped, so the per-submodule pages generated since the split landed have been invisible in the sidebar.
Sync from resq-software/docs#38. Without this, the splice step's docs.json edits get stashed and dropped, so new pages never appear in the docs sidebar.
Sync from resq-software/docs#38. Without this, the splice step's docs.json edits get stashed and dropped, so new pages never appear in the docs sidebar.
Summary
The Python per-submodule split (PR #34) generates separate
.mdfiles for each submodule (e.g.bloom.md,count_min.md,graph.md) alongside the package-leveloverview.md. The splice step in each SDK auto-PR template rewritesdocs.json's nav to register them all.But every auto-PR since #34 dropped the docs.json edits, because
peter-evans/create-pull-requestonly stages files matchingadd-paths, and that was scoped tosdks/<lang>/api/**. The splice ran, but its docs.json output was stashed away by the action.Symptom:
resq-dsa > Overviewshowed an empty page with class headings (BloomFilter,CountMinSketch,Graph...) but no content — because the bodies live onbloom.md,count_min.md, etc., and those pages weren't reachable from the sidebar.Changes
automation/source-repo-templates/api-docs.{python,typescript,dotnet}.yml: adddocs.jsontoadd-pathsso the splice step's edits ride along in the auto-PR.docs.json: regenerated by runningpython3 scripts/splice-sdk-nav.pylocally — restores all submodule pages to the Python nav (resq-dsa: 6 pages, resq-mcp: 12 top-level + 5 nested groups).Test plan
bunx mint devshows all submodule pages under Python > resq-dsa and Python > resq-mcpresq-dsa > bloomrendersBloomFilterclass with full method docsautomation/sync-templates.sh(or equivalent)