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) <noreply@anthropic.com>
This commit is contained in:
parent
7558d72a79
commit
dde43ae47c
1 changed files with 104 additions and 24 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import type {
|
||||
CallToolResult,
|
||||
ClientNotification,
|
||||
ClientRequest,
|
||||
GetPromptResult,
|
||||
Implementation,
|
||||
JSONRPCErrorResponse,
|
||||
|
|
@ -10,6 +12,8 @@ import type {
|
|||
ReadResourceResult,
|
||||
Resource,
|
||||
ServerCapabilities,
|
||||
ServerNotification,
|
||||
ServerRequest,
|
||||
Tool,
|
||||
} from "@modelcontextprotocol/sdk/types.js";
|
||||
import type { JsonValue } from "../json/jsonUtils.js";
|
||||
|
|
@ -98,6 +102,14 @@ export interface MessageEntry {
|
|||
duration?: number; // Time between request and response in ms
|
||||
}
|
||||
|
||||
/** Method name for any MessageEntry traffic, plus synthetic "response" for result/error entries. */
|
||||
export type RequestMethod =
|
||||
| ClientRequest["method"]
|
||||
| ClientNotification["method"]
|
||||
| ServerRequest["method"]
|
||||
| ServerNotification["method"]
|
||||
| "response";
|
||||
|
||||
export type FetchRequestCategory = "auth" | "transport";
|
||||
|
||||
export interface FetchRequestEntry {
|
||||
|
|
|
|||
Loading…
Reference in a new issue