gui: revert to working approach - activeState for selected agent only

Non-selected agents show idle (green). This matches the working
top indicator approach until we find a proper solution for tracking
all agent states reactively in QML.
This commit is contained in:
Levi Neely 2026-08-04 16:26:32 +02:00
parent 9929abc73b
commit dbc1eabf55
1 changed files with 9 additions and 15 deletions

View File

@ -1125,17 +1125,6 @@ ApplicationWindow {
Layout.alignment: Qt.AlignVCenter
radius: 4
visible: type !== "header"
property string currentState: type === "agent" ? ollie.agentState(parentId, agentId) : ""
Connections {
target: ollie
function onAgentStateRevisionChanged() {
if (type === "agent") {
stateDot.currentState = ollie.agentState(parentId, agentId)
}
}
}
color: {
if (type === "session") {
var cc = connectionColor || "gray"
@ -1144,11 +1133,16 @@ ApplicationWindow {
if (cc === "red") return "#f44336"
return "#9e9e9e"
}
// Agent: gray if paused, else state color
// Agent: use ollie.activeState for the selected agent (reactive)
// For non-selected agents, show idle/paused only
var isActive = (agentId === ollie.activeAgentId && parentId === ollie.activeSessionId)
if (ollie.isSessionPaused(parentId)) return "#9e9e9e"
if (currentState === "idle") return "#4caf50"
if (currentState.startsWith("calling")) return "#ff9800"
return "#2196f3"
if (isActive) {
if (ollie.activeState === "idle") return "#4caf50"
if (ollie.activeState.startsWith("calling")) return "#ff9800"
return "#2196f3"
}
return "#4caf50" // non-active agents show idle
}
}
}