Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Feb 2, 2026

This PR attempts to address Issue #11155 by implementing the following improvements to reduce UI clutter from MCP tool calls:

Changes

1. Collapsible Tool Descriptions in Chat Context

  • When displaying MCP tools in the chat context, descriptions are now truncated to 2 lines using CSS line-clamp-2
  • A chevron toggle button allows users to expand/collapse the description
  • Clicking on the description text also toggles the expansion
  • Full description is available on hover via tooltip
  • In settings context (MCP settings panel), descriptions remain fully visible

2. Workspace Path Truncation in Arguments

  • File paths in MCP tool arguments that start with the workspace root are now replaced with ./
  • This reduces cognitive load by showing cleaner, relative paths
  • The original paths are still visible in the JSON structure

Files Modified

  • webview-ui/src/components/mcp/McpToolRow.tsx - Added collapsible description functionality
  • webview-ui/src/components/chat/McpExecution.tsx - Added path truncation utility
  • webview-ui/src/i18n/locales/en/mcp.json - Added translation keys for expand/collapse
  • webview-ui/src/components/mcp/__tests__/McpToolRow.spec.tsx - Added tests for collapsible description

Trade-offs

  • Implementation kept minimal, touching only 4 files as requested
  • Full information still accessible via expand/hover interactions
  • No changes to MCP settings panel (only affects chat context)

Feedback and guidance are welcome!


Important

This PR reduces MCP tool call UI clutter by adding collapsible descriptions and truncating workspace paths, with updates to translations and tests.

  • UI Improvements:
    • McpToolRow.tsx: Descriptions in chat context are now collapsible with a chevron toggle and tooltip for full text.
    • McpExecution.tsx: Truncates workspace paths in tool arguments to ./ for cleaner display.
  • Testing:
    • McpToolRow.spec.tsx: Added tests for collapsible description functionality.
  • Translations:
    • Updated mcp.json in multiple locales to include keys for "expand" and "collapse" descriptions.

This description was created by Ellipsis for 745aeb3. You can customize this summary. It will automatically update as commits are pushed.

…nd path truncation

- Add collapsible description in McpToolRow when in chat context
- Truncate workspace root paths in MCP arguments for cleaner display
- Add expand/collapse toggle button with chevron icon
- Add tooltip with full description on hover
- Add new translation keys for expand/collapse actions
- Add tests for collapsible description functionality

Addresses #11155
@roomote
Copy link
Contributor Author

roomote bot commented Feb 2, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The latest commit adds missing tool.expand and tool.collapse translations to all 17 non-English locale files. All translations are correctly structured and appropriate for each language.

Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@DarkEden-coding
Copy link

@roomote fix missing translations:

FRONTEND - Checking 17 non-English locale(s): ca, de, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW
Checking 10 translation file(s): chat.json, cloud.json, common.json, history.json, marketplace.json, mcp.json, prompts.json, settings.json, welcome.json, worktrees.json

FRONTEND Missing Translations Report:

📝 ca:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 de:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 es:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 fr:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 hi:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 id:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 it:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 ja:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 ko:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 nl:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 pl:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 pt-BR:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 ru:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 tr:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 vi:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 zh-CN:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"

📝 zh-TW:
  - mcp.json: 2 missing translations
      tool.expand: "Expand description"
      tool.collapse: "Collapse description"


PACKAGE.NLS - Checking 17 locale file(s): ca, de, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW
Checking against base package.nls.json with 47 keys

PACKAGE.NLS Missing Translations Report:


✏️  To add missing translations:
1. Add the missing keys to the corresponding locale files
2. Translate the English values to the appropriate language
3. Run this script again to verify all translations are complete

@roomote
Copy link
Contributor Author

roomote bot commented Feb 2, 2026

Fixaroo Clock   See task on Roo Cloud

Added missing tool.expand and tool.collapse translations to all 17 non-English locale files. All local checks passed.

View commit | Revert commit

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants