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"