Repository navigation
fix(webui): drop stray "$" before MCP "Available" heading - #6034
Conversation
A leftover template-literal `$` in JSX rendered the Extensions → MCP Servers "Available" heading as "$AVAILABLE MCP SERVERS". Removes the `$` so the translated label renders alone, with a rendering regression test.
📝 WalkthroughWalkthroughThe MCP tab now renders the translated “Available MCP servers” heading without a stray dollar sign. A Vitest regression test evaluates the component with mocked dependencies and verifies the rendered text. ChangesMCP heading rendering
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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.
Code Review
This pull request fixes a syntax typo in mcp-tab.tsx where a stray $ was included before the translation function call, and introduces a new test file mcp-tab.test.ts. The reviewer points out that the test implementation uses a highly non-standard and fragile approach with fs.readFileSync and vm.runInNewContext to load and execute the React component. They suggest refactoring the test to use standard imports and Vitest mocks instead.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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
`@crates/ironclaw_webui_v2/frontend/src/pages/extensions/components/mcp-tab.test.ts`:
- Around line 42-55: Update collectStringValues to traverse React element
children through node.props.children instead of node.values, recursively
handling arrays and nested elements so rendered strings are collected and
assertions remain effective. Prefer replacing the custom renderer and traversal
with `@testing-library/react` if that setup is already available in the test.
- Around line 7-40: Replace the vm-based raw-source evaluation in
mcpTabSourceForTest and renderMcpTab with a Vitest/React Testing Library test
that imports McpTab directly, mocks useT and the card components, and renders
through the configured JSX transform. Assert the available heading is rendered
and no standalone "$" text appears, preserving the existing test intent without
manually emulating React or transpiling source.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 26eb0387-c1a0-46a6-a80d-d53e3cf0cf30
📒 Files selected for processing (2)
crates/ironclaw_webui_v2/frontend/src/pages/extensions/components/mcp-tab.test.tscrates/ironclaw_webui_v2/frontend/src/pages/extensions/components/mcp-tab.tsx
Coverage ratchetReborn integration-tier coverageLine coverage (Reborn crates): 85.38% — 297042 / 347894 lines Per-crate breakdown (63 crates, lowest-covered first)
This table itself is informational and never gates the PR on its own — not the percentage, not the per-crate holes, not the 0-coverage callout. A separate coverage ratchet (dry-run until enforce=true; see tests/integration/coverage-floor.toml) can fail the build on specific configured floors. Exemptions (3 entry/entries excluded from the accounting above)
|
|
🚅 Deployed to the ironclaw-pr-6034 environment in ironclaw-ci-preview
|
hanakannzashi
left a comment
There was a problem hiding this comment.
Reviewed the current head. The stray $ is removed at the rendering call site, and the targeted MCP tab regression test passes. No blocking findings.
Summary
$in JSX (${t("mcp.available")}) on the Extensions → MCP Servers tab, which rendered the section heading as$AVAILABLE MCP SERVERS.$was plain text, not part of an interpolation; the sibling "Installed" heading was already correct.mcp-tab.test.ts) asserting the available-section heading shows the translated label with no stray"$"text node.Linked Issue
Closes #6028
Validation
npx vitest run src/pages/extensions/components/mcp-tab.test.ts— red before the fix (failed on the$), green afternpx vitest run src/pages/extensions/components/— 36 passed / 0 failednpx eslint src/pages/extensions/components/mcp-tab.tsx— exit 0git diff --check${in JSX (pages/,components/,layout/,design-system/) — 0 other occurrences, confirmed one-offSecurity Impact
No. Purely a cosmetic text-rendering fix; no auth, behavior, or data-flow change.
Database Impact
No schema or migration changes.
Blast Radius
Limited to the Extensions → MCP Servers tab heading in
ironclaw_webui_v2frontend, plus one new frontend test.Rollback Plan
Revert this PR; the heading returns to
$AVAILABLE MCP SERVERS.