Skip to content

fix(ui): Stop no longer pretends to cancel an import already on the server (#188) - #218

Merged
amar-python merged 1 commit into
mainfrom
claude/issue-188-honest-stop
Nov 9, 2026
Merged

amar-python merged 1 commit into
mainfrom
claude/issue-188-honest-stop

Conversation

@amar-python

Copy link
Copy Markdown
Owner

Part of #188. Takes option (a) from the issue; option (b), true server-side cancellation, stays with M6 staged imports (#110), so I haven't closed the issue.

Problem

The UI created an AbortController but never gave its signal to the request. After Stop, the server still finished the import while the row said "Cancelled" and the result was discarded.

Change

  • Stop is offered only before the request is sent (reading, uploading), where it is true: nothing has reached the server.
  • Once sent, the row says "Sent to the server; it can't be stopped now" instead of offering Stop.
  • The server's result is always shown, never discarded, so an import that completes is visible.
  • canStop() in job-outcome.ts holds the rule, so the button and the tests share it.

Tests

  • The old test asserted the misleading behaviour ("Stop … ignores the late result"). Replaced with one that checks there is no Stop once the request is in flight and the late result shows as "Imported", not "Cancelled".
  • canStop unit test for every status.
  • vitest 160/160, tsc clean, no new lint errors beyond the existing formatting baseline.

React stopgap: the Streamlit migration plan is #212.


Generated by Claude Code

…erver (#188)

The UI created an AbortController but the request never used its signal:
after Stop, the server still finished the import while the row said
"Cancelled" and the result was discarded.

Take option (a) from the issue: only offer Stop before the request is
sent (reading/uploading), where it is true. Once it is sent, say so, and
always show the server's result. True server-side cancellation stays with
M6 staged imports (#110).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011T6Wqi8yaiaYWUVH8C4QAY
@amar-python
amar-python marked this pull request as ready for review November 9, 2026 10:31
@amar-python
amar-python merged commit e2146b9 into main Nov 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants