Skip to content

fix(agent): keep MCP server descriptions inside the dialog - #1168

Merged
AnthonyRonning merged 1 commit into
MaplePrivacyLabs:masterfrom
doowta:fix/mcp-dialog-description-wrap
Oct 19, 2026
Merged

AnthonyRonning merged 1 commit into
MaplePrivacyLabs:masterfrom
doowta:fix/mcp-dialog-description-wrap

Conversation

@doowta

@doowta doowta commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Why

  • In the MCP servers dialog, a long server description doesn't wrap. It stretches the whole dialog past its edge, so the header text is cut off.
  • The same overflow pushes each server's toggle, edit and delete buttons, and the Add custom server button, out of view, so they can't be reached.
  • It shows up in the Mac app and in the browser.

What this PR adds

  • The dialog's content stays within the dialog's width, whatever the text length.
  • Server descriptions wrap to two lines, the same as in the MCP picker menu.
Mac app (WebKit), light Mac app (WebKit), dark Web (Chrome), light
Before Mac app before, light Mac app before, dark Web before, light
After Mac app after, light Mac app after, dark Web after, light

Scroll sideways to compare. Click an image for full size.

Details for reviewers (cause, change, tests)

Cause. DialogContent is a CSS grid with an implicit auto column. The server row's description used truncate (white-space: nowrap), so the row's min-content width was the full description length. The grid column grew to that width instead of the dialog's max-w-3xl, and the header description, row controls and footer overflowed with it. min-w-0 on the row's text block doesn't help, because the grid item above it still has min-width: auto.

Change (apps/maple-research/frontend/src/components/agent/AgentMcpControls.tsx, 2 lines):

  • AgentMcpServersDialog: add grid-cols-[minmax(0,1fr)] to DialogContent, so the column can shrink to the dialog width. This covers both the server list and the add/edit form.
  • McpServerGroup: description truncate → line-clamp-2, matching AgentMcpMenu.

Tests.

  • Rendered the real AgentMcpServersDialog with the app's stylesheet in Playwright WebKit and Chromium at 1280×800, before and after, in light and dark. Content width inside the 768 px dialog: before 1245 px in both engines; after 768 px, with the description on 2 lines.
  • bun run format:check, bun run typecheck, bun run build:fast: pass. bun test: 1344 pass, 0 fail. ESLint on the changed file: clean.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

The MCP servers dialog's content column grew to the width of the longest
unwrapped server description, pushing the description text, row controls
and the Add custom server button past the dialog's edge.

Constrain the dialog's grid column with minmax(0, 1fr) so it can shrink to
the dialog width, and wrap server descriptions to two lines to match the
MCP picker menu.
@AnthonyRonning
AnthonyRonning merged commit 27f7d7a into MaplePrivacyLabs:master Oct 19, 2026
36 checks passed
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