mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-12-05 11:15:01 +03:00
Integrate `packages/common/store` (`affine-store`) into the unified `packages/frontend` workspace and close cross-client compatibility and crash-recovery invariants against `0.27.5`: - Encode page creation identity via `PageIdSource` and `CreateDocId` (`DerivedFromOp` vs `Explicit`), derive deterministic 10-character URL-safe NanoIDs from `(space_id, op_id)` without sidecar tables or extra keys in shared Yjs `meta.pages`, and reject `page_id` collisions with the root `space_id`. - Keep `DocMode::Page` writing only the root document, require `db$docProperties` to be resolved before non-`Page` creation (returning `StoreError::DbTableNotResolved` so retry intent survives restarts), gate explicit non-`Page` crash-replay backfill on a client-local `export_explicit_create_journal` / `import_explicit_create_journal` record so legacy `0.27.5` pages without `DocProperties` rows keep `DocMode::Page`, preserve existing live or soft-deleted `DocProperties` rows independently of root page repair, and start `SqliteDocStorage::push_updates_batch` with `BEGIN IMMEDIATE` to prevent `SQLITE_BUSY_SNAPSHOT` on pooled WAL connections. - Capture unacknowledged `in_flight` and deferred `JoinDocs` updates in `SpaceSyncEngine::snapshot()` ahead of `offline_queue` while keeping live local writes gated on `waiting_for_id_converter`. - Wire `vars.NP_ALLOW_PERF_BOOTSTRAP` in `native-playground.yml` and document the three `perf/accepted.json` lifecycle actions in `packages/frontend/AGENTS.md`.