fix(web): keep global SSE alive for session list status updates#694
Open
heavygee wants to merge 1 commit into
Open
fix(web): keep global SSE alive for session list status updates#694heavygee wants to merge 1 commit into
heavygee wants to merge 1 commit into
Conversation
When a session is open, the web app now keeps an always-on all:true SSE connection for sidebar session-updated events while using a second session-scoped stream for message delivery. Also bump session activity on hub sendMessage so web-originated sends refresh list timestamps. Fixes tiann#693 Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Findings
- No issues found.
Summary
- Review mode: initial
- Reviewed the full diff at the current head. No correctness, security, regression, data-loss, performance, or maintainability issues met the reporting threshold.
- Residual risk: no integration coverage observed for the new dual SSE topology across global/session connections, visibility reporting, and toast delivery.
Testing
- Not run (automation):
bunis not installed in this runner, sobun run test:web -- useSSE appSseSubscriptionsandbun run typecheck:webcould not execute.
HAPI Bot
heavygee
added a commit
to heavygee/hapi
that referenced
this pull request
May 25, 2026
…#694 The following files were accidentally included from work intended for a separate PR (session-list-status / SSE split subscriptions) due to that branch being submitted from main rather than its own worktree branch: - web/src/App.tsx (reverted to upstream/main) - web/src/hooks/useSSE.ts (reverted to upstream/main) - web/src/hooks/useSSE.test.ts (removed — added by other branch) - web/src/lib/appSseSubscriptions.ts (removed — added by other branch) - web/src/lib/appSseSubscriptions.test.ts (removed — added by other branch) - hub/src/sync/syncEngine.ts (reverted to upstream/main) Apologies for the noise. This PR (tiann#692) is scoped to the pluggable voice backend only. via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix stale session-list spinners when the user has another session open in the web UI.
The app previously replaced its sole SSE subscription with a session-scoped stream whenever a session was selected. Cross-session
session-updatedpatches (includingthinking: false) never reached the sidebar, so background sessions could finish work but keep spinning until refresh.This change keeps an always-on
{ all: true }SSE connection for session-list and lifecycle events, and adds a second session-scoped SSE stream for message delivery when a session is open. Both streams report visibility for push fallback. HubsendMessage()now records session activity so web-originated sends refresh list timestamps.Related closed work: #470 (dual SSE fix was not merged).
Test plan
bun run typecheckcd hub && bun testcd web && bun test src/lib/appSseSubscriptions.test.ts src/hooks/useSSE.test.ts src/components/SessionList.test.tsIssues
Fixes #693