Repository navigation
Conversation
…rvers (#16933) /admin/pricing and /admin/mcp-servers (#16825) merged with hideInNav: true but no matching adminMenuItems entry -- in this codebase hideInNav: true means "listed in the admin menu instead of the main nav", not "hidden", so both screens were reachable only by typing the URL directly. This was reported as a blocking finding in review before #16875 merged; the finding was not addressed before it did. Added both entries to navItems.ts's adminMenuItems (icon, labelKey, to, matching every sibling admin route), and the labelKey translation to all 11 locales, reusing the wording already established for admin.pricing.title / admin.mcpServers.title. Extended nav-items-coverage.test.ts with a check the existing test structurally cannot do: it short-circuits on hideInNav: true before any membership check runs, so a missing admin-menu entry was invisible to it. The new check is scoped to hideInNav /admin/* routes specifically, not every hideInNav route, since the wider set has genuine other exposure paths (login, onboarding, LLC sub-tabs, dev-only pages) this file was never meant to enumerate. Proved by removing a real adminMenuItems entry and confirming the check's own matching logic would have caught it.
|
Warning Review limit reachedNext included review available in 44 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: mrveiss/AutoBot-AI/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (8)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (14)
Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe change adds ChangesAdmin menu reachability
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The two admin pages are registered in the admin menu with localized labels and regression coverage; no actionable merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
Review verdict: APPROVE. Independent review, since this PR's author also merged #16875 — author and reviewer are kept separate from here on. All four of #16933's criteria verified against the branch.
The guard is closed in both directions, which is more than the issue asked for: the forward check fails on an admin route with no menu entry, and On AC4, verified rather than taken from the test name. A mutation proof is only as good as its allowlist: if Scoping it to Merge order: this branch has merged One pre-existing entry worth a look separately, not a blocker: |
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
|
Carried by vehicle #17086, which includes this PR's approved head |
Thinking Path
/admin/pricingand/admin/mcp-servers(#16825) merged withhideInNav: truebut no matchingadminMenuItemsentry — in this codebase that flag means "listed in the admin menu instead of the main nav", not "hidden", so both screens were reachable only by typing the URL directly. This was a blocking finding in review before #16875 merged; the finding wasn't addressed before it did.What Changed
Added both entries to
navItems.ts'sadminMenuItems(icon,labelKey,to, matching every sibling admin route) and the label translation to all 11 locales. Extendednav-items-coverage.test.tswith a check the existing test structurally cannot do — it short-circuits onhideInNav: truebefore any membership check runs. The new check is scoped tohideInNav/admin/*routes specifically, not everyhideInNavroute, since the wider set has genuine other exposure paths (login, onboarding, LLC sub-tabs, dev-only pages) this file was never meant to enumerate.Verification
/admin/mcp-serversand/admin/pricingeach have anadminMenuItemsentry — icon,labelKeyandto— matching the sibling admin routeslabelKeyexists in all 11 localesnav-items-coverage.test.tsalso checkshideInNavroutes againstadminMenuItems, so an admin route with no menu entry fails CIadminMenuItemsentry and confirms the check's own matching logic would have caught it (sanity: is checking a non-empty, real set of admin routes (mutation proof, #16933 AC4))node_modulesin this checkout and the project's rule is never to install into the codebase; verified by hand-reading the added test logic and confirming both routes'metablocks (hideInNav: true,requiresAuth: true) match the sibling admin routes the existing passing tests already cover — CI's frontend vitest suite is the real signal.Model Used
Claude Opus 5
Single-issue rationale
A single small nav-menu wiring fix; no other open issue shares this file/scope to batch with.
Issue Link
Closes #16933