Skip to content

Debug: Finish runs on a worker thread with progress, estimate and Stop - #397

Open
danyill wants to merge 2 commits into
mainfrom
fix/debug-finish-worker
Open

danyill wants to merge 2 commits into
mainfrom
fix/debug-finish-worker

Conversation

@danyill

@danyill danyill commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Closes #386

  • Debug ▸ Finish no longer runs the rest of the session on the GUI thread. It reuses the Terminate finalize worker.
  • StepSession.finish_all gains optional progress and should_stop hooks. They only observe, so results are unchanged, and engine tests compare runs with and without them.
  • The status bar shows run progress and the estimate. Stop and Esc keep the runs already finished. Closing the window, editing, or pressing Finish twice while it runs is handled.
  • New tests are in tests/unit/test_gui_step_finish_async.py (GUI) and the engine hook tests.

Locally: 578 passed across the 32 related test files, and 169 passed in the ordering tier. The UI sweeps, MCP end-to-end and generated-file tests were cut short locally, so CI is the first full check of those. The commit message's WIP note refers to this; it can be dropped on squash.

Finish used to run every remaining event and run on the GUI thread, so the
window froze until the last run ended (#386). It now uses the Terminate
finalize worker: StepSession.finish_all takes optional progress/should_stop
hooks (observe-only, results unchanged), the status bar shows run progress
and the estimate, and Stop/Esc/close/edit end it cleanly.

WIP: tests/integration/test_ui_sweeps.py + MCP e2e + generated-file tests
not yet confirmed (local run was cut short by a concurrent sweep run).

This branch has not been deployed

No deployments
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.

Debug ▸ Finish freezes the window: no status updates until the run ends

1 participant