Repository navigation
feat(labs): stop a running turn, with "Interrupted by you" and the background count (FIX-2375) - #4939
Conversation
A turn the person stopped leaves a quiet status line, Interrupted by you, with the live count of background work still running and a View. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
…th the live background count (FIX-2375) The adapter reads the session's recent turns, not only running ones, and puts a stopped entry after the last entry of each aborted turn. The thread view gains stopping (from the press until every turn it aborted has ended) and backgroundRunning (the session stream's unfinished runs). The Stop button waits while stopping, and a refused stop says why beside it. The dead interrupted entry is now the registry's request-recovery stopped line, and the contract matrix's stop rows check it on the real adapter (the FIX-2375 gap mark is gone). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
…ecord (FIX-2375) A 409 means the turn already ended, or an answer resumed it first and it runs on. The adapter reads the record: still running, the stop was refused, and the view clears Stopping and says so beside the button. The contract matrix gains that row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
…e live background count (FIX-2375) The adapter gains interrupt: it aborts each answering turn the view shows running at the press (never the board's dispatch passes), and a 409 is read against the turn's record. The conversation view gains stopping and backgroundRunning, and a stopped entry follows the last entry of each aborted turn. The composer shows Stop beside Send; Esc Esc and Cmd/Ctrl+. stop from anywhere, and the session popup spends its own Esc. The contract matrix gains the turn-stop rows on both columns, and the fake follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
…ery copies' unused reason (FIX-2375) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
…t the view hasn't read yet (FIX-2375) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
…-2375) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Second look + architecture notesRead the diff against the base ( 1. The same stop lifecycle is hand-written twice (worth extracting, modestly)
That 409-versus-record rule is the subtle part of this change (it's the bug the PR exists to fix), and it now has two copies that must stay in lockstep. A small shared helper, e.g. 2. Teammates'
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bbe9b5bed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…e outlives the recent-requests read (FIX-2375) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
…he stop keys see it (FIX-2375) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
…t alone (FIX-2375) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 815410b1ea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…en when its read answers late (FIX-2375) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
|
Process guards: Generated by Claude Code |
Keeps main's renames, the failed turn and Retry, the shared session overlay and the lead wording, with FIX-2375's stop behaviour on top. The Teammates popup's Esc handling now lives in the registry overlay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
… (FIX-2375) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
The registry's stopped look is described in the registry entry and the lab READMEs; the site page and the ui README change in the release docs PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
Code Review ✅ Approved 3 closed / 3 findings🟡 Medium risk · Adding Stop to both labs aborts active turns while spawned tasks continue, so users could lose an in-progress response while background work remains. Adds a stop control to the Claude Code-style and Teammates labs that interrupts running turns, shows an "Interrupted by you" line with a background task count, and handles 409 aborts by reading the turn's record. Resolved this session: stale half-written turns no longer leave Stopping… stuck, the stopped line persists after its request leaves the read window, and Esc in the ⌘K switcher closes the popup beneath it instead of the switcher. No open issues found. ✅ 3 closed✅ Bug: Old half-written turns get into Stop's ids and leave Stopping… stuck
✅ Edge Case: "Interrupted by you" disappears once its request leaves the read window
✅ Bug: Esc in the ⌘K switcher now closes the popup under it, not the switcher
VerificationRules No rules evaluated Functional validation Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Requested by Jake · project thread
FIX-2375: Stop a running turn, with clear feedback afterwards
Problem
In the Claude Code-style and Teammates labs, you can't cleanly stop a turn that is running. Even where an abort reaches the server, the conversation doesn't show that the turn was stopped or that stopping is in progress. It also doesn't show that background work the turn started is still running. Before this change, a 409 from the abort route could be mistaken for a successful stop.
What changes
@flow-state-dev/uiregistry,request-recovery. Adds astoppedlook. It reads "Interrupted by you" and, while background work runs, adds "· N background task(s) still running" and a View button. It usesrole="status"anddata-state="stopped". The existing recovery look is unchanged.ThreadEntrykindstopped.ThreadView.stoppingandThreadView.backgroundRunning(from the session feed'sruns).interruptaborts the turns that are running when you press Stop.stoppingclears once every aborted turn has ended.in_progressclears stopping and shows "Not stopped: …".useInterruptKeys).ConversationViewand addsLabAdapter.interrupt.dispatch.sessionFeed.watchRuns, which reports nothing until the count is known.src/components/flow-state/.packages/uiis private, so there is no changeset; the spec's docs line names the page).session-overlay, which main moved to;popup-escape.test.tsxruns against it.it.failsgap marks become passing tests.Evidence
check-retired-terms, the vocabulary sweep,fallow:ciandvalidate-user-docs-scopepass.pnpm --filter @flow-state-dev/ui testpassed 342/342 before the merge. Before the change, the new describe failed 3 of 16.vitest runpassed 26 files / 192 tests. Contract red controls:vitest runpassed 27 files / 207 tests, contract 24/24. Red controls:pnpm fallow:ciis clean.check-new-dead-codeagainst the base reports no issues.check-retired-termspasses.Not done
packages/uiis private.it.failsfor the fake column: "stops only the turns answering at the press: a line sent after it runs on" (FIX-2376 owns the mid-turn line).Notes for review
runs; they come back asonMessageReceivedturns, and Stop aborts those turns while they wait, per the spec's "everything but dispatch".https://claude.ai/code/session_01NczDiF6MmQeZ9KUe2E41Up
Generated by Claude Code