Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(mcp): use a configure icon for the MCP server configuration action (#8037)
Bohan Jiang374279a9b9ff
diff --git a/packages/views/agents/components/tabs/mcp-config-tab.tsx b/packages/views/agents/components/tabs/mcp-config-tab.tsxindex cab59cf58b..0d4ddba968 100644--- a/packages/views/agents/components/tabs/mcp-config-tab.tsx+++ b/packages/views/agents/components/tabs/mcp-config-tab.tsx@@ -387,7 +387,6 @@ export function McpConfigTab({remove: t(($) => $.tab_body.mcp_config.delete_action_short),removeAria: t(($) => $.tab_body.mcp_config.delete_aria),}}- configureKind="edit"onRenameStart={() => startRename(server)}onConfigure={() => openEditDialog(server)}onRemove={() => {diff --git a/packages/views/common/mcp-server-row.test.tsx b/packages/views/common/mcp-server-row.test.tsxindex d7f258641b..732e688533 100644--- a/packages/views/common/mcp-server-row.test.tsx+++ b/packages/views/common/mcp-server-row.test.tsx@@ -33,7 +33,6 @@ describe("McpServerRow", () => {remove: "Delete",removeAria: "Delete MCP server",}}- configureKind="edit"onRenameStart={vi.fn()}onConfigure={vi.fn()}onRemove={vi.fn()}@@ -55,6 +54,42 @@ describe("McpServerRow", () => {).toBeInTheDocument();});+ // Regression: the configure action opens the server's configuration dialog,+ // so it must not wear the circular-arrows icon this repo uses everywhere for+ // "refresh" (MUL-7057). That reading survived because the workspace library+ // calls the same action "Replace configuration".+ it("marks the configure action with the configure icon, not a refresh icon", () => {+ render(+ <ul>+ <McpServerRow+ name="linear"+ transport="stdio"+ canManage+ labels={{+ rename: "Rename",+ renameAria: "Rename server",+ renameSave: "Save name",+ renameCancel: "Cancel rename",+ configure: "Replace configuration",+ configureAria: "Replace configuration",+ remove: "Delete",+ removeAria: "Delete MCP server",+ }}+ onRenameStart={vi.fn()}+ onConfigure={vi.fn()}+ onRemove={vi.fn()}+ />+ </ul>,+ );++ const icon = screen+ .getByRole("button", { name: "Replace configuration linear" })+ .querySelector("svg");++ expect(icon).toHaveClass("lucide-sliders-horizontal");+ expect(icon?.getAttribute("class")).not.toMatch(/refresh|rotate/i);+ });+it("cancels inline rename when Escape is pressed", async () => {const user = userEvent.setup();const onCancel = vi.fn();@@ -82,7 +117,6 @@ describe("McpServerRow", () => {remove: "Delete",removeAria: "Delete MCP server",}}- configureKind="edit"onRenameStart={vi.fn()}onConfigure={vi.fn()}onRemove={vi.fn()}diff --git a/packages/views/common/mcp-server-row.tsx b/packages/views/common/mcp-server-row.tsxindex da930dc67a..1d46a0cf61 100644--- a/packages/views/common/mcp-server-row.tsx+++ b/packages/views/common/mcp-server-row.tsx@@ -6,7 +6,6 @@ import {Globe2,Loader2,Pencil,- RefreshCw,Server,SlidersHorizontal,SquareTerminal,@@ -113,7 +112,9 @@ export function McpRemoveButton({* Data writes remain the caller's responsibility: workspace settings replaces* a write-only config, while an agent edits its readable local config. Keeping* those semantics outside this component prevents the visual treatment and- * the security contract from becoming coupled again.+ * the security contract from becoming coupled again. Both open the same+ * configuration dialog, so both carry the same "configure" icon; only the+ * caller's tooltip and accessible name say whether it edits or replaces.*/export function McpServerRow({name,@@ -123,7 +124,6 @@ export function McpServerRow({actionsDisabled = false,rename,labels,- configureKind,onRenameStart,onConfigure,onRemove,@@ -135,14 +135,11 @@ export function McpServerRow({actionsDisabled?: boolean;rename?: McpServerRenameState;labels: McpServerRowLabels;- configureKind: "edit" | "replace";onRenameStart: () => void;onConfigure: () => void;onRemove: () => void;}) {const errorId = `${useId()}-rename-error`;- const ConfigureIcon =- configureKind === "replace" ? RefreshCw : SlidersHorizontal;return (<li className="group flex min-h-16 items-center gap-3 px-4 py-3 transition-colors hover:bg-muted/30">@@ -251,7 +248,7 @@ export function McpServerRow({disabled={actionsDisabled}aria-label={`${labels.configureAria} ${name}`}>- <ConfigureIcon />+ <SlidersHorizontal /></Button>}/>diff --git a/packages/views/settings/components/mcp-tab.tsx b/packages/views/settings/components/mcp-tab.tsxindex e262fded0a..805232551c 100644--- a/packages/views/settings/components/mcp-tab.tsx+++ b/packages/views/settings/components/mcp-tab.tsx@@ -272,7 +272,6 @@ export function McpTab() {remove: t(($) => $.mcp.remove_action),removeAria: t(($) => $.mcp.remove_server),}}- configureKind="replace"onRenameStart={() => startRename(server)}onConfigure={() => {cancelRename();