From b8fc64fb18014425d28a9afeed1df796e8dae3a2 Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Sat, 1 Aug 2026 21:22:33 +0200 Subject: [PATCH] gui: clicking a session clears explicit agent selection - Session row click now calls setActiveSessionId(id) - setActiveSessionId no longer returns early for same-session clicks; it always clears m_agentId and stops per-agent streams - This enforces a clean 'session selected, no agent selected' state --- gui/main.qml | 1 + gui/ollie9pclient.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/main.qml b/gui/main.qml index 3d9a27c..df3d798 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -604,6 +604,7 @@ ApplicationWindow { } if (renamingIndex >= 0) return if (type === "session") { + ollie.setActiveSessionId(id) toggleExpand(parent.modelIndex) } else if (type === "agent") { activateAgent(parentId, agentId) diff --git a/gui/ollie9pclient.cpp b/gui/ollie9pclient.cpp index 28cb7db..0309a75 100644 --- a/gui/ollie9pclient.cpp +++ b/gui/ollie9pclient.cpp @@ -49,8 +49,9 @@ Ollie9pClient::~Ollie9pClient() void Ollie9pClient::setActiveSessionId(const QString &id) { - if (m_activeSessionId == id) return; - + // Session selection must be side-effect free for per-agent streams. + // Even re-selecting the same session should clear agent selection and stop + // statewait/chat so the UI can stay in a pure "session selected" state. stopStreams(); m_activeSessionId = id; m_agentId.clear();