feat(site): group selected MCP servers into one composer pill - #29258
feat(site): group selected MCP servers into one composer pill#29258ibetitsmike wants to merge 4 commits into
Conversation
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.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
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.
|
@codex review |
There was a problem hiding this comment.
💡 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".
… 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.
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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_onservers 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
MCPServerIconmoved tosite/src/modules/mcpServers/MCPServerIcon.tsxwith atile(settings) andcircle(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 ofMCPServerPicker.tsxintoMCPServerIconStack.tsxso 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.LD_PRELOADshim that makesconnect()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.f59e7d37c58and 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.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 indcdc6267ce1(shared icon component, removed presence-only test). Round 2 (headdcdc6267ce1): two findings fixed in40ae39ef964(hidden "Always on" text for locked rows, removed the remaining DOM-absence test assertions).