test: add docs navigation route consistency test#188
test: add docs navigation route consistency test#188VarshithaChettipalli wants to merge 2 commits into
Conversation
|
@VarshithaChettipalli is attempting to deploy a commit to the ankanmisra's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
More reviews will be available in 44 minutes and 57 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a test to ChangesDocs Navigation Synchronization Test
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/src/components/docs/docs-nav.test.ts`:
- Around line 24-33: The test "keeps docs navigation routes in sync with docs
pages" currently treats any file in docs/ as a route; update the
docsEntries/docsRoutes creation to only include actual route directories by
checking filesystem metadata and/or the presence of a page file: use
readdirSync(...) to list entries, then for each entry call statSync or lstatSync
and include only entries where isDirectory() is true and a route page exists
(e.g., check existsSync(join("./src/app/docs", entry, "page.mdx")) or
"page.tsx"); adjust the filter/map that builds docsRoutes to use these checks so
only real Next.js app router directories are turned into `/docs/${entry}`
routes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d3c231f4-16de-43cf-bc11-29f4039bc620
📒 Files selected for processing (1)
web/src/components/docs/docs-nav.test.ts
Summary
Adds a test that verifies docs navigation routes stay synchronized with the actual docs pages in src/app/docs.
The test reads the filesystem, filters out page.mdx and layout.tsx, generates expected routes, and compares them with DOCS_NAV_ITEMS.
Type Of Change
Affected Areas
gateway/)verifier/)web/)tests/,run_e2e.sh)bench/)deploy/, Docker, env, workflows)Contributor Checklist
Verification
Fixes #176
Summary by CodeRabbit