From 95afd5996c61deacf288105e906e1cf60de87c43 Mon Sep 17 00:00:00 2001 From: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 Date: Mon, 13 Jul 2026 20:18:08 -0400 Subject: [PATCH] feat(desktop): surface effective-merged buzz-agent MCP servers in read-only panel Wires the buzzAgentSlot prop that McpServersSection has exposed since #1780 with the RuntimeConfigSurface.buzzAgentMcpServers field added in P0. AgentConfigPanel now renders the effective merged (global < definition < agent) enabled-server list via a new BuzzAgentMcpServerRow, giving Will's WYSIWYG requirement (Q2) its read-only half. Also fixes McpServersSection's fallback text, which previously rendered unreachable for buzz-agent (the extensions-based branch never executes there since buzz-agent always reports empty extensions). Co-authored-by: Will Pfleger Signed-off-by: Will Pfleger --- .../features/agents/ui/AgentConfigPanel.tsx | 26 +++++++- .../features/agents/ui/McpServersSection.tsx | 65 +++++++++++++++++-- 2 files changed, 84 insertions(+), 7 deletions(-) diff --git a/desktop/src/features/agents/ui/AgentConfigPanel.tsx b/desktop/src/features/agents/ui/AgentConfigPanel.tsx index 26ecab3c0..c68563425 100644 --- a/desktop/src/features/agents/ui/AgentConfigPanel.tsx +++ b/desktop/src/features/agents/ui/AgentConfigPanel.tsx @@ -17,7 +17,7 @@ import { useAgentConfigSurface } from "../hooks"; import { cn } from "@/shared/lib/cn"; import { copyTextToClipboard } from "@/shared/lib/clipboard"; import { Spinner } from "@/shared/ui/spinner"; -import { McpServersSection } from "./McpServersSection"; +import { McpServersSection, BuzzAgentMcpServerRow } from "./McpServersSection"; import type { ConfigField, ConfigOrigin, @@ -366,8 +366,15 @@ export function AgentConfigPanel({ ); } - const { normalized, advanced, extensions, runtimeId, sources, isPreSpawn } = - data; + const { + normalized, + advanced, + extensions, + runtimeId, + sources, + isPreSpawn, + buzzAgentMcpServers, + } = data; const configFilePath = sources.configFilePath; const normalizedEntries = ( @@ -419,6 +426,19 @@ export function AgentConfigPanel({ 0 ? ( +
+ {buzzAgentMcpServers.map((server) => ( + + ))} +
+ ) : undefined + } extensions={extensions} runtimeId={runtimeId} variant={advancedMode === "flat" ? "profile" : "compact"} diff --git a/desktop/src/features/agents/ui/McpServersSection.tsx b/desktop/src/features/agents/ui/McpServersSection.tsx index 3e6c93ca5..f20beda4f 100644 --- a/desktop/src/features/agents/ui/McpServersSection.tsx +++ b/desktop/src/features/agents/ui/McpServersSection.tsx @@ -1,6 +1,6 @@ import type * as React from "react"; import { CheckCircle2, CircleSlash } from "lucide-react"; -import type { ExtensionEntry } from "@/shared/api/types"; +import type { ExtensionEntry, McpServerConfig } from "@/shared/api/types"; import { cn } from "@/shared/lib/cn"; type McpServersSectionProps = { @@ -38,9 +38,18 @@ export function McpServersSection({ MCP Servers

- {isBuzzAgent && buzzAgentSlot ? buzzAgentSlot : null} - - {extensions.length > 0 ? ( + {isBuzzAgent ? ( + (buzzAgentSlot ?? ( +

+ No custom servers configured +

+ )) + ) : extensions.length > 0 ? (
{extensions.map((extension) => ( ); } + +/** + * Read-only row for an *effective merged* buzz-agent MCP server — "what + * runs." Shows the resolved command line rather than `kind`/enabled state + * (unlike `McpServerRow`), since every entry here is already enabled by + * contract (`RuntimeConfigSurface.buzzAgentMcpServers` is enabled-only). + */ +export function BuzzAgentMcpServerRow({ + server, + variant, +}: { + server: McpServerConfig; + variant: "compact" | "profile"; +}) { + const StatusIcon = server.enabled ? CheckCircle2 : CircleSlash; + const commandLine = [server.command, ...server.args] + .filter(Boolean) + .join(" "); + + return ( +
+ + + + + + {server.name} + + + {commandLine || "stdio"} + + +
+ ); +}