From ec89eaae1876500509395253c58972309c6ce968 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Tue, 4 Aug 2026 11:51:01 +0200 Subject: [PATCH] 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. --- gui/main.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/main.qml b/gui/main.qml index 5f44402..b6d74db 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -64,7 +64,10 @@ ApplicationWindow { onActivated: { if (renamingIndex >= 0) { 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() } }