Skip to content

fix(webui): drop stray "$" before MCP "Available" heading - #6034

Merged
italic-jinxin merged 3 commits into
mainfrom
issue-6028-mcp-tab-stray-dollar
Jul 14, 2026
Merged

italic-jinxin merged 3 commits into
mainfrom
issue-6028-mcp-tab-stray-dollar

Conversation

@italic-jinxin

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a leftover template-literal $ in JSX (${t("mcp.available")}) on the Extensions → MCP Servers tab, which rendered the section heading as $AVAILABLE MCP SERVERS.
  • The $ was plain text, not part of an interpolation; the sibling "Installed" heading was already correct.
  • Adds a rendering regression test (mcp-tab.test.ts) asserting the available-section heading shows the translated label with no stray "$" text node.
image

Linked Issue

Closes #6028

Validation

  • npx vitest run src/pages/extensions/components/mcp-tab.test.ts — red before the fix (failed on the $), green after
  • npx vitest run src/pages/extensions/components/ — 36 passed / 0 failed
  • npx eslint src/pages/extensions/components/mcp-tab.tsx — exit 0
  • git diff --check
  • Repo-wide grep for stray ${ in JSX (pages/, components/, layout/, design-system/) — 0 other occurrences, confirmed one-off

Security 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_v2 frontend, plus one new frontend test.

Rollback Plan

Revert this PR; the heading returns to $AVAILABLE MCP SERVERS.

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.
@italic-jinxin italic-jinxin added size: M 50-199 changed lines risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs skip-regression-check Bypass regression test CI gate (tests exist but not in tests/ dir) human-verified Manually tested and verified labels Jul 13, 2026
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6034 July 13, 2026 10:45 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6034 July 13, 2026 10:46 Destroyed
@github-actions github-actions Bot added size: XS < 10 changed lines (excluding docs) and removed size: M 50-199 changed lines labels Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

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

Changes

MCP heading rendering

Layer / File(s) Summary
Correct JSX interpolation
crates/ironclaw_webui_v2/frontend/src/pages/extensions/components/mcp-tab.tsx
The availability heading uses JSX interpolation for the translated label.
Add rendering regression test
crates/ironclaw_webui_v2/frontend/src/pages/extensions/components/mcp-tab.test.ts
A mocked render harness verifies the translated heading and ensures no standalone $ string is rendered.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: think-in-universe

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Changes fix the reported $-prefix bug in #6028 and add a regression test for the expected heading.
Out of Scope Changes check ✅ Passed Only the targeted JSX fix and a focused regression test were added; no unrelated code paths changed.
Title check ✅ Passed The title is conventional-commits style and accurately summarizes the MCP heading fix.
Description check ✅ Passed The description covers summary, linked issue, validation, and rollback, with only some optional template sections missing.

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between fe56bae and bf76dd4.

📒 Files selected for processing (2)
  • crates/ironclaw_webui_v2/frontend/src/pages/extensions/components/mcp-tab.test.ts
  • crates/ironclaw_webui_v2/frontend/src/pages/extensions/components/mcp-tab.tsx

@github-actions

github-actions Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Coverage ratchet

Ratchet mode: ENFORCING

RATCHET PASS: global
  observed: 85.38% (297042 / 347894 lines)
  floor:    85.3% (tolerance 0.5pp -> effective floor 84.8%)
  denominator: 347894 lines now vs 320188 at floor capture (+27706 lines, +8.65%) — material change (>5%)

⚠️ 2 Reborn crate(s) have 0 int-tier coverage (target: 0) — ironclaw_prompt_envelope, ironclaw_scripts

Reborn integration-tier coverage

Line coverage (Reborn crates): 85.38% — 297042 / 347894 lines

Per-crate breakdown (63 crates, lowest-covered first)
Crate Line % Covered / Total
ironclaw_prompt_envelope 0% 0 / 88
ironclaw_scripts 0% 0 / 345
ironclaw_runtime_policy 31.75% 80 / 252
ironclaw_event_projections 43.31% 673 / 1554
ironclaw_run_state 52.36% 222 / 424
ironclaw_authorization 53.66% 462 / 861
ironclaw_triggers 59.89% 1792 / 2992
ironclaw_observability 61.54% 16 / 26
ironclaw_webui_v2 62.93% 2679 / 4257
ironclaw_mcp 63.03% 578 / 917
ironclaw_reborn_cli 66.2% 4492 / 6785
ironclaw_reborn_migration 67.09% 1215 / 1811
ironclaw_filesystem 67.1% 3833 / 5712
ironclaw_dispatcher 67.15% 92 / 137
ironclaw_memory 69.2% 773 / 1117
ironclaw_trust 72.88% 661 / 907
ironclaw_capabilities 74.39% 1685 / 2265
ironclaw_wasm_limiter 74.6% 47 / 63
ironclaw_reborn_event_store 74.67% 958 / 1283
ironclaw_extractors 74.72% 538 / 720
ironclaw_first_party_extensions 78.23% 5439 / 6953
ironclaw_llm 78.36% 20328 / 25941
ironclaw_product_context 78.57% 11 / 14
ironclaw_process_sandbox 80.65% 671 / 832
ironclaw_wasm_product_adapters 80.71% 1448 / 1794
ironclaw_memory_native 81.22% 3205 / 3946
ironclaw_secrets 82.7% 2791 / 3375
ironclaw_wasm 82.72% 996 / 1204
ironclaw_events 82.86% 1765 / 2130
ironclaw_reborn_identity 83.59% 433 / 518
ironclaw_auth 83.87% 3078 / 3670
ironclaw_reborn_config 84.06% 1814 / 2158
ironclaw_processes 84.44% 993 / 1176
ironclaw_turns 84.85% 13560 / 15982
ironclaw_common 84.85% 1490 / 1756
ironclaw_host_api 85.17% 2664 / 3128
ironclaw_product_workflow 85.56% 10836 / 12665
ironclaw_projects 85.92% 659 / 767
ironclaw_threads 86.07% 4404 / 5117
ironclaw_network 86.12% 670 / 778
ironclaw_slack_v2_adapter 86.79% 1806 / 2081
ironclaw_product_adapters 86.98% 3207 / 3687
ironclaw_skills 87.58% 4470 / 5104
ironclaw_hooks 87.75% 9917 / 11302
ironclaw_product_adapter_registry 88.06% 531 / 603
ironclaw_reborn_traces 88.19% 11946 / 13546
ironclaw_host_runtime 88.53% 17269 / 19507
ironclaw_extensions 89.03% 2864 / 3217
ironclaw_reborn_composition 89.07% 76596 / 85992
ironclaw_approvals 89.24% 1584 / 1775
ironclaw_runner 89.28% 16696 / 18700
ironclaw_reborn_openai_compat 89.46% 3768 / 4212
ironclaw_conversations 90.33% 3120 / 3454
ironclaw_event_streams 90.82% 1009 / 1111
ironclaw_loop_host 92.51% 14755 / 15950
ironclaw_resources 92.83% 4736 / 5102
ironclaw_attachments 93.06% 630 / 677
ironclaw_reborn_webui_ingress 93.19% 2217 / 2379
ironclaw_telegram_v2_adapter 93.62% 2511 / 2682
ironclaw_agent_loop 94.57% 8789 / 9294
ironclaw_safety 94.88% 3671 / 3869
ironclaw_first_party_extension_ports 95.24% 3343 / 3510
ironclaw_outbound 95.59% 3556 / 3720

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)
Module / Crate Reason Issue
crate: ironclaw_embeddings v1-only: consumed only by root ironclaw (src/app.rs, src/tools/builtin/memory.rs, src/workspace/mod.rs, src/config/{mod,embeddings}.rs); no crates/* dependents. Covered by "Tests (Legacy)". #5657
crate: ironclaw_gateway v1-only: consumed only by root ironclaw (src/channels/web/platform/static_files.rs, src/channels/web/handlers/frontend.rs); no crates/* dependents. Covered by "Tests (Legacy)". #5657
crate: ironclaw_tui v1-only: consumed only by root ironclaw (src/main.rs, src/channels/tui.rs); no crates/* dependents. Crate's own doc comment confirms it bridges INTO v1, not Reborn. Covered by "Tests (Legacy)". #5657

@railway-app

railway-app Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the ironclaw-pr-6034 environment in ironclaw-ci-preview

Service Status Web Updated (UTC)
ironclaw ✅ Success (View Logs) Web Jul 13, 2026 at 11:39 am

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6034 July 13, 2026 11:29 Destroyed
@italic-jinxin italic-jinxin self-assigned this Jul 13, 2026

@hanakannzashi hanakannzashi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the current head. The stray $ is removed at the rendering call site, and the targeted MCP tab regression test passes. No blocking findings.

@italic-jinxin
italic-jinxin added this pull request to the merge queue Jul 14, 2026
Merged via the queue into main with commit 5c0f95e Jul 14, 2026
62 checks passed
@italic-jinxin
italic-jinxin deleted the issue-6028-mcp-tab-stray-dollar branch July 14, 2026 10:42

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-6034 — 9135d473 Deployed Jul 13, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs human-verified Manually tested and verified risk: low Changes to docs, tests, or low-risk modules size: XS < 10 changed lines (excluding docs) skip-regression-check Bypass regression test CI gate (tests exist but not in tests/ dir)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP tab: stray "$" rendered before the "Available MCP servers" heading

2 participants