From 960cdab0fe181bef4c3dfd249e66cb4fb377b300 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Wed, 28 Jan 2026 14:15:47 +0200 Subject: [PATCH] fix(web): track session activity in global SSE watcher - Update startGlobalEventWatcher to track session activity phases independently of UI, mirroring Tauri desktop behavior. - The web server now maintains an always-up-to-date activity cache by listening to SSE events continuously, even when the UI is hidden. --- packages/web/server/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/web/server/index.js b/packages/web/server/index.js index d9c0b1c4..4ed41863 100644 --- a/packages/web/server/index.js +++ b/packages/web/server/index.js @@ -1563,6 +1563,11 @@ const startGlobalEventWatcher = async () => { buffer = buffer.slice(separatorIndex + 2); const payload = parseSseDataPayload(block); void maybeSendPushForTrigger(payload); + // Track session activity independently of UI (mirrors Tauri desktop behavior) + const activity = deriveSessionActivity(payload); + if (activity) { + setSessionActivityPhase(activity.sessionId, activity.phase); + } } } } catch (error) {