Skip to content

Wire App.tsx to v2 core/ hook layer; remove demo stub from InspectorView #1244

@cliffhall

Description

@cliffhall

Background

clients/web/src/App.tsx is currently a 42-line MantineProvider shell that mounts InspectorView with no wiring — every prop is a fixture. Once the v2 core/ hook layer lands, App.tsx becomes the seam between the hook output and InspectorView's prop interface.

The plan flags this as a follow-up: "Wiring App.tsx to the v2 core hook layer."

Acceptance criteria

  • App.tsx calls useInspectorClient and the per-primitive useManaged* hooks.
  • InspectorView receives every required prop from hook output (no fixture imports remain in App.tsx).
  • Connection lifecycle handlers (onToggleConnection, onDisconnect) dispatch useInspectorClient's connect / disconnect rather than the existing demo stub inside InspectorView.
  • Per-screen action handlers wire to the right hook: onCallTooluseManagedTools, onGetPromptuseManagedPrompts, onReadResourceuseManagedResources, onSetLeveluseMessageLog, onCanceluseManagedRequestorTasks, etc.
  • The demo stub inside InspectorView (STUB_MIN_DELAY_MS, STUB_MAX_DELAY_MS, STUB_SUCCESS_RATE, handleToggleConnection, the timer machinery — InspectorView.tsx:96-249) is removed; InspectorView becomes pure prop-driven.
  • Storybook stories for InspectorView continue to work via fixture props (Storybook never goes through App.tsx).

Test plan

  • npm run format && npm run lint && npm run build clean.
  • npm run dev against a real MCP server (e.g. npx @modelcontextprotocol/server-filesystem) — connect / disconnect cycle works end-to-end.
  • Calling a tool from the Tools screen produces a real result in the result panel (no stub).
  • Reading a resource from the Resources screen produces real contents.
  • Setting a log level via the Logging screen actually issues logging/setLevel and subsequent logs respect the new level.
  • All InspectorView stories continue rendering with fixtures — npm run storybook shows no regressions.

Out of scope

  • Persistence (saving the server list across reloads — that's a useServers v2-only hook concern, separate effort).
  • Multi-server connection state (the v2 design is single-active-server; no change here).
  • Any new screens or features beyond what's already wired in InspectorView.

Blocked by

  • v2 core/ hook layer effort (separate issue).

Related

  • Current state: clients/web/src/App.tsx (42 lines), clients/web/src/components/views/InspectorView/InspectorView.tsx
  • Plan reference: specification/v2_ux_interfaces_plan.md § "Out of this plan, but adjacent"
  • Component contracts: specification/v2_ux_interfaces.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    v2Issues and PRs for v2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions