fix: always send stop on ESC regardless of cached state

Removes the activeState !== 'idle' check before sending the stop
command. The server-side Interrupt() is safe to call on an idle
agent (returns false, no-op).

This fixes an intermittent issue where pressing ESC wouldn't stop
the agent because the GUI's cached activeState was stale/out-of-sync
with the server's actual state.
This commit is contained in:
Levi Neely 2026-08-04 11:51:01 +02:00
parent 9d059943f2
commit ec89eaae18
1 changed files with 4 additions and 1 deletions

View File

@ -64,7 +64,10 @@ ApplicationWindow {
onActivated: { onActivated: {
if (renamingIndex >= 0) { if (renamingIndex >= 0) {
cancelRename() cancelRename()
} else if (ollie.activeState !== "idle") { } else {
// Always send stop - server-side Interrupt() is safe to call
// on an idle agent (no-op). This avoids races where the GUI's
// cached activeState is stale.
ollie.interrupt() ollie.interrupt()
} }
} }