fix(app): reconnect stale event streams - #41002
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found:fix(app): recover from a silently dead event stream (PR #39349) This PR appears to address the same or very similar issue. Both PRs focus on handling stale/dead event streams on the client side. Since PR #41002 is closing issue #40910 and PR #39349 deals with recovering from silently dead event streams, you should verify:
|
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #40910
Type of change
What does this PR do?
Adds a client-side watchdog for the global web event stream. After a stream connects, the watchdog is reset whenever an SSE event arrives. If no event or heartbeat arrives for 45 seconds, it aborts the current stream attempt so the existing reconnect loop can establish a fresh subscription.
This helps the web UI recover when a reverse proxy silently drops or stalls the
/global/eventSSE stream while the session continues running server-side.How did you verify your code works?
cd packages/app && bun test --conditions=solid --preload ./happydom.ts src/context/server-sdk.test.ts --timeout 30000bunx oxlint packages/app/src/context/server-sdk.tsx packages/app/src/context/server-sdk.test.tsgit diff --checkcd packages/app && bun run typecheckis currently blocked by the existing, unmodifiedsrc/custom-elements.d.tsfile (../../ui/src/custom-elements.d.ts), which matchesupstream/devand fails before this change is typechecked.Screenshots / recordings
N/A; this is an event-stream recovery fix.
Checklist