inspector/clients/web/src/test
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall 85c5206895 fix: cancel a Streamable HTTP call by closing its stream (#2140)
The Cancel button POSTed `notifications/cancelled` on every transport. On
a 2026-07-28 Streamable HTTP connection that is the wrong signal — the
spec makes closing the request's SSE response stream the cancellation
signal there and says the notification is neither required nor expected —
so a spec-compliant server acknowledged it 202 and dropped it while the
tool ran to completion.

The SDK already implements the fork, off `transport.hasPerRequestStream`.
Every Inspector connection is wrapped in `MessageTrackingTransport`, which
did not forward that flag, so the SDK read `undefined` and took the stdio
branch on every client — the CLI and TUI included, whose real
`StreamableHTTPClientTransport` advertises it correctly.

The web client needed three more links: its browser transport answers for
the upstream transport that lives on the backend, so it advertises the
flag for `streamable-http` and applies the SDK's `requestSignal` to its
`POST /api/mcp/send`; and `/api/mcp/send`, held open for the whole call,
forwards the browser's disconnect to the upstream `transport.send`.

The test fixture's `toWebRequest` built a Web Request with no `signal`, so
no fixture server could observe a disconnect at all — without that, a test
asserting the cancel reaches the server passes vacuously.

stdio and SSE keep `notifications/cancelled`: they multiplex every request
over one shared channel and have no per-request stream to close. So does
the legacy era, which predates the mechanism.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013hzwzS8UvBsr4yZm7o7sev
Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-28 00:55:29 -04:00
..
core fix: cancel a Streamable HTTP call by closing its stream (#2140) 2026-08-28 00:55:29 -04:00
fixtures Thread cacheMode through managed list refresh via SDK cache-aware verbs (#1721) (#1723) 2026-07-19 01:06:31 -04:00
integration fix: cancel a Streamable HTTP call by closing its stream (#2140) 2026-08-28 00:55:29 -04:00
aceEditor.ts feat(web): use the Ace JSON editor everywhere, and restore the raw-JSON toggle 2026-08-27 02:24:22 -04:00
leakedTimers.test.tsx fix(test): treat timer handles as opaque; the numeric guard never matched 2026-08-12 01:23:21 -04:00
PreviewAnnotations.stories.tsx chore(lint): enable no-floating-promises in all five ESLint scopes 2026-08-16 20:57:32 -04:00
renderWithMantine.tsx fix(a11y): make the form error color meet WCAG AA in both schemes 2026-08-23 12:56:13 -04:00
scrollAreaStoryAssertions.ts chore(lint): enable no-floating-promises in all five ESLint scopes 2026-08-16 20:57:32 -04:00
setup.ts fix(test): treat timer handles as opaque; the numeric guard never matched 2026-08-12 01:23:21 -04:00