Skip to content

feat(framework): a dashboard Stop button to interrupt the run (#218)#219

Merged
suleimansh merged 1 commit into
mainfrom
feat/dashboard-stop-button
Jul 4, 2026
Merged

feat(framework): a dashboard Stop button to interrupt the run (#218)#219
suleimansh merged 1 commit into
mainfrom
feat/dashboard-stop-button

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Makes the dashboard interactive: a Stop button interrupts the running build from the browser, not just from the terminal. Closes #218 (part of #110; first interactive slice of #165's web client, unblocked by the own-shell-vs-opencode decision since this is a control on our own dashboard).

How it works

  • startDashboard gains an onStop option; a new POST /stop route invokes it (405 for a non-POST so a stray GET can't interrupt; 404 when stopping isn't wired).
  • The CLI creates one AbortController, passes its signal to runFramework, and wires onStop to controller.abort(). runFramework checks the signal between phases and the driver honours it mid-turn (SIGTERM to the current agent turn), so a stop lands promptly.
  • A stop is a clean end, not a failure: the end event gains a stopped flag, the CLI prints ■ Stopped and exits 0, the dashboard shows a stopped status, and the persisted run records status: "stopped" so --resume shows it stopped. The page hides the button on a read-only --resume view.

Verified

  • Server: POST /stop calls onStop (202); GET -> 405; no handler -> 404; page ships the button + STOPPABLE flag.
  • End-to-end: aborting mid-run (at the architect phase) yields end{stopped:true} and a persisted status: "stopped".
  • 89 tests pass (7 new).

The dashboard was a one-way display; you could only interrupt from the terminal.
Add a Stop button that aborts the run from the browser: a POST /stop route calls
an onStop handler wired to the run's AbortController, which runFramework checks
between phases and the driver honours mid-turn (kills the current agent turn).

A stop ends cleanly as 'stopped', not 'failed': the end event gains a stopped
flag, the CLI prints '■ Stopped' and exits 0, the dashboard shows a stopped
status, and the persisted run records status 'stopped' so --resume reflects it.
startDashboard gains an onStop option; the page hides the button when stopping
is not wired (a read-only --resume view).

Part of #110. Closes #218.
@suleimansh suleimansh added enhancement New feature or request priority: medium Worth doing, not urgent labels Jul 4, 2026
@suleimansh suleimansh self-assigned this Jul 4, 2026
@suleimansh suleimansh merged commit 16f6bb8 into main Jul 4, 2026
2 checks passed
@suleimansh suleimansh deleted the feat/dashboard-stop-button branch July 4, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Worth doing, not urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard: a Stop button to interrupt the running build

1 participant