Repository navigation
Playground: drop a save poll once its editor page is gone, so Save does not wait on it - #1955
Merged
Merged
Conversation
The playground's service worker now posts playground-fs-closed on a held save poll's channels when its page's request aborts or its client is gone, and the window aborts the poll's closed signal, so the host's next Save is not handed to a page that will never answer. Closes #1953
Deploying mouseterm with
|
| Latest commit: |
125137d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a353e6a9.mouseterm.pages.dev |
| Branch Preview URL: | https://fix-issue-1953.mouseterm.pages.dev |
This was referenced Nov 30, 2026
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.
In the website playground, a save poll from an editor page that was reloaded or closed stayed in
editorPages' waiting set for up to 20 s, because the relayed request carried noclosedsignal. The host's next Save asked that dead waiter, nothing answered, and the round failed after 10 s with "The editor did not finish saving in time."The relay now carries the page's departure through:
website/public/playground-fs/sw.js): while asave-pollis held, it postsplayground-fs-closedon the request's channels when the request's signal aborts, or whenclients.get(clientId)no longer finds the page (checked each second, for browsers whose request signal does not abort).sw-relay.tsrespond): that message aborts anAbortControllerwhose signal becomes the request'sclosed, whicheditorRoutesalready hands topages.poll. The dropped poll answers empty and leaves the waiting set.A new test in
playground-fs.test.tsrelays asave-poll, posts the closed message, and expects the poll to answer{}and the nexthostRequestto fail within the 1 s grace with "The editor is not connected." Before the change it timed out with the poll still held. The worker side has no automated test and has not been run in a browser. In particular, whetherclients.getstops finding a reloaded frame's client within the check interval is unconfirmed.docs/specs/tutorial.mdstates the new worker rule, and its word budget is ratcheted to fit.A save asked within the same second the page goes away can still reach the dead poll before the check notices, where the request signal does not abort. The Pocket frame tunnel question in the issue is untouched.
Closes #1953 — automated triage