From 670d759769ae6d6acd094cbc23b97485be527080 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Tue, 4 Aug 2026 16:24:10 +0200 Subject: [PATCH] gui: use revision inside binding expression for proper dependency tracking --- gui/main.qml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gui/main.qml b/gui/main.qml index 8980271..6d631ba 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -1125,10 +1125,7 @@ ApplicationWindow { Layout.alignment: Qt.AlignVCenter radius: 4 visible: type !== "header" - // Bind to revision so we re-evaluate when any agent state changes - property int _rev: ollie.agentStateRevision color: { - void(_rev) // force dependency if (type === "session") { var cc = connectionColor || "gray" if (cc === "green") return "#4caf50" @@ -1136,9 +1133,11 @@ ApplicationWindow { if (cc === "red") return "#f44336" return "#9e9e9e" } - // Agent: gray if paused, else state color + // Agent: gray if paused, else state color from map + // Revision forces re-eval when any state changes + var rev = ollie.agentStateRevision if (ollie.isSessionPaused(parentId)) return "#9e9e9e" - var s = ollie.agentState(parentId, agentId) + var s = rev >= 0 ? ollie.agentState(parentId, agentId) : "idle" if (s === "idle") return "#4caf50" if (s.startsWith("calling")) return "#ff9800" return "#2196f3"