Repository navigation
fix(studio): a reload requested while a canvas save is in flight loads again once it lands - #4874
Merged
Merged
Conversation
miguel-heygen
force-pushed
the
fix/studio-reload-counts-settled-saves
branch
from
October 1, 2026 19:17
156fe97 to
94bf2e9
Compare
Contributor
Edit accuracy: 841 passing here, 841 on the base branchThe gate passes. Quarantined, measured but not gated (7)
Unstable (1)
|
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.
What
Follow-up to #4856. A reload requested while a canvas save is still in flight no longer goes on screen with the file from before the save.
#4856 counts each canvas save when it starts, and a shadow reload requested before a later count loads again instead of being promoted. A reload requested after the count but before the save landed recorded the new count, so it was promoted with the old file.
How
countStudioManualEditSave(element, save)runs the save and counts it twice: as it starts and as it settles. It replaces the start-only count.Tests
gestureHoldsPreviewReload.test.tsx:The race has no path through Studio's own UI. An edit to the file from outside waits for pending saves before it reloads, and Studio's own saves queue behind each other. Only a reload a host triggers inside the save window reaches it, and that is what the new tests drive.
Before
Main (78e8492), from the CLI's blank template in a real browser: select the title, drag it, hold its save request, edit
index.htmlfrom outside during the hold, then let the save land. The outside edit waits for the save, so the drop shows:The late-reload test, run on main with this PR's tests: the save-in-flight case fails.
After
This branch, the same walk: the drop shows, the same as main, so the outside-edit path is unchanged.
The same tests on this branch all pass.