Remove sidebar state dot indicators
This commit is contained in:
parent
dbc1eabf55
commit
9f3f962567
29
gui/main.qml
29
gui/main.qml
|
|
@ -1116,35 +1116,6 @@ ApplicationWindow {
|
||||||
visible: modelIndex !== renamingIndex
|
visible: modelIndex !== renamingIndex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// State dot (hidden for headers)
|
|
||||||
Rectangle {
|
|
||||||
id: stateDot
|
|
||||||
Layout.preferredWidth: 8
|
|
||||||
Layout.preferredHeight: 8
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
radius: 4
|
|
||||||
visible: type !== "header"
|
|
||||||
color: {
|
|
||||||
if (type === "session") {
|
|
||||||
var cc = connectionColor || "gray"
|
|
||||||
if (cc === "green") return "#4caf50"
|
|
||||||
if (cc === "yellow") return "#ffca28"
|
|
||||||
if (cc === "red") return "#f44336"
|
|
||||||
return "#9e9e9e"
|
|
||||||
}
|
|
||||||
// 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 (isActive) {
|
|
||||||
if (ollie.activeState === "idle") return "#4caf50"
|
|
||||||
if (ollie.activeState.startsWith("calling")) return "#ff9800"
|
|
||||||
return "#2196f3"
|
|
||||||
}
|
|
||||||
return "#4caf50" // non-active agents show idle
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
highlighted: (type === "agent" && agentId === ollie.activeAgentId && parentId === ollie.activeSessionId)
|
highlighted: (type === "agent" && agentId === ollie.activeAgentId && parentId === ollie.activeSessionId)
|
||||||
|
|
|
||||||
|
|
@ -212,9 +212,7 @@ void Ollie9pClient::handleEvent(const QString &eventLine)
|
||||||
const QString aidStr = agentId.toString();
|
const QString aidStr = agentId.toString();
|
||||||
const QString key = agentKey(sidStr, aidStr);
|
const QString key = agentKey(sidStr, aidStr);
|
||||||
m_agentStateValues[key] = payloadStr;
|
m_agentStateValues[key] = payloadStr;
|
||||||
++m_agentStateRevision;
|
|
||||||
emit agentStateChanged(sidStr, aidStr, payloadStr);
|
emit agentStateChanged(sidStr, aidStr, payloadStr);
|
||||||
emit agentStateRevisionChanged();
|
|
||||||
emit activeStateChanged();
|
emit activeStateChanged();
|
||||||
} else {
|
} else {
|
||||||
// Non-active agent: need to check cache
|
// Non-active agent: need to check cache
|
||||||
|
|
@ -228,9 +226,7 @@ void Ollie9pClient::handleEvent(const QString &eventLine)
|
||||||
if (it != m_agentStateValues.end() && it.value() == payloadStr) return;
|
if (it != m_agentStateValues.end() && it.value() == payloadStr) return;
|
||||||
|
|
||||||
m_agentStateValues[key] = payloadStr;
|
m_agentStateValues[key] = payloadStr;
|
||||||
++m_agentStateRevision;
|
|
||||||
emit agentStateChanged(sidStr, aidStr, payloadStr);
|
emit agentStateChanged(sidStr, aidStr, payloadStr);
|
||||||
emit agentStateRevisionChanged();
|
|
||||||
}
|
}
|
||||||
} else if (agentAction == QLatin1String("new") || agentAction == QLatin1String("kill")) {
|
} else if (agentAction == QLatin1String("new") || agentAction == QLatin1String("kill")) {
|
||||||
refreshSessions();
|
refreshSessions();
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ class Ollie9pClient : public QObject
|
||||||
Q_PROPERTY(bool rootModelsLoaded READ rootModelsLoaded NOTIFY rootModelsLoadedChanged)
|
Q_PROPERTY(bool rootModelsLoaded READ rootModelsLoaded NOTIFY rootModelsLoadedChanged)
|
||||||
Q_PROPERTY(QString currentBackend READ currentBackend WRITE setCurrentBackend NOTIFY currentBackendChanged)
|
Q_PROPERTY(QString currentBackend READ currentBackend WRITE setCurrentBackend NOTIFY currentBackendChanged)
|
||||||
Q_PROPERTY(bool daemonConnected READ daemonConnected NOTIFY daemonConnectedChanged)
|
Q_PROPERTY(bool daemonConnected READ daemonConnected NOTIFY daemonConnectedChanged)
|
||||||
Q_PROPERTY(int agentStateRevision READ agentStateRevision NOTIFY agentStateRevisionChanged)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Ollie9pClient(QObject *parent = nullptr);
|
explicit Ollie9pClient(QObject *parent = nullptr);
|
||||||
|
|
@ -53,7 +52,6 @@ public:
|
||||||
bool rootModelsLoaded() const { return m_rootModelsLoaded; }
|
bool rootModelsLoaded() const { return m_rootModelsLoaded; }
|
||||||
QString currentBackend() const { return m_currentBackend; }
|
QString currentBackend() const { return m_currentBackend; }
|
||||||
bool daemonConnected() const { return m_daemonConnected; }
|
bool daemonConnected() const { return m_daemonConnected; }
|
||||||
int agentStateRevision() const { return m_agentStateRevision; }
|
|
||||||
Q_INVOKABLE QString agentState(const QString &sessionId, const QString &agentId) const;
|
Q_INVOKABLE QString agentState(const QString &sessionId, const QString &agentId) const;
|
||||||
Q_INVOKABLE QString sessionConnectionColor(const QString &sessionId) const;
|
Q_INVOKABLE QString sessionConnectionColor(const QString &sessionId) const;
|
||||||
Q_INVOKABLE void setCurrentBackend(const QString &backend) {
|
Q_INVOKABLE void setCurrentBackend(const QString &backend) {
|
||||||
|
|
@ -94,7 +92,6 @@ signals:
|
||||||
void activeAgentIdChanged();
|
void activeAgentIdChanged();
|
||||||
void activeStateChanged();
|
void activeStateChanged();
|
||||||
void agentStateChanged(const QString &sessionId, const QString &agentId, const QString &state);
|
void agentStateChanged(const QString &sessionId, const QString &agentId, const QString &state);
|
||||||
void agentStateRevisionChanged();
|
|
||||||
void chatReceived(const QString &text);
|
void chatReceived(const QString &text);
|
||||||
void rootBackendsLoadedChanged();
|
void rootBackendsLoadedChanged();
|
||||||
void availableBackendsChanged();
|
void availableBackendsChanged();
|
||||||
|
|
@ -135,7 +132,6 @@ private:
|
||||||
|
|
||||||
// Agent state cache — updated via delta events
|
// Agent state cache — updated via delta events
|
||||||
QHash<QString, QString> m_agentStateValues;
|
QHash<QString, QString> m_agentStateValues;
|
||||||
int m_agentStateRevision = 0;
|
|
||||||
|
|
||||||
// Streaming FSMs — each wraps a QProcess lifecycle
|
// Streaming FSMs — each wraps a QProcess lifecycle
|
||||||
StreamFsm *m_chat = nullptr; // Oneshot — reads agent chat log
|
StreamFsm *m_chat = nullptr; // Oneshot — reads agent chat log
|
||||||
|
|
|
||||||
Reference in New Issue