From 457a6a55dc9ab06c7e9eced3a3885c25b19367a7 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Tue, 4 Aug 2026 16:17:11 +0200 Subject: [PATCH] gui: use explicit properties for agent state dot binding Create agentState and isPaused properties to ensure proper binding updates when model roles change via setProperty --- gui/main.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gui/main.qml b/gui/main.qml index 114e778..e0b99ab 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -1125,6 +1125,8 @@ ApplicationWindow { Layout.alignment: Qt.AlignVCenter radius: 4 visible: type !== "header" + property string agentState: (type === "agent") ? (state || "idle") : "" + property bool isPaused: (type === "agent") ? (parentPaused === true) : false color: { if (type === "session") { // Session: RPC connection health @@ -1135,11 +1137,10 @@ ApplicationWindow { return "#9e9e9e" } // Agent: gray if parent session is paused - if (parentPaused === true) return "#9e9e9e" + if (isPaused) return "#9e9e9e" // Agent: use state role from model - var s = state || "idle" - if (s === "idle") return "#4caf50" - if (s.startsWith("calling")) return "#ff9800" + if (agentState === "idle") return "#4caf50" + if (agentState.startsWith("calling")) return "#ff9800" return "#2196f3" } }