mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-12-05 11:15:01 +03:00
Remove eight duplicated or defensive code paths across affine-store, affine-client, affine-mobile, and the web, iOS, and Android hosts: - Remove explicit create recovery journals in store and client, and require WorkspaceDb::from_root_update_v1 to receive initial db$* tables at construction time instead of returning DbTableNotResolved. - Consolidate auth protocol parsing, url::Url canonicalization, legacy_storage_endpoint_key (unbracketed IPv6 for 0.27.5 storage keys), chrono RFC3339 UTC Z normalization, Bearer checks, and permanent error codes into affine_store::auth while keeping iOS and Android 0.27.5 storage formats. - Replace the duplicated legacy storage engine in affine-ios-host with affine-legacy-import, preserve malformed affine-local-workspace raw strings in one place, propagate iOS write-back serialization errors, delegate Android sentinel evaluation and probe filtering to Rust via a single JNI entry, and remove hardcoded Swift and Kotlin key lists. - Remove the pure JS Yjs v1 decoder from hosts/web/src/idb-storage.js, expose a safe Rust wasm-codec cdylib from affine-store reusing merge_crdt_updates_v1, share a strict wasm-scalar-rpc.js loader with preview workers, wire crdt-wasm-client through index.html, worker-loader, host.js, stage-preview-workers, CI, and real-browser IDB E2E, and migrate real Yjs v1 fixtures to affine-store tests. - Remove the 12-iteration blind SQLite retry loop in sqlite/doc.rs while preserving single-row empty-update registration. - Upgrade SqliteDocStorage::checkpoint_passive to return WAL counts and remove duplicate maintenance pools from iOS and Android hosts. - Remove top-level mirrored workspace fields and workspace-switch cloning in MobileAppState, and use generate_key_between for ordering. - Remove pixel-fallback selection drag paths in iOS and Android hosts so text-layout endpoints remain the single drag authority.