Commit Graph
6 Commits
Author SHA1 Message Date
DarkSky a6bb03e702 feat(editor): restore 0.27.5 mobile keyboard toolbar, native previews, and fold CRDT codecs 2026-11-27 08:18:25 +09:00
DarkSky 65a2c9b097 refactor(mobile): remove duplicated logic across store and hosts
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.
2026-11-27 06:55:48 +09:00
DarkSky 1bf1a4e31d feat(mobile): finish shell parity and layout fixes
Update mobile shell screens across Home, Explorer, Journals,
Settings, and Trash document pages.

- Explorer and navigation: show active documents in the All Docs root
  with wheel and native touch scroll, and keep the bottom tab bar
  fixed. Scroll Collections and Tags lists, restore scroll on back
  navigation, and add screen-reader scroll actions.

- Scoped actions and Trash: encode workspace and document IDs with a
  byte-length prefix to stop dot collisions, and require confirmation
  before permanent delete. Purge matching history entries with
  NavHistory::remove_target, replay outgoing edges on restore, and
  show a document-not-found state for missing pages.

- Journals and Settings: wrap the 7-day strip into two rows below
  364pt and use a compact landscape layout below 460pt so every day
  pill and CTA reaches 44x44pt. Separate read-only settings rows from
  toggle and cycle controls without chevrons, and use localized
  untitled titles in main landmarks and backlinks.

- Harness and tests: cover Journals and Trash in audit-matrix with
  width and height touch-target checks. Add touch, scroll, collision,
  and accessibility parity tests alongside matching gallery captures.
2026-11-27 06:55:48 +09:00
DarkSky 9a3195bf81 feat(mobile): add S3 mobile shell, breadcrumb engine, and outbound doc refs
Implement the S3-Shell deliverables across L1 to L4:
- Add read-only outbound document reference extraction in `blocksuite/crates/doc/src/refs.rs` with zero-writeback tests.
- Add baked keyframe micro-icons, domain-neutral Breadcrumb layout, and RTL mirror tests in `packages/ui/kit`.
- Add sanitized FolderForest caching, NavHistory with 128-entry cap, pure breadcrumb derivation, and LinkGraph backlinks in `packages/frontend/client`.
- Add `affine-mobile` with interactive 4-TabBar routes, 10-section Settings, Location and Trail sheet, and `mobile-harness`.
2026-11-27 06:55:48 +09:00
DarkSky 7fb559c89f fix(frontend): close S2 post-review edge cases across web, client, ios, and android
Address edge cases identified during the S2 review rounds:

- Make `extractYjsV1SubdocEntries` iterative on `origin` chains, binary-search
  merged `DeleteSet` ranges, require the trailing `DeleteSet` count on every
  update, and resolve concurrent `Y.Map` writes deterministically via YATA
  sibling ordering.
- Clear stale password and OTP inputs when returning to the email step in
  `sign-in.js`, run `/api/auth/preflight` on every email-step submit, and
  clarify the status message when email login is disabled while OAuth remains
  available.
- Guard `is_valid_rfc3339` against non-ASCII slices and invalid calendar days,
  enforce `1..=86400` `expiresIn` and non-empty token invariants in
  `StoredAuthTokenPair`, make `AuthController::load_stored_credentials`
  read-only on `HostBridge`, and add epoch-fenced session response helpers.
- Preserve same-ID `affine-cloud` `last_workspace_id` entries when removing a
  local workspace in `HostBootstrapCoordinator.swift` and `legacy_storage.rs`.
- Persist `auth-refresh-attempt:<endpoint>` digests across Android process
  restarts, preserve `FreshInstall` state across rollback write-back, surface
  legacy `affine.preferences_pb` cleanup failures from `deleteSession`, remove
  test-only JNI exports from `NativeBridge`, and gate `touch_dispatch.rs` on
  `#![cfg(feature = "harness")]`.
2026-11-27 06:55:48 +09:00
DarkSky d63b1c7d3b feat(frontend): add IDB v3/V1 store, legacy import, and L3 client core
Add the Wasm IndexedDB v3/V1 storage model, cross-tab BroadcastChannel codec,
frozen v0.27.5 REST and GraphQL request/response codecs, and SQLite inbound
sync batch persistence in affine-store.

Add the pure-Rust affine-legacy-import crate for allowlisted Capacitor WebView
localStorage parsing, positive sentinel validation, and rollback-window
writeback serialization.

Add the device-neutral affine-client L3 domain crate with HostBridge,
ServerRegistry (enforcing F3 on Web hosts), AuthController,
StoreBackedDocDirectory (closing root registration, anti-resurrection, and
restart recovery invariants), workspace domain services, exact substring
weighted search, 25-language i18n catalog, and production PlatformAccessibility
first-frame semantic root entry.
2026-11-27 06:55:48 +09:00