fix(syncguard): preserve bypass during duplicate resume

This commit is contained in:
Artem Ovchinnikov committed 2026-10-21 21:49:24 +03:00
1 parent bc185d8bd0
commit 8381462950
2 files changed
+18

No files matched your search

+5
View File
@@ -66,6 +66,11 @@ export function useSyncGuardFeature(host: LiveSyncCore, createOverlay: SyncGuard
guard.disable();
return;
}
// A duplicate resume in the same active catch-up must honour a user's
// explicit decision to continue editing rather than silently re-lock.
if (guard.wasBypassed && services.replicator.couchDbCatchUpActivityCount.value > 0) {
return;
}
// Duplicate resume notifications or a visibility transition must not discard an
// already active guard and expose a partly reflected Vault to the user.
if (guard.presentation.phase === "transferring" || guard.presentation.phase === "applying" ||