inspector/clients/web/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Cliff Hall 8ebd55723f
fix(dev): handle client disconnect in the dev proxy stream pump (#1418) (#1419)
The Hono dev-proxy middleware pumped streaming /api responses to the Node
ServerResponse without handling client disconnect. When the browser dropped a
stream mid-flight (SSE close, navigation, HMR reload) `res` was destroyed and
the next write failed with ERR_STREAM_DESTROYED, which the pump logged as an
error. It also had no `error` listener (a failed write could surface as an
uncaught exception) and no `close` listener (it kept reading upstream after the
client left).

Make the pump disconnect-aware:
- Listen for res `close`/`error`; either cancels the upstream reader (resolving
  the pending read so the loop exits) and flips a `clientGone` flag.
- Treat ERR_STREAM_DESTROYED / EPIPE / ECONNRESET as a normal end — not logged.
- Only log genuinely unexpected stream errors.
- Await each write so a slow client applies backpressure instead of the proxy
  buffering the whole stream.

Dev-only plugin (excluded from the coverage gate — it needs a real Vite server
to exercise). Verified via npm run validate.

Closes #1418

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 19:08:48 -04:00
..
inject-auth-token.ts feat(auth): inject MCP_INSPECTOR_API_TOKEN into served index.html (#1378) (#1382) 2026-05-30 20:10:27 -04:00
quiet-config-warnings.d.mts chore(web): silence benign config-load dep warnings in npm run dev (#1408) 2026-06-01 19:48:12 -04:00
quiet-config-warnings.mjs chore(web): silence benign config-load dep warnings in npm run dev (#1408) 2026-06-01 19:48:12 -04:00
sandbox-controller.ts Port v1.5 web dev backend (vite-hono-plugin + remote-server bootstrap) (#1321) 2026-05-18 19:22:14 -04:00
server.ts feat(auth): inject MCP_INSPECTOR_API_TOKEN into served index.html (#1378) (#1382) 2026-05-30 20:10:27 -04:00
start-vite-dev-server.ts Port v1.5 web dev backend (vite-hono-plugin + remote-server bootstrap) (#1321) 2026-05-18 19:22:14 -04:00
types.ts Port v1.5 web dev backend (vite-hono-plugin + remote-server bootstrap) (#1321) 2026-05-18 19:22:14 -04:00
vite-base-config.ts feat(servers): move oauthClientSecret and stdio env values to OS keychain (#1356) (#1360) 2026-05-26 10:33:46 -04:00
vite-hono-plugin.ts fix(dev): handle client disconnect in the dev proxy stream pump (#1418) (#1419) 2026-06-02 19:08:48 -04:00
web-server-config.ts feat(servers): persist per-server settings to mcp.json (#1352) (#1353) 2026-05-24 19:23:26 -04:00