operator control: /cancel slash command + cancel button

new POST /api/cancel on the per-agent web UI: shells out
pkill -INT claude (procps added to harness-base.nix). emits a Note
on the bus so the operator sees the cancel landed; state goes back
to idle when run_claude wakes and emits TurnEnd as usual.

frontend:
- /cancel slash command in the terminal input
- ■ cancel turn button in the state row, visible only while
  state === 'thinking' (driven from the same SSE-based state
  machine). disabled briefly during the POST.

claude gets SIGINT (not TERM) so it flushes anything in-flight and
emits a final result row before exiting.
This commit is contained in:
müde 2026-05-15 19:45:37 +02:00
parent de09503b59
commit 300be8afa9
6 changed files with 83 additions and 3 deletions

View file

@ -15,6 +15,7 @@
<div id="state-row">
<span id="state-badge" class="state-badge state-loading">… booting</span>
<button type="button" id="cancel-btn" class="btn-cancel-turn" hidden>■ cancel turn</button>
</div>
<div class="terminal-wrap">