From dde43ae47c3e2f0ef4f2f2cc834bf5203ffa4497 Mon Sep 17 00:00:00 2001 From: cliffhall Date: Mon, 27 Apr 2026 09:51:02 -0400 Subject: [PATCH 1/2] Phase 5 audit: annotate spec, close HistoryControls partial Audited every component under clients/web/src/components/ against its v2_ux_interfaces.md entry. Added an "Audit results" section near the top of the spec with the verified count (57/62 satisfied, 5 partial) and the specific gaps still open. While auditing, closed the HistoryControls gap directly: - Added RequestMethod union type to core/mcp/types.ts, derived from the SDK's Client/Server Request and Notification schemas plus a synthetic "response" entry for result/error MessageEntries. - Typed methodFilter and onMethodFilterChange in HistoryControls, HistoryListPanel, historyUtils.extractMethod with RequestMethod. - Lifted the hardcoded METHOD_OPTIONS list out of HistoryControls into a required availableMethods prop. HistoryScreen now derives it from the live entries via useMemo + extractMethod. - Updated HistoryControls.stories.tsx to pass availableMethods. The remaining 5 partials (ElicitationUrlPanel, InlineElicitationRequest, InlineSamplingRequest, ExperimentalFeaturesPanel, ResourceListItem) are either blocked on the v2 core hook layer effort or call out follow-up work that has its own design questions. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../HistoryControls.stories.tsx | 12 +++++ .../HistoryControls/HistoryControls.tsx | 24 ++++------ .../HistoryListPanel/HistoryListPanel.tsx | 9 ++-- .../web/src/components/groups/historyUtils.ts | 9 ++-- .../screens/HistoryScreen/HistoryScreen.tsx | 16 +++++-- core/mcp/types.ts | 12 +++++ specification/v2_ux_interfaces.md | 46 +++++++++++++++++++ 7 files changed, 104 insertions(+), 24 deletions(-) diff --git a/clients/web/src/components/groups/HistoryControls/HistoryControls.stories.tsx b/clients/web/src/components/groups/HistoryControls/HistoryControls.stories.tsx index d2cdad7f..ed24eabc 100644 --- a/clients/web/src/components/groups/HistoryControls/HistoryControls.stories.tsx +++ b/clients/web/src/components/groups/HistoryControls/HistoryControls.stories.tsx @@ -2,11 +2,23 @@ import type { Meta, StoryObj } from "@storybook/react-vite"; import { fn } from "storybook/test"; import { HistoryControls } from "./HistoryControls"; +const SAMPLE_METHODS = [ + "tools/call", + "tools/list", + "resources/read", + "resources/list", + "prompts/get", + "prompts/list", + "sampling/createMessage", + "elicitation/create", +] as const; + const meta: Meta = { title: "Groups/HistoryControls", component: HistoryControls, args: { searchText: "", + availableMethods: [...SAMPLE_METHODS], onSearchChange: fn(), onMethodFilterChange: fn(), }, diff --git a/clients/web/src/components/groups/HistoryControls/HistoryControls.tsx b/clients/web/src/components/groups/HistoryControls/HistoryControls.tsx index b5756c9d..1fc6add8 100644 --- a/clients/web/src/components/groups/HistoryControls/HistoryControls.tsx +++ b/clients/web/src/components/groups/HistoryControls/HistoryControls.tsx @@ -1,26 +1,18 @@ import { Select, Stack, TextInput, Title } from "@mantine/core"; - -const METHOD_OPTIONS = [ - "tools/call", - "tools/list", - "resources/read", - "resources/list", - "prompts/get", - "prompts/list", - "sampling/createMessage", - "elicitation/create", -]; +import type { RequestMethod } from "@inspector/core/mcp/types.js"; export interface HistoryControlsProps { searchText: string; - methodFilter?: string; + methodFilter?: RequestMethod; + availableMethods: RequestMethod[]; onSearchChange: (text: string) => void; - onMethodFilterChange: (method: string | undefined) => void; + onMethodFilterChange: (method: RequestMethod | undefined) => void; } export function HistoryControls({ searchText, methodFilter, + availableMethods, onSearchChange, onMethodFilterChange, }: HistoryControlsProps) { @@ -36,9 +28,11 @@ export function HistoryControls({ Filter by Method