You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(studio): serialize caption saves so an older body cannot win
Each save() captured its own body but nothing stopped two PUTs being in
flight at once, and both raced the shared versionRef. The common ordering
self-heals (the older lands first, the newer 409s, adopts the version and
retries), but if the two reorder, or the older one's adopt-and-retry lands
last, the older body is written and the newer edit is silently lost. It
needs a slow save overlapping a fresh edit, so it is off the common path,
but it is real data loss.
Saves now run one at a time. A save requested while one is in flight
replaces any already-queued attempt instead of stacking, so the next PUT
always carries the newest body and no edit is dropped on the way.
Also throw StudioSaveNetworkError rather than a plain Error on fetch
rejection, so retryStudioSave's network-retry path applies to captions the
way it already does in useFileManager.
0 commit comments