Skip to content

beta tag our playground#1968

Merged
chelojimenez merged 2 commits intomainfrom
beta-playground
Apr 28, 2026
Merged

beta tag our playground#1968
chelojimenez merged 2 commits intomainfrom
beta-playground

Conversation

@ignaciojimenezr
Copy link
Copy Markdown
Collaborator

No description provided.

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 28, 2026
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@chelojimenez
Copy link
Copy Markdown
Contributor

chelojimenez commented Apr 28, 2026

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.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 28, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Internal preview

Preview URL: https://mcp-inspector-pr-1968.up.railway.app
Deployed commit: b32a166
PR head commit: 85dd60a
Backend target: staging fallback.
Health: ❌ Convex unreachable — see upsert-preview job logs (staging may need convex deploy)
Access is employee-only in non-production environments.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

Walkthrough

The changes update the sidebar navigation to always display the Evaluate section, removing the previous feature flag gate. A new feature flag now controls Playground availability. The Playground tab is marked as beta and includes conditional UI rendering for beta state, displaying a badge with tooltip when enabled or a "Coming soon" tooltip when locked. Related components gain optional props to manage beta visibility and locked states. Tests are updated to dynamically mock feature flags and validate the new Playground UI behavior across enabled and disabled scenarios.


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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
mcpjam-inspector/client/src/components/mcp-sidebar.tsx (1)

754-756: Consider consolidating redundant props.

Both showPlaygroundBeta and playgroundEnabled receive the identical value playgroundEnabled === true. The component could derive showPlaygroundBeta internally from playgroundEnabled, reducing the API surface.

♻️ Internal derivation approach
 export function SidebarEvalsNavGroup({
   title,
   Icon,
   disabled,
   disabledTooltip,
   activeTab,
   showRuns = true,
-  showPlaygroundBeta = false,
   playgroundEnabled = false,
 }: {
   // ...
   showRuns?: boolean;
-  showPlaygroundBeta?: boolean;
   playgroundEnabled?: boolean;
 }) {
+  const showPlaygroundBeta = playgroundEnabled;
   // ...

And at the call site:

 <SidebarEvalsNavGroup
   title={evalsEntry.title}
   Icon={evalsEntry.icon}
   disabled={evalsEntry.disabled}
   disabledTooltip={evalsEntry.disabledTooltip}
   activeTab={activeTab}
   showRuns={evaluateRunsEnabled === true}
-  showPlaygroundBeta={playgroundEnabled === true}
   playgroundEnabled={playgroundEnabled === true}
 />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@mcpjam-inspector/client/src/components/mcp-sidebar.tsx` around lines 754 -
756, Both props showPlaygroundBeta and playgroundEnabled are being passed the
same boolean expression; remove the redundant showPlaygroundBeta prop at the
call site and derive it inside the receiving component from playgroundEnabled
instead. Specifically, stop passing showPlaygroundBeta={playgroundEnabled ===
true} where playgroundEnabled is passed, update the receiving component's
props/interface (remove showPlaygroundBeta or mark it optional), and compute
const showPlaygroundBeta = Boolean(playgroundEnabled) (or playgroundEnabled ===
true) inside that component to use for conditional rendering. Ensure any
TypeScript Prop types / defaultProps are updated to reflect the single source of
truth (playgroundEnabled).
mcpjam-inspector/client/src/components/sidebar/__tests__/sidebar-invite-cta.test.tsx (1)

273-276: Prefer getByRole for element selection.

Using .closest("button") as HTMLButtonElement is fragile and relies on a type assertion. Testing Library's role-based queries are more resilient and semantically clearer.

♻️ Suggested refinement
-    const playground = screen
-      .getByText("Playground")
-      .closest("button") as HTMLButtonElement;
-    expect(playground).toBeInTheDocument();
+    const playground = screen.getByRole("button", { name: "Playground" });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@mcpjam-inspector/client/src/components/sidebar/__tests__/sidebar-invite-cta.test.tsx`
around lines 273 - 276, The test currently locates the "Playground" button via
screen.getByText("Playground").closest("button") and casts to HTMLButtonElement,
which is fragile; replace that lookup with a role-based query such as
screen.getByRole("button", { name: /Playground/i }) (or
screen.getByRole("button", { name: "Playground" })) to directly find the button
element and remove the .closest(...) and the type assertion—update the variable
(playground) and the expect(playground).toBeInTheDocument() assertion
accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@mcpjam-inspector/client/src/components/mcp-sidebar.tsx`:
- Around line 754-756: Both props showPlaygroundBeta and playgroundEnabled are
being passed the same boolean expression; remove the redundant
showPlaygroundBeta prop at the call site and derive it inside the receiving
component from playgroundEnabled instead. Specifically, stop passing
showPlaygroundBeta={playgroundEnabled === true} where playgroundEnabled is
passed, update the receiving component's props/interface (remove
showPlaygroundBeta or mark it optional), and compute const showPlaygroundBeta =
Boolean(playgroundEnabled) (or playgroundEnabled === true) inside that component
to use for conditional rendering. Ensure any TypeScript Prop types /
defaultProps are updated to reflect the single source of truth
(playgroundEnabled).

In
`@mcpjam-inspector/client/src/components/sidebar/__tests__/sidebar-invite-cta.test.tsx`:
- Around line 273-276: The test currently locates the "Playground" button via
screen.getByText("Playground").closest("button") and casts to HTMLButtonElement,
which is fragile; replace that lookup with a role-based query such as
screen.getByRole("button", { name: /Playground/i }) (or
screen.getByRole("button", { name: "Playground" })) to directly find the button
element and remove the .closest(...) and the type assertion—update the variable
(playground) and the expect(playground).toBeInTheDocument() assertion
accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 94589d92-aa21-4ddb-96e6-334d8affce50

📥 Commits

Reviewing files that changed from the base of the PR and between 4f8a419 and 85dd60a.

📒 Files selected for processing (2)
  • mcpjam-inspector/client/src/components/mcp-sidebar.tsx
  • mcpjam-inspector/client/src/components/sidebar/__tests__/sidebar-invite-cta.test.tsx

@chelojimenez chelojimenez merged commit 88034fa into main Apr 28, 2026
11 checks passed
@chelojimenez chelojimenez deleted the beta-playground branch April 28, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants