diff --git a/clients/web/src/App.test.tsx b/clients/web/src/App.test.tsx index b1d650093..ffa3daeec 100644 --- a/clients/web/src/App.test.tsx +++ b/clients/web/src/App.test.tsx @@ -220,8 +220,10 @@ vi.mock("@inspector/core/react/useInspectorClient.js", () => ({ status: "connected", capabilities: {}, clientCapabilities: {}, - // Left undefined so `initializeResult` stays undefined and the - // ConnectionInfoModal (gated on it) never mounts during the test. + // Undefined models a modern server that omitted the optional serverInfo. As + // of #1772 `initializeResult` is still built when connected (with a + // catalog-name fallback), so this exercises that path — see the "#1772" + // describe block. serverInfo: undefined, instructions: undefined, })), @@ -358,7 +360,9 @@ vi.mock("./components/views/InspectorView/InspectorView", () => ({ currentLogLevel?: string; activeTab?: string; erroredServerId?: string; + initializeResult?: { serverInfo: { name: string; version: string } }; onActiveTabChange: (tab: string) => void; + onConnectionInfo: () => void; onToggleConnection: (id: string) => void; onToolsUiChange: (next: { selectedToolName?: string; @@ -425,6 +429,11 @@ vi.mock("./components/views/InspectorView/InspectorView", () => ({ {props.currentLogLevel} {props.activeTab ?? "none"} + + {props.initializeResult + ? `name:${props.initializeResult.serverInfo.name || "(empty)"}` + : "none"} + {props.erroredServerId ?? "none"} @@ -432,6 +441,9 @@ vi.mock("./components/views/InspectorView/InspectorView", () => ({ switch-servers-tab +