Skip to content

fix(admin): add the missing adminMenuItems entries for pricing/mcp-servers (#16933) - #16944

Closed
mrveiss wants to merge 5 commits into
mainfrom
issue-16933-admin-menu-entries
Closed

mrveiss wants to merge 5 commits into
mainfrom
issue-16933-admin-menu-entries

Conversation

@mrveiss

@mrveiss mrveiss commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

Thinking Path

/admin/pricing and /admin/mcp-servers (#16825) merged with hideInNav: true but no matching adminMenuItems entry — 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's adminMenuItems (icon, labelKey, to, matching every sibling admin route) and the label translation to all 11 locales. 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. 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.

Verification

  • /admin/mcp-servers and /admin/pricing each have an adminMenuItems entry — icon, labelKey and to — matching the sibling admin routes
  • Each labelKey exists in all 11 locales
  • nav-items-coverage.test.ts also checks hideInNav routes against adminMenuItems, so an admin route with no menu entry fails CI
  • That guard is proved by mutation: removes a real adminMenuItems entry 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))
  • Not run locally: no node_modules in 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' meta blocks (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

…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.
@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: mrveiss/AutoBot-AI/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: d3a4ec09-dc7e-4e91-9df3-51a768dcf02c

📥 Commits

Reviewing files that changed from the base of the PR and between a892824 and 0e98aa2.

📒 Files selected for processing (8)
  • autobot-frontend/src/i18n/locales/ar.json
  • autobot-frontend/src/i18n/locales/de.json
  • autobot-frontend/src/i18n/locales/en.json
  • autobot-frontend/src/i18n/locales/es.json
  • autobot-frontend/src/i18n/locales/fr.json
  • autobot-frontend/src/i18n/locales/lv.json
  • autobot-frontend/src/i18n/locales/pl.json
  • autobot-frontend/src/i18n/locales/pt.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 3338f332-0207-4243-8d62-0d2eb68cd891

📥 Commits

Reviewing files that changed from the base of the PR and between bf3cac7 and be5ac69.

📒 Files selected for processing (14)
  • autobot-frontend/src/__tests__/nav-items-coverage.test.ts
  • autobot-frontend/src/config/navItems.ts
  • autobot-frontend/src/i18n/locales/ar.json
  • autobot-frontend/src/i18n/locales/de.json
  • autobot-frontend/src/i18n/locales/en.json
  • autobot-frontend/src/i18n/locales/es.json
  • autobot-frontend/src/i18n/locales/fa.json
  • autobot-frontend/src/i18n/locales/fr.json
  • autobot-frontend/src/i18n/locales/he.json
  • autobot-frontend/src/i18n/locales/lv.json
  • autobot-frontend/src/i18n/locales/pl.json
  • autobot-frontend/src/i18n/locales/pt.json
  • autobot-frontend/src/i18n/locales/ur.json
  • changelog/unreleased/16933-admin-menu-entries.md

Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The change adds /admin/pricing and /admin/mcp-servers to the admin menu, supplies translations in 11 locales, and extends navigation coverage tests to validate hidden admin routes and menu entries.

Changes

Admin menu reachability

Layer / File(s) Summary
Register admin menu entries and labels
autobot-frontend/src/config/navItems.ts, autobot-frontend/src/i18n/locales/*.json, changelog/unreleased/16933-admin-menu-entries.md
The admin menu now includes the pricing and MCP server routes. The English, Arabic, German, Spanish, Persian, French, Hebrew, Latvian, Polish, Portuguese, and Urdu locales define both labels.
Validate admin menu coverage
autobot-frontend/src/__tests__/nav-items-coverage.test.ts
The coverage tests check hidden top-level admin routes against adminMenuItems or the intentional allowlist. They also reject orphaned menu entries and test removal of /admin/pricing.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to be5ac

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)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #16933 requires menu entries for /admin/pricing and /admin/mcp-servers, with an icon, labelKey, and to. navItems.ts adds both entries. The PR summary records matching translations in a…
Out of Scope Changes check ✅ Passed The changes remain within issue #16933. The navigation entries, locale keys, coverage tests, mutation check, and changelog all support making the two admin routes reachable and preventing the same def…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (12 skipped: 1…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding the missing adminMenuItems entries for pricing and MCP servers.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mrveiss

mrveiss commented Sep 18, 2026

Copy link
Copy Markdown
Owner Author

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.

AC Evidence
Both routes get an adminMenuItems entry navItems.ts — /admin/pricing → nav.adminPricing, /admin/mcp-servers → nav.adminMcpServers, each with an icon and the sibling entries' shape
Each labelKey in all 11 locales both keys present in ar de en es fa fr he lv pl pt ur, each a real translation rather than an English placeholder (e.g. Modeļu cenas / MCP serveri, قیمت‌گذاری مدل‌ها / سرورهای MCP)
The coverage test checks hideInNav admin routes against adminMenuItems new block adminMenuItems coverage (#16933) — every hideInNav /admin/* route has an adminMenuItems entry or is allowlisted
Proved by mutation see below

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 every adminMenuItems entry corresponds to a real route fails on a menu entry pointing at nothing — so a renamed route cannot leave a dead menu item behind.

On AC4, verified rather than taken from the test name. A mutation proof is only as good as its allowlist: if INTENTIONALLY_HIDDEN exempted either route, deleting its menu entry would leave the guard green. It does not. The allowlist holds six pre-existing entries, each with a stated reason, and neither new route is among them. So removing either adminMenuItems entry fails the forward check, and the failure message names the route. The sanity test backs this by asserting the checked set is non-empty and contains /admin/sandbox, /admin/pricing and /admin/mcp-servers — so the guard cannot pass by finding nothing to check.

Scoping it to /admin/* is the right call, and the comment explains why: for most hideInNav routes the "other way in" is genuine — login, onboarding, an LLC sub-tab — and this file was never meant to enumerate those. For admin routes, hideInNav specifically means "listed in the admin menu instead", which is exactly the contract that was unenforced.

Merge order: this branch has merged main, so it inherits main's current Secret Detection red. Merge after #16943 lands, on a fresh run of the updated head.

One pre-existing entry worth a look separately, not a blocker: /admin/users is exempted as "surfaced via separate admin entrypoint". If that entrypoint is a real menu item, the exemption is correct; if not, it is the same gap as #16933.

@github-actions

Copy link
Copy Markdown
Contributor

Notice: 29 open PRs — past the runaway threshold (25)

There is no PR queue limit, and this is not a request to defer this PR. Work proceeds one issue at a time without a cap on open PRs; review capacity is the constraint.

This notice only means the count is high enough to be worth a glance for a runaway — something opening PRs in a loop, or a merge pipeline that has stalled so nothing is draining.

Currently open:

If the queue is draining normally, ignore this. Otherwise:

  1. Check whether CI is dispatching at all — see the ci-dispatch-watchdog status on these PRs
  2. Merge the ones whose CI has finished and review has passed: gh pr merge <number> --squash --delete-branch
  3. Look for a loop opening near-identical PRs

Warn-only runaway detector — .github/workflows/pr-queue-gate.yml. It never blocks a merge.

@github-actions

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No new hardcoded values of either class — ssot and other both block.

Known backlog in pipeline-scripts/hardcoded_values_baseline.txt is suppressed and tracked in #14371.

@mrveiss

mrveiss commented Sep 19, 2026

Copy link
Copy Markdown
Owner Author

Carried by vehicle #17086, which includes this PR's approved head 0e98aa2f6. Closed now as carried, per the owner's ruling (2026-09-19) that consolidated work shouldn't keep open duplicates or trigger extra CI. The branch is kept. The vehicle's own Closes lines close the linked issues when it lands. If #17086 is abandoned, this PR gets reopened.

@mrveiss mrveiss closed this Sep 19, 2026
@mrveiss
mrveiss deleted the issue-16933-admin-menu-entries branch September 19, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(admin): the MCP-servers and pricing admin screens merged unreachable — no admin menu entry

1 participant