Skip to content

fix(environments): allow the environments tab in hosted mode - #3615

Merged
chelojimenez merged 1 commit into
mainfrom
feat/hosted-allow-environments-tab
Aug 2, 2026
Merged

fix(environments): allow the environments tab in hosted mode#3615
chelojimenez merged 1 commit into
mainfrom
feat/hosted-allow-environments-tab

Conversation

@chelojimenez

@chelojimenez chelojimenez commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Why

Hosted smoke-testing for the environments launch hit "environments is not available in hosted mode" with a redirect to /servers. App.tsx bounces any tab missing from HOSTED_SIDEBAR_ALLOWED_TABS / HOSTED_HASH_ALLOWED_TABS (client/src/lib/hosted-tab-policy.ts), and environments was never added — an independent gate the project-environments-enabled PostHog flag doesn't control. The tranche PRs were verified flag-on in local mode, where the allowlist doesn't apply.

What

  • Add environments to HOSTED_SIDEBAR_ALLOWED_TABS (flows into the hash allowlist). The entry only makes the tab reachable — visibility remains gated by the PostHog flag (flag-gated sidebar item + route guard, both fail-closed).
  • Test asserting environments is allowed in hosted sidebar + hash navigation and not blocked.

The project-environments surface manifest already exists with nav segment environments and is not hostedBlocked, so the surface-coverage invariants pass unchanged (showInAtlas: false stays — the static atlas can't read the flag).

Tests

37 tests pass across hosted-tab-policy, app-surface-coverage, and ui-actions.hosted.

🤖 Generated with Claude Code


Note

Low Risk
Small allowlist change with tests; feature exposure in hosted mode remains controlled by the existing PostHog flag and route guards.

Overview
Fixes hosted smoke tests that hit "environments is not available in hosted mode" and a redirect to /servers. Hosted App.tsx only permits tabs listed in HOSTED_SIDEBAR_ALLOWED_TABS / HOSTED_HASH_ALLOWED_TABS; environments was missing even when project-environments-enabled was on.

Adds environments to HOSTED_SIDEBAR_ALLOWED_TABS in hosted-tab-policy.ts (and thus the hash allowlist). This only makes the tab reachable in hosted mode—sidebar visibility and route access stay behind the PostHog flag. A unit test mirrors other hosted-nav tabs and asserts the tab is allowed, not blocked.

Reviewed by Cursor Bugbot for commit 4510d4f. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Allow the Environments tab in hosted mode so flagged users can access it without being redirected. Visibility remains gated by the project-environments-enabled flag.

  • Bug Fixes
    • Added environments to HOSTED_SIDEBAR_ALLOWED_TABS (and hash allowlist) so the route is reachable; sidebar item and route stay flag-gated.
    • Added tests to confirm environments is allowed in hosted sidebar and hash navigation, and not blocked.

Written for commit 4510d4f. Summary will update on new commits.

Review in cubic

The hosted tab allowlist (hosted-tab-policy.ts) never got an
`environments` entry, so hosted deployments bounced /environments with
"environments is not available in hosted mode" and redirected to
/servers — even for users flagged into `project-environments-enabled`.
The tranche PRs were verified flag-on in local mode, where the allowlist
doesn't apply, so this only surfaced on hosted smoke testing.

Allowlist entry only makes the tab reachable; visibility still comes
from the PostHog flag (sidebar item + route guard are flag-gated).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 2, 2026
@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_970f5840-c19f-4ced-ad08-d0c9eab050a0)

@dosubot

dosubot Bot commented Aug 2, 2026

Copy link
Copy Markdown

📄 Knowledge review

Dosu skipped reviewing this PR because your organization has used its 200 included credits for the month. Your usage will reset on 2026-09-01. To have Dosu review this PR before then, ask your organization admin to upgrade to a pro account.


Leave Feedback Ask Dosu about inspector Add Dosu to your team

@chelojimenez

Copy link
Copy Markdown
Contributor Author

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@chelojimenez
chelojimenez merged commit 58d54e5 into main Aug 2, 2026
13 of 14 checks passed
@chelojimenez
chelojimenez deleted the feat/hosted-allow-environments-tab branch August 2, 2026 04:11
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Internal preview

Preview URL will appear in Railway after the deploy finishes.
Deployed commit: 46a1e79
PR head commit: 4510d4f
Backend target: staging fallback.
Access is employee-only in non-production environments.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@chelojimenez, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 53fec679-455a-4b33-a262-cb63037143d5

📥 Commits

Reviewing files that changed from the base of the PR and between b59450a and 4510d4f.

📒 Files selected for processing (2)
  • mcpjam-inspector/client/src/lib/__tests__/hosted-tab-policy.test.ts
  • mcpjam-inspector/client/src/lib/hosted-tab-policy.ts

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant