fix: resume SSE stream on pageshow regardless of persisted flag - #133
Merged
jeonghun-jj-lee merged 1 commit intoAug 7, 2026
Conversation
Remove the event.persisted guard from resumeStreamAfterPageShow so that start() is called on every pageshow event. VS Code webview iframes never fire pageshow with persisted=true (bfcache is a browser-only concept), leaving the SSE stream permanently stopped after a pagehide. start() is idempotent (if (started) return run), so unconditional calls are safe — no risk of duplicate SSE connections. Closes #132
4 tasks
jeonghun-jj-lee
marked this pull request as ready for review
August 7, 2026 20:05
This was referenced Aug 7, 2026
jeonghun-jj-lee
added a commit
that referenced
this pull request
Aug 7, 2026
fix: re-apply PR #133 — resume SSE stream on pageshow regardless of persisted flag
jeonghun-jj-lee
deleted the
132-fix-stuck-reconnecting-banner-after-pageshow-with-persisted=false
branch
August 7, 2026 20:46
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
Remove the
event.persistedguard fromresumeStreamAfterPageShowso thatstart()is called on everypageshowevent. VS Code webview iframes never firepageshowwithpersisted = true(bfcache is a browser-only concept), so the SSE stream was permanently stopped after apagehide.start()is idempotent (if (started) return runat line 270), so unconditional calls are safe — no risk of duplicate SSE connections.Changes
packages/app/src/context/server-sdk.tsx— removed theif (!event.persisted) returnguard; retained the_eventparameter for signature contract.packages/app/src/context/server-sdk.test.ts— updated the test to expectstart()on bothpersisted: trueandpersisted: false; added an idempotency test.Acceptance Criteria
pagehide+pageshow(withpersisted = false), the SSE stream restarts andstreamStatustransitions back to"connected"resumeStreamAfterPageShowunit test passes with the updated expectation (bothpersisted: trueandpersisted: falsecallstart())ConnectionBannershows the green "Server reconnected" flash and then hides within 3 seconds after recovery (component unchanged — already handles this)pageshowfires without a precedingpagehide(start()is idempotent — no double streams)Closes #132