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 e88ee8e9fe feat(web): add GPU recovery, canvas selection menu, lazy PDF client, and zero-3p-JS gate
Add WebGL2 context loss recovery, epoch-guarded async restore, single-flight fallback locking, and WebGPU canvas compositing to the Web Mobile host.
Flush pending IndexedDB writes before legacy shell navigation and recreate a visible retry banner on flush failure.

Add canvas-drawn selection highlights, teardrop handles, pointerup action triggers, and selection-guarded clipboard actions.
Add a lazy hayro PDF worker client with crash recovery, clamped scale rendering, transfer-safe deduplication, and asset root pinning.
Add a static zero-third-party-JS gate script and wire both web host gates into mobile CI.
2026-11-27 06:55:48 +09:00
DarkSky 0036df69b5 fix(frontend): close S2.1 parity gaps across editor, web, and CI
Close the S2.1 parity and review items across the editor, web host,
and CI workflows.

- Add affine:latex block layout and the equation editor popover.
- Support Space and Enter triggers, inline rendering, click-to-edit
  chips, IME commit on Done, and Web slash copy.
- Guard open equations with zero-width CRDT identity checks and skip
  writes when closing an unchanged equation.

- Align web sign-in OTP validation, resend state, anti-reentry,
  cross-Back cooldown, preflight races, and initial OTP errors.
- Align step-bound email submit, deployment Terms display, and native
  Chromium discovery in verify-idb-real-browser.

- Key WebTextSystem Canvas fallback descriptors by logical font ID so
  static single-face fonts preserve requested weights.
- Keep Release LTO active for s1-probes-bench in np-mobile.yml.
2026-11-27 06:55:48 +09:00
DarkSky b1fdf08a73 feat(web-host): add IDB v3/V1 bridge, auth routes, and a11y tree
Add the same-origin IndexedDB v3 (12 object stores, frozen version 3),
V1 read-only fallback, and BroadcastChannel bridge in `src/idb-storage.js`.
Keep local workspace enumeration strictly on `localStorage['affine-local-workspace']`
and commit pending CRDT writes before navigation or handoff.

Complete standalone authentication routes (`/sign-in`, `/magic-link`,
`/oauth/*`, `/redirect-proxy`, and `/open-app/*`) in `src/sign-in.js`
with `x-affine-client-kind: web`, double-submit CSRF headers, single-use
code guards, and on-demand Turnstile loading.

Add the first-frame write-only ARIA semantic subtree in `src/a11y.js`
with incremental attribute patching and mutual focus exclusion across
`#a11y-tree`, `#ime`, and `#embed-layer`.
2026-11-27 06:55:48 +09:00
DarkSky ed72cca4a3 feat(mobile): deliver S1 thin hosts, Mermaid font measurer, and release probes
Add thin Web, iOS, and Android mobile hosts, harden the blocksuite-preview
Mermaid renderer and Wasm exports, and add S1 release performance probes
with CI artifact and native host linking gates.

- Preview: use FontPoolWidthMeasurer with variable-font HVAR weight
  instantiation, integer pixel ceil widths, front-matter theme injection,
  high-contrast Light and Dark palettes, premultiplied RGBA PNG compositing,
  and Wasm theme parameters.
- Probes and CI: add s1_sqlite_probe and s1_probes release tests, record
  measured latency and peak RSS in BENCHMARK.md, add timeout-minutes on all
  np-mobile jobs, upload s1-probes-artifacts, and link Android NDK .so,
  kotlinc Activity, and iOS Simulator swiftc executable in CI.
- Web host: use an offscreen canvas GPU probe, add OAuth redirect-loop and
  runtime GPU loss guards, restrict embed URLs and sandbox tokens, match
  /api/auth/captcha Turnstile headers, and launch four independent ES module
  Blob workers pinned to site root.
- iOS host: add affine-ios-host staticlib crate implementing all C-ABI
  functions with surrogate-pair safe UTF-16 editing, weak DisplayLinkProxy,
  absolute ime_bottom contract, and in-memory LegacyCapacitorSchemeHandler.
- Android host: implement hand-written JNI bridge with absolute ime_bottom
  logical-dp conversion, predictive and legacy back gesture handling, and a
  pure Android platform SDK MainActivity and LegacyLocalStorageProbe.
2026-11-27 06:55:47 +09:00