Add cancel control for task polling - #1729
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
829ad3a to
d471394
Compare
|
Closing: v1 is deprecated. Thank you for this contribution, and apologies for the long wait for a response. v1 will receive security fixes only. We reviewed every open v1 PR for security impact before closing — see the backlog triage in #1819 — and a small number were retained for a final If the underlying problem still exists in v2, we'd genuinely like to know. Please open an issue describing it against v2. Note that we accept external contributions as issues rather than pull requests — maintainers handle design and implementation through a prompt-driven workflow. See Thanks again for taking the time to contribute to the Inspector. |
Summary
Adds a cancel control for tool calls that are running as MCP tasks and currently being polled from the Tools tab.
Root cause
The app already exposed
tasks/cancelthrough the Tasks tab, but a user who launched a tool as a task from the Tools tab only saw the disabledPolling Task...button. The active polling task ID was not stored in a way that Tools could cancel, and the polling loop could continue intotasks/getafter a user wanted to stop it.Changes
App.pollingTaskIdandcancelTaskPollingintoToolsTab.Cancel Taskbutton while a tool task is actively polling.tasks/get/tasks/resultresponses overwriting the cancelled state.Closes #1039.
Validation
npm.cmd test -- --runTestsByPath src/__tests__/App.taskPolling.test.tsx --runInBandnpm.cmd run build-clientnpm.cmd run lintnpx.cmd prettier --check client/src/App.tsx client/src/components/ToolsTab.tsx client/src/__tests__/App.taskPolling.test.tsxgit diff --check