fix: harden persistence tiers and opfs durability

This commit is contained in:
Youzini-afk
2026-04-14 15:43:59 +08:00
parent 246af61f6c
commit 33b8d298f7
11 changed files with 1916 additions and 438 deletions

View File

@@ -51,6 +51,12 @@ export function createGraphPersistenceState() {
pendingPersist: false,
lastAcceptedRevision: 0,
acceptedStorageTier: "none",
hostProfile: "generic-st",
primaryStorageTier: "indexeddb",
cacheStorageTier: "none",
cacheMirrorState: "idle",
persistDiagnosticTier: "none",
acceptedBy: "none",
lastRecoverableStorageTier: "none",
persistMismatchReason: "",
commitMarker: null,
@@ -63,6 +69,12 @@ export function createGraphPersistenceState() {
},
storagePrimary: "indexeddb",
storageMode: "indexeddb",
opfsWriteLockState: {
active: false,
queueDepth: 0,
lastReason: "",
updatedAt: 0,
},
dbReady: false,
indexedDbRevision: 0,
indexedDbLastError: "",