Phase 5: Lift ServerEntry into core/mcp/types.ts

ServerEntry was previously defined as `Pick<ServerCardProps, ...>` in
ServerListScreen, inverting the natural dependency direction (data shape
derived from a UI prop type). Phase 5's cleanup pass calls this out
specifically.

Move the canonical ServerEntry into core/mcp/types.ts and have
ServerCardProps extend it. ServerListScreen, InspectorView, and their
stories now import ServerEntry from core directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
cliffhall 2026-04-26 19:17:57 -04:00
commit c5d02456e0

View file

@ -1,8 +1,7 @@
import { Badge, Button, Card, Group, Stack, Text } from "@mantine/core";
import type { Implementation } from "@modelcontextprotocol/sdk/types.js";
import type {
ConnectionState,
MCPServerConfig,
ServerEntry,
ServerType,
} from "@inspector/core/mcp/types.js";
import { ServerStatusIndicator } from "../../elements/ServerStatusIndicator/ServerStatusIndicator";
@ -11,14 +10,7 @@ import { ConnectionToggle } from "../../elements/ConnectionToggle/ConnectionTogg
import { ContentViewer } from "../../elements/ContentViewer/ContentViewer";
import { InlineError } from "../../elements/InlineError/InlineError";
export interface ServerCardProps {
/** Stable unique identifier — the MCPConfig.mcpServers map key. */
id: string;
/** Display label shown in the card header. May or may not equal id. */
name: string;
config: MCPServerConfig;
info?: Implementation;
connection: ConnectionState;
export interface ServerCardProps extends ServerEntry {
activeServer?: string;
onToggleConnection: (id: string) => void;
onServerInfo: (id: string) => void;