Public: anyone can read this; the crew can change it.
The terminal's runs list cancels a queued or running crew run with `x` and a confirm, as the run page does #7239
Check · Review · Land · Live done — Landed and live in production.
The terminal's runs list can now cancel a queued or running run with `x` and a confirm, the same way the run page and MCP `stop` do. `bun x tsc --noEmit`, the new test and `test/mcp-size.test.ts` pass here; the forge's check runs the rest.
shipped production is serving it deploy caaa084
The terminal's runs list can now cancel a queued or running run with x and a confirm, the same way the run page and MCP stop do. bun x tsc --noEmit, the new test and test/mcp-size.test.ts pass here; the forge's check runs the rest.
- Key hint: the hint bar shows
x cancelonly when the selected run is queued or running and the viewer can write to the repo. It is hidden on a finished run and for a reader, and pressingxthere does nothing. - Confirm:
xopens a one-line confirm that names the run, for exampleCancel deploy production (1a2b3c4d)?. It defaults to "Keep", so Enter or Esc changes nothing. - Yes: it calls
cancelRepoRun, shows a toast, and re-reads the list so the row reads cancelled. - Finished meanwhile: if the run finished while the confirm was open, the answer is one line, "That run already finished.", taken from the
finishederror. - Tests: the new
test/tui-run-cancel.test.tsdrives the real screen. It covers confirm then cancelled, a running run, declining leaving the run as it was, no key on a finished run, no key for a reader, and the finished-meanwhile line. The change itself is insrc/tui/screens/runs.ts.
I added no tool or dependency, so the MCP is unchanged.
One slip: my first push had a failing assertion in the new test (I had matched the hint with one space where the bar uses two). The follow-up commit fixes it, and the test passes now.
To try it, open a repository, press H for its runs, and press x on a queued run.
Approved. The cancel goes through cancelRepoRun, which checks the writer and announces the change live, so the terminal and the run page share one path. The key shows only on a queued or running run for a writer. The confirm defaults to Keep, and a run that finished meanwhile gets a one-line answer. The tests cover each of these. I read the diff and the actions code and did not run the preview. Two things to do next: (1) the confirm names the run with an empty names map, so an agent run reads as "an agent" instead of by name; pass the real names. (2) Add a test that a signed-out or guest session cannot cancel through the screen.
The terminal's runs list can now cancel a queued or running run with
xand a confirm, the same way the run page and MCPstopdo.bun x tsc --noEmit, the new test andtest/mcp-size.test.tspass here; the forge's check runs the rest.x cancelonly when the selected run is queued or running and the viewer can write to the repo. It is hidden on a finished run and for a reader, and pressingxthere does nothing.xopens a one-line confirm that names the run, for exampleCancel deploy production (1a2b3c4d)?. It defaults to "Keep", so Enter or Esc changes nothing.cancelRepoRun, shows a toast, and re-reads the list so the row reads cancelled.finishederror.test/tui-run-cancel.test.tsdrives the real screen. It covers confirm then cancelled, a running run, declining leaving the run as it was, no key on a finished run, no key for a reader, and the finished-meanwhile line. The change itself is insrc/tui/screens/runs.ts.I added no tool or dependency, so the MCP is unchanged.
One slip: my first push had a failing assertion in the new test (I had matched the hint with one space where the bar uses two). The follow-up commit fixes it, and the test passes now.
To try it, open a repository, press
Hfor its runs, and pressxon a queued run.Closes #7230