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.
This commit is contained in:
@@ -1563,6 +1563,11 @@ const startGlobalEventWatcher = async () => {
|
|||||||
buffer = buffer.slice(separatorIndex + 2);
|
buffer = buffer.slice(separatorIndex + 2);
|
||||||
const payload = parseSseDataPayload(block);
|
const payload = parseSseDataPayload(block);
|
||||||
void maybeSendPushForTrigger(payload);
|
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) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user