mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-10 22:20:14 +00:00
fix(studio): enforce optimistic file concurrency (#2156)
* fix(studio): enforce optimistic file concurrency * fix(studio): harden conditional file writes * fix(studio): honor explicit file preconditions * test(producer): allow zero-ms encode timing
This commit is contained in:
@@ -133,7 +133,10 @@ export function usePreviewPersistence({
|
||||
if (!domEditSaveQueueRef.current) {
|
||||
domEditSaveQueueRef.current = createDomEditSaveQueue({
|
||||
onOpen: (event) => {
|
||||
const message = "Auto-save is paused. Check your connection.";
|
||||
const message =
|
||||
event.statusCode === 409
|
||||
? "Save paused: this file changed elsewhere. Reload and review the latest version before reapplying your edit."
|
||||
: "Auto-save is paused. Check your connection.";
|
||||
setDomEditSaveQueuePaused(message);
|
||||
showToastRef.current(message, "error");
|
||||
trackStudioEvent("save_queue_paused", {
|
||||
|
||||
Reference in New Issue
Block a user