Skip to content

Conversation

nornagon-openai
Copy link
Collaborator

Esc and Ctrl+C while a task is running should do the same thing. There were some cases where pressing Esc would leave a "stuck" widget in the history; this fixes that and cleans up the logic so there's just one path for interrupting the task. Also clean up some subtly mishandled key events (e.g. Ctrl+D would quit the app while an approval modal was showing if the textarea was empty).

aibrahim-oai and others added 12 commits August 24, 2025 21:39
- Add ExecCell::into_failed() to convert active spinner into a failed, completed exec cell.
- Call from interrupt and error paths to flush the active exec into history.
- Add snapshot test verifying red ✗ is rendered on interrupt, and accept snapshot.
- Introduce AppEvent::InterruptRequest and have StatusIndicator send only this event.
- Handle InterruptRequest in App by calling ChatWidget::interrupt_now().
- Make ChatWidget::interrupt_now() the single code path; Ctrl-C calls it when appropriate.
- Remove direct Op::Interrupt send from status widget to avoid duplication.
- Keep on_error() finalization as a safety net for non-UI aborts.
- Status indicator sends only Op::Interrupt via AppEvent::CodexOp.
- Remove AppEvent::InterruptRequest and UI-side finalize path for Esc.
- Ctrl-C now also only sends Op::Interrupt; UI finalizes on TurnAborted.
- Keep on_error() finalization on TurnAborted for consistent behavior.
…on/clean-up-interrupt"

This reverts commit 8c713e2, reversing
changes made to 1a6d133.
@easong-openai easong-openai merged commit e5283b6 into main Aug 26, 2025
15 checks passed
@easong-openai easong-openai deleted the nornagon/clean-up-interrupt branch August 26, 2025 03:15
@github-actions github-actions bot locked and limited conversation to collaborators Aug 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants