Phase 5 audit: annotate spec, close HistoryControls partial#1236
Conversation
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>
37cc060 to
dde43ae
Compare
|
@claude review |
|
Claude finished @cliffhall's task in 1m 33s —— View job Code Review — Phase 5 audit / HistoryControls partial close
Overall this is a clean, well-scoped refactor. The SDK-derived
|
- Rename RequestMethod → MessageMethod. The type covers notifications and results, not just requests; the new name matches the JSDoc. - Normalize imports to the @inspector/core/mcp/types.js path alias in HistoryListPanel, historyUtils, and HistoryScreen (HistoryControls was already using the alias). - Document the cast invariant in extractMethod: SDK types message.method as string, but every MessageEntry in this app originates from SDK schemas, so the narrowing is safe. - Type SAMPLE_METHODS as MessageMethod[] in HistoryControls stories so the literal-type narrowing isn't lost across the spread. Skipped two reviewer suggestions: the Mantine Select inline cast (reviewer self-resolved) and the stale-methodFilter-on-clear UX edge case (deferred as a separate follow-up — not a Phase 5 audit gap). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Thanks for the review. Addressed in 6b3cecd. 1. 2. Cast in 3. Import path inconsistency — fixed. 4. Mantine Select inline cast — skipped (you self-resolved as "no action needed"). 5. Stale 6. |
|
@claude review |
|
Claude finished @cliffhall's task in 1m 24s —— View job Code Review — Phase 5 audit / HistoryControls partial close (follow-up)
All five items from the previous review have been correctly addressed in 6b3cecd. The code is clean and ready to merge. What was fixed — quick confirmation
One small nit (no action needed)
Spec audit sectionWell-structured. The two hook-layer-blocked partials are clearly identified, the three in-scope follow-ups have enough detail for someone picking them up cold, and the forward-reference to the upcoming LGTM. Nothing blocking. |
Summary
End-of-effort audit of
clients/web/src/components/againstspecification/v2_ux_interfaces.mdper the plan's "Validation strategy" step ("Readv2_ux_interfaces.mdend-to-end and confirm every component's Internal refactors bullet is satisfied").Result: 57 of 62 components satisfied, 5 partial, 0 unstarted.
The audit findings live in a new "Audit results" section near the top of the spec. Per-component status was not duplicated into each entry — the summary section + the existing per-entry definitions are enough signal.
While auditing, closed the HistoryControls partial in this same branch:
RequestMethodunion tocore/mcp/types.ts, derived from the SDK'sClient/ServerRequestSchema['method'] | Client/ServerNotificationSchema['method']plus a synthetic"response"for result/errorMessageEntryrows.methodFilterandonMethodFilterChangeinHistoryControls,HistoryListPanel, andhistoryUtils.extractMethodwithRequestMethod.METHOD_OPTIONSconst out ofHistoryControlsinto a requiredavailableMethods: RequestMethod[]prop.HistoryScreennow derives it from the live entries viauseMemo+extractMethod.HistoryControls.stories.tsxto passavailableMethods.Remaining partials (5)
Listed in the spec's audit section. Two are blocked on the v2 core hook layer effort (
InspectorUrlElicitRequestwrapper type was deferred from Phase 0.2):InspectorUrlElicitRequestwrapperThree are in-scope for follow-ups, each with a non-trivial design question:
draftResult: CreateMessageResultintegration withSamplingRequestPanel's draft-editing UXClientCapabilities['experimental']shapeTest plan
npm run formatcleannpm run lintcleannpm run build(includestsc -b) cleanHistoryControlsandHistoryScreenstories in Storybook — methodFilter dropdown should populate fromavailableMethods🤖 Generated with Claude Code