mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-12-05 11:15:01 +03:00
Read and write each workspace through its IndexedDB v3 store. Keep document edits and deletions in order across retries and reloads. Seed empty workspaces under the startup lock and release it if a write cannot start or the connection closes. Wait for pending transactions and read the stored clocks before each retry. Cancel queued retries when the connection closes. Compact a document only when its snapshot and all source updates still match.