Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(site): group selected MCP servers into one composer pill - #29258

Draft
ibetitsmike wants to merge 4 commits into
mainfrom
mike/mcp-group-badge
Draft

feat(site): group selected MCP servers into one composer pill#29258
ibetitsmike wants to merge 4 commits into
mainfrom
mike/mcp-group-badge

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

When more than one MCP server is active in the Agents chat composer, the individual server pills now collapse into a single "N MCP servers" pill with an overlapping icon stack. Clicking it opens a popover that lists each server with its own remove control; force_on servers show a lock (with visually hidden "Always on" text) instead. A single active server keeps the existing named pill, and servers that still need OAuth stay excluded from the group as before.

The settings-page MCPServerIcon moved to site/src/modules/mcpServers/MCPServerIcon.tsx with a tile (settings) and circle (composer and picker) variant so there is one icon renderer, and it is decorative (alt="") because every consumer renders the server name next to it or labels the containing control. The overlapping icon stack moved out of MCPServerPicker.tsx into MCPServerIconStack.tsx so the picker and the composer share it.

Stories cover the closed, open, disabled, five-server, and nested-overflow states; the overflow stories that relied on many MCP pills now use a long attached workspace name to force +N. Vitest covers the remove callbacks, the single-pill path, the OAuth-pending exclusion, and the disabled state.

Known limitation, consistent with the existing pills: removing the second-to-last server from the group unmounts the group pill together with its popover, so keyboard focus returns to the document rather than to a surviving control, the same as dismissing any existing badge with its X. Restoring focus consistently across all badges is left for a follow-up.

Validation

  • pnpm check, pnpm lint:types, pnpm lint:compiler, pnpm lint:circular-deps, knip, and the unit and Storybook tests for the touched files (AgentsPage composer and picker, MCPServersPage) pass.
  • Pre-commit and pre-push hooks passed on every commit. The pre-push runs used an LD_PRELOAD shim that makes connect() to loopback:3000 fail with ECONNREFUSED, matching CI where nothing listens on jsdom's default origin; without it a service on :3000 on the development host answers unmocked requests and crashes unrelated settings-page tests. The hook itself ran unmodified.
  • Dogfood UAT ran through a remote Coder Agent against a running deployment built from f59e7d37c58 and passed: grouped pill, popover removal 3 to 2 to 1 to 0, force_on lock, OAuth-pending exclusion, 414px nested overflow, existing-chat persistence, and keyboard navigation. The later commits (89427f1f7a3, dcdc6267ce1, 40ae39ef964) only change the icon component's home and alt text, add the hidden lock text, and adjust tests; they were not re-exercised remotely.
  • Codex review round 1 (head 89427f1f7a3): one finding refuted by a Chromium probe (nested removal keeps the overflow popover open), one declined as a pre-existing cross-badge focus behavior (see above), two fixed in dcdc6267ce1 (shared icon component, removed presence-only test). Round 2 (head dcdc6267ce1): two findings fixed in 40ae39ef964 (hidden "Always on" text for locked rows, removed the remaining DOM-absence test assertions).

Xum (Coder's coding agent) implemented this on behalf of @ibetitsmike.

Every MCPServerIcon consumer renders the server name as text or labels
the containing control, so the image alt text only duplicated the name
for screen readers.
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-12T00:13:24.120896Z 40ae39e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 89427f1f7a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread site/src/pages/AgentsPage/components/AgentChatInput.tsx
Comment thread site/src/pages/AgentsPage/components/AgentChatInput.tsx
Comment thread site/src/pages/AgentsPage/components/AgentChatInput.test.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/MCPServerIconStack.tsx Outdated
Move the MCP server icon from the settings page into modules/mcpServers
with a tile/circle variant so the composer and picker reuse it instead
of keeping a second renderer. Drop the presence-only force-on test; the
open-group story already captures the locked row.
@ibetitsmike ibetitsmike changed the title feat(site/src/pages/AgentsPage): group selected MCP servers into one composer pill feat(site): group selected MCP servers into one composer pill Sep 11, 2026
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dcdc6267ce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread site/src/pages/AgentsPage/components/AgentChatInput.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/AgentChatInput.test.tsx Outdated
… group

Screen readers only heard the server name for locked rows, so add
visually hidden "Always on" text next to the lock. Drop the remaining
DOM-absence assertions from the composer tests; the interaction that
follows already proves the single-server path.
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 40ae39ef96

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant