Files
gitmost/apps
agent_coder f815e61a8d fix(#234 review): wire Stop to server run + real autonomousRuns toggle (F1/F2/F3)
F1: the Stop button was wired only to useChat.stop() (a local SSE abort the server
ignores for a detached run), and dropping isStreaming re-armed observer-polling so the
still-running run streamed back into view. Add a client stopRun(chatId) -> POST
/ai-chat/stop; in autonomous mode Stop now also calls it (the authoritative stop). A
stoppingRun latch suppresses the observer MERGE (observedRow requires !stoppingRun) so
the stopped run's newly-persisted partial steps don't re-stream between Stop-press and
terminal settle. The latch clears only once this tab is no longer the streamer
(!localStreaming) — while streaming, the disabled run query holds the PREVIOUS turn's
terminal run in cache, which would otherwise clear the latch early and re-open the
flash on turn 2+. Latch releases on stopRun failure (view resumes) and on chat switch.
F2: give autonomousRuns a real enable path through the standard settings.ai.* toggle
(update-workspace.dto + workspace.service persist/audit + ai-provider-settings switch +
client workspace type), mirroring aiDictation. Persists to settings.ai.autonomousRuns
— the exact key the controller and ai-chat-window read.
F3: correct the pending->running comments (beginRun inserts 'running' directly;
'pending' is a reserved default never written in phase 1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 22:26:15 +03:00
..