Commit Graph
738 Commits
Author SHA1 Message Date
DarkSky cdd89d84a5 ci(apple): gate topic-branch Apple jobs and trim macOS checks
Run the macOS and iOS jobs on topic branches only when Apple paths, manifests, CI files, or Apple target cfg lines change.
Run all Apple checks on trunk pushes, pull requests, manual runs, and diff errors.
Keep the iOS target checks, Desktop tests, Apple platform tests, and Metal render audit on macOS.
Skip the cross-platform crate test suites that Linux already runs.
2026-12-04 06:44:34 +09:00
DarkSky 671bf1e4cb ci(frontend): reuse Metal test builds and trim Wasm packages
Build the Metal harness with the test profile to reuse compiled dependencies.
Remove native build packages from the Wasm smoke test.
2026-12-04 05:04:33 +09:00
DarkSky 0bfbaf111c ci(frontend): Run harness-only tests and list iOS Simulators during the build 2026-12-04 02:28:30 +09:00
DarkSky 6fcf448695 ci(ios): stop failed jobs and record slow startup stacks
Start both Swift links and Simulator boot after Cargo.
Stop the other tasks at the first failure and keep its exit code.
Record startup timings and give the smoke stack sample its own deadline.
Sign the Simulator smoke binary to allow host stack sampling.
Use a temporary storage directory for the smoke process.
2026-12-03 21:18:50 +09:00
DarkSky a28c6e4cbd ci(frontend): skip unrelated mobile checks
Use both paths of copies and renames to classify backend and Web wrapper changes.
Keep Web host and preview checks for Web wrapper changes.
2026-12-03 19:09:43 +09:00
DarkSky 8606495a2f ci(np): extract backend workflow and add desktop leaf fast path
Move server-harness-check and cloud-e2e-rust-server into np-backend.yml and call it from native-playground.yml on backend changes.

Add the desktop-leaf-only fast lane to headless-linux-and-perf and guard perf-guardrail so Desktop leaf changes skip full workspace benchmarks.
2026-12-03 13:13:54 +09:00
DarkSky 2866b3b7fa test(desktop): Run the persistence smoke test in CI
Compare the full set of document IDs after the Desktop reload.
Run the test with the optimized Wasm bundle and save its screenshots.

Model: GPT-6.2 Sol.
Checks: Yarn lint, Cargo tests, Python YAML, and Node.js gates.
2026-12-03 10:51:32 +09:00
DarkSky 75483d366d ci(frontend): Skip unrelated checks for Desktop changes
Keep the macOS Desktop tests and check desktop-harness with harness features on macOS.
Skip workspace, iOS, and editor checks for Desktop leaf changes.
Skip the JS room tests when all changes are in Desktop Rust files.
2026-12-03 08:50:50 +09:00
DarkSky ea73ac3757 ci(frontend): speed up native verification
Use the Desktop leaf path to skip unrelated mobile jobs and the Metal render.
Check both production Wasm bundles for leaked snapshot prefixes.
Remove iOS host archives before cache save and cache the Kotlin compiler.
2026-12-03 06:01:03 +09:00
DarkSky 8bce7234cc ci(workflows): cache CJK fonts, unify S1 probe builds, and use Git CLI fetch
Set `CARGO_NET_GIT_FETCH_WITH_CLI` to `true` in `native-playground.yml` and
`np-mobile.yml` so Cargo uses the git CLI instead of `libgit2` when GitHub
returns HTTP 103 Early Hints.

Update `s1-probes-bench` in `np-mobile.yml` to finish inside the 30 minute
limit.

1. Cache `NotoSansCJK-Regular.ttc` under a SHA-256 cache key, fetch the
   pinned commit bytes on cache misses, and verify the SHA-256 digest.

2. Override release LTO, codegen units, and debug info for test binaries
   while keeping `opt-level = 3`, and set the Rust cache key to `v2`.

3. Drop `--all-features` from `blocksuite-preview` so Linux skips
   `wasm-bindgen`.

4. Compile and run `s1_sqlite_probe` and `s1_probes` with the same unified
   package selection so Cargo does not recompile crates.

Model: Gemini 4 Carbon
Tests: node scripts/ci/check-l0-tier-a.mjs, ruby -ryaml
2026-12-03 03:30:26 +09:00
DarkSky d5d9413eff ci(frontend): reduce native checks build time
Link the iOS host and smoke test before the simulator starts.
Log link times and the first UIKit calls.
Reuse the Linux harness from the workspace test build.
Optimize preview Wasm workers while Cargo builds the next target.

Model: GPT-6.2.
Tests: Node test runner, shell fixtures, and frontend invariants.
2026-12-03 00:03:30 +09:00
DarkSky 54e13dc0d2 ci(frontend): skip native jobs for web host changes
Use the changed paths to keep native jobs enabled for changes outside
the web host allowlist.
2026-12-02 22:55:16 +09:00
DarkSky 72af0e4117 ci(frontend): warm Chromium and add iOS smoke diagnostics
1. Warm Chromium before the browser tests in the js-room-coop and
   preview-wasm-workers jobs. Use a temporary profile and a 20-second
   timeout. If Chromium fails to start, continue to the tests.

2. Run the ios-device-check job in parallel with the ios-host job on
   macos-15. Check both ui and affine-ios-host for aarch64-apple-ios.
   Use standard Rust cache keys and keep only aarch64-apple-ios-sim in
   ios-host.

3. When the iOS smoke test fails, show the last two minutes of WebKit
   logs from the simulator. A 15-second alarm stops the log command.
   Exit with the status code from the smoke test.

4. Show the monotonic time and the step duration in milliseconds on each
   smoke test line. Flush stdout after each line.

5. In requireS3 and the unhandled error handler in
   IosHostS3SmokeTest.swift, call smokeLog and flush stderr before
   _exit(1). Keep the original stderr messages.
2026-12-02 13:27:44 +09:00
DarkSky 1678891fb5 ci(frontend): run Wasm and Linux checks in parallel
Reuse Cargo dependencies between tests and the harness build.
Use the iOS main run loop for the smoke tests.
Disable the GPU for the IndexedDB save test.
Record Chromium startup errors before cleanup.
2026-12-02 09:25:04 +09:00
DarkSky 50ed8a16de ci(web): run Chromium browser test files one at a time
Run the real-browser web host test files sequentially in CI so two cold Chromium and SwiftShader startups do not compete for disk reads and four runner CPUs at time zero.
2026-12-01 15:12:51 +09:00
DarkSky 88343a5303 test(web,ci): verify legacy workspace readiness and guard wasm snapshot prefixes
Replace the interactive control check in the dual-shell verifier with a legacy workspace readiness check for @affine/mobile 0.27.5.

The verifier requires a valid workspace document route and a visible editor container with a mounted editor host.
It also requires the legacy shell cookie and no synthetic legacy shell object.
One page check covers these conditions, and it uses the same route parser as Node.
The verifier runs this page check again after each IndexedDB read and before it returns.
A shell that leaves the document route or unmounts the editor before it stores data fails.

The verifier loads yjs on demand so Node tests run without installed packages.
It reads only target document records from local IndexedDB and verifies root catalog and page block state.
Rows must agree with the nbstore schema, and the updates store must have its docId index.
When a fresh profile stops at the workspace home route, it reads one document ID from the catalog.
It then locks that workspace and document and navigates once to the document route.
A redirect to a different document fails the check.

The legacy CLI path now reopens the mounted document in a new tab of the same Chromium profile.
That tab blocks the welcome template, so the shell must load the workspace from IndexedDB.
The local workspace database count must stay the same.
A server that cannot serve the document route directly fails the check.
Limit Chromium browser test file concurrency to two in CI so three browser suites do not overload four runner CPUs during SwiftShader startup.

Add a zero-dependency Node script that scans WebAssembly Section 11 data segments for eleven harness snapshot ID prefixes.
The script also scans Rust sources under blocksuite/crates to confirm that every watched prefix stays active.
The source scan ignores test modules and their child modules.
Wire the source check into packages/frontend/scripts/check-invariants.sh.
Wire the binary check into .github/workflows/native-playground.yml after wasm-opt.
2026-12-01 14:42:28 +09:00
DarkSky 6f193694ba fix(web): serialize legacy document saves and share Chromium cleanup
Save the page and its catalog in one IndexedDB transaction.
Use the Chromium harness in four browser checks.
Use one 45-second DevTools handshake for the SwiftShader smoke tests.
Open each new page with one DevTools request.
Stop the process group if the browser exits before the handshake.
Use a short temporary directory if the socket path exceeds the limit.

Check the legacy control on two consecutive frames.
Report startup errors for --legacy-dir.
Wait for the OAuth configuration and provider render on /sign-in.
Run the browser regression tests in CI.
2026-12-01 11:11:27 +09:00
DarkSky 737fb5831d perf(frontend): enable Wasm SIMD, remove unused UI code, and add a browser lifecycle harness
Build the playground bundle and the four preview workers with `simd128`.
Pass the path remaps to the playground build. Pass `--enable-simd` to each `wasm-opt` call.

Remove the Taffy `grid` feature and the grid style API. No caller uses them.
Remove the unused wgpu `surface` pipeline and its shader entry points.
Remove the unused `SwipeMenu` component.
Remove the unused typography radii from the generated tokens.
Share one progress bar function between the database table and the kanban card.

Add `chromium-harness.mjs` for the browser verification scripts.
The harness owns the work directory and each process group that a script starts.
A normal end, a failed assertion, `SIGINT`, and `SIGTERM` stop each process group. Then the harness removes the directory.
Chromium keeps its temporary files in the work directory.

Use the harness in the two dual-shell verification scripts.
Correct the repository root path in `verify-canary-dual-shell-e2e.mjs` and `stage-canary-dual-shell.mjs`.

Record the SIMD worker sizes and the build flags in the preview `BENCHMARK.md`.
2026-12-01 04:24:06 +09:00
DarkSky d6a4b05c96 perf(frontend,ui,preview): slim Wasm, native bundles, and Mermaid layout
Reduce WebAssembly, Android, and iOS artifact sizes across the native client workspace without dropping editor features.

1. Switch the playground WebAssembly build to the size profile without LTO.
2. Add a fat-LTO cdylib profile with path remapping for the four preview workers.
3. Remove unused SVG font and emoji regex fallback code from `ui`.
4. Deduplicate shared WGSL shader source in `.rodata` and pass `Path` by borrow in `Window::paint_path`.

5. Decouple `svg-text` from `blocksuite-preview` worker features and call `merman::Renderer::render_svg_data`.
6. Disable ELK layout in `merman` so all 35 diagram families use Dagre or Cytoscape.
7. Strip `libaffine_android_host.so` with NDK `llvm-strip` in `package-debug-apk.sh`.
8. Remove redundant `opt-level=0` overrides from the iOS CI workflow and bump its cache key.
2026-11-30 10:29:44 +00:00
DarkSky 57f32a5b6a feat(web-host,server-http): harden canary dual-shell routing, SSR caching, and IDB v3 interop 2026-11-30 14:55:02 +09:00
DarkSky f21fa487cf feat(mobile): add atomic 0.27.5 share block ingest, deterministic probe lifecycle, and durable share inbox 2026-11-30 13:41:09 +09:00
DarkSky 1bf1ab7930 fix(doc,database): keep block appends O(1), deduplicate children in O(N), and preserve grouped lane order
- Keep tail block appends O(1) without scanning sys:children, unify child duplicate detection and healing in PageDocSession via O(N) HashSet passes, and run in-tx repair only when duplicates actually exist.
- Materialize missing groupProperties lane keys in display order before updating target manuallyCardSort so dragging into a non-first lane on a fresh or partial board never shifts lane order.
- Share filter_and_sort_view_rows across database rendering and grouped bucket resolution, and cap headless-linux-and-perf CI job timeout at 25 minutes.
2026-11-30 03:22:45 +09:00
DarkSky 924c48026b fix(database,edgeless): heal duplicate child slots, unify group buckets, and cap iOS staticlib
- Keep read_unknown_block raw while deduplicating PageSnapshot traversal and healing duplicated sys:children slots during structural mutations so logical indices align 1:1 with raw Y.Array slots.
- Store groupProperties as per-group Y.Map entries inside Y.Array and preserve unfiltered card order so concurrent different-group reorders and filtered drags retain hidden card positions.
- Share a single grouped bucket + manuallyCardSort pipeline across Kanban, grouped Table, and grouped DnD, handling multi-selected cross-lane drops onto a card's own multi-select twin.
- Allow non-proportional multi-selection resize across all 8 Edgeless handles unless Shift is held, and restore full-block centered image captions matching captioned-block-component.ts.
- Restore the 14-crate IOS_OPT0_PKGS set in np-mobile.yml so cold cacheless libaffine_ios_host.a stays below the 650 MB gate while running 6/6 Simulator smoke tests.
2026-11-30 02:23:37 +09:00
DarkSky 831b925e40 fix(database,edgeless): persist grouped card order, isolate row grip, and tune cold iOS CI
- Store Kanban and grouped Table card ordering in view groupProperties.manuallyCardSort with single-step Undo while keeping sys:children exclusively for ungrouped Table row moves.
- Deduplicate concurrent two-replica sys:children row moves, abort moves onto concurrently deleted anchors, and skip no-op drops.
- Defer ColumnMenu and Kanban cell hit activation to unpromoted pointer release so drag gestures never flash popovers, and move the Table row drag handle into the 24px left gutter outside the Title cell.
- Initialize synthetic title cells from row.title across click and Tab/Shift+Tab, support inline Calendar event rename, align left/right image captions, truncate zoomed-out Frame titles, and intersect multi-select Edgeless resize modes.
- Expand IOS_OPT0_PKGS to merman/typst/comemo crates and drop duplicate host lib test in np-mobile.yml so cold iOS Simulator builds finish well under 20 minutes.
2026-11-30 01:04:52 +09:00
DarkSky 77c36c4473 fix(editor): isolate mouse image resize, bind picker request tokens, and tune iOS CI
- Track mouse versus touch ownership on ImageResizeDrag and use a read-only touch handle hit-test during scroll start so active_touch_count == 0 never cancels a desktop or Web mouse corner-handle resize across render frames.
- Bind each async media or attachment picker session to a monotonic request_id, reject stale, cross-page, or deleted-anchor deliveries before reading or storing blobs, read desktop files on the background executor after statting byte length, and clear Web picker state when change or cancel finishes while keeping programmatic PDF delivery independent.
- Keep narrow LTR DocPanel docked on the right while RTL docks on the left, move Wasm HTML embed reconciliation into overlays/wasm_html_embeds.rs, and align iOS host test Cargo profile flags with a 1-minute simulator shutdown cap.
2026-11-29 22:07:41 +09:00
DarkSky 955e6acf29 fix(editor): preserve multi-file media order, gate host pickers, and wire touch image resize
Resolve review findings across media insertion, image controls, and selection cleanup:
- Chain pending media insertion anchors across multi-file selections so multiple picked images and attachments insert in order, clear pending state on picker cancel or page navigation, and enforce page read-only and origin-page checks before storing blobs.
- Gate Slash image and attachment commands on host picker availability and wire desktop file pickers onto native-playground windows.
- Route touch corner-handle drags through TouchStrokeOwner::ImageResize, expose the floating image toolbar on touch hosts, preserve ultra-wide aspect ratios down to 1e-4, sniff BMP/TIFF/ICO/AVIF headers on card conversion, and skip no-op resize or alignment commits.
- Unify remaining direct block_selection.clear() sites through clear_block_selection, clamp narrow LTR/RTL DocPanel to logical start, and record 5-Wasm bundle sizes in mobile CI.
2026-11-29 21:27:04 +09:00
DarkSky 9a834dc75b fix(blocksuite,ci): align database Yjs wire types, filter operators, and iOS staticlib budget
- Encode integer cell and JSON values outside i32 range as Yjs Float64 instead of BigInt64 so BlockSuite JS number schemas read date timestamps and progress values natively.
- Align emitted filter condition function names with BlockSuite JS filter-fn (doesNoContains, isUnchecked, and multi-select containsOneOf/doesNotContainOneOf/containsAll/doesNotContainAll), remove unused legacy filter/sort builders, unwrap single-group AND wrappers on rule removal, and guard empty-value filter applies.
- Mutate multi-select cell Y.Arrays in place across toggle, option-create, and option-delete, and route set_database_row_title through minimal UTF-16 incremental Y.Text splices so concurrent replica updates and untouched marks survive.
- Preserve existing text when splicing legacy Any::Object database cells, invalidate active cell editors on remote column-type changes, and update RelativePosition anchors before refreshing snapshots.
- Guard preedit_snapshot cloning behind active inline composition, clip horizontally scrolled table content to the inner table bounds, pad Kanban property cards cleanly, and show Calendar day-add buttons only on active/selected/today cells.
- Scope np-mobile.yml iOS dev opt-level=0 overrides to the 14 newly added rendering/layout crates while preserving opt-level=s on merman and typst crates so libaffine_ios_host.a stays under the 650 MB limit.
2026-11-29 13:44:01 +09:00
DarkSky 79c8fd8e77 feat(blocksuite): refactor database authoring for Yjs parity, overlay popovers, and unified inline input
- Write Y.Array for multi-select cells and validate real Node yjs decode roundtrip for 0/1/2 tags.
- Use incremental Y.Text splicing for title and rich-text cells to preserve marks and @reference embeds with zero writes on no-op blur/Enter, expanding LinkedPage titles across Table, Kanban, Calendar, and RecordSheet.
- Delete DatabaseInputBuffer and unify database cells and popovers on AnchoredInlineInput, shared InlineBoxPaint, and finish_inline_targets.
- Move ColumnMenu, SelectPicker, and Filter/Sort/Group panels into screen-space Overlays so block height remains invariant under scroll_x > 0.
- Patch Filter and Sort JSON losslessly with Web 0.27.5 operators, literal args, and cascading column-delete cleanup.
- Support Kanban card title editing, type-safe lane creation, title-less + New record focus, and zero-violation mobile 390x844 RecordSheet.
- Scope block-menu Turn into conversions strictly to explicit block selections without expanding hidden body blocks under collapsed headings, and pass explicit Cargo --config package opt-level overrides in iOS CI.
2026-11-29 12:26:36 +09:00
DarkSky 8f5b829a89 fix(blocksuite): omit edgeless-text font-size write, guard database value row id, and scope list renumber
- Omit the font-size control and `prop:fontSize` write/read path for `affine:edgeless-text` blocks to match the BlockSuite schema (`Omit<TextStyleProps, 'fontSize'>`) and delete the unused `font_size_override` field on `BlockFlow`.
- Check `$blocksuite:internal:native$` before unwrapping `cells.value` in `SliceBlock::properties_with_id_map` so database rows with block ID `"value"` preserve sibling row cells during duplication.
- Restrict `PageDocSession::reparent_block` list renumbering to numbered list items (`numbered_order.is_some()`) so moving bulleted, to-do, or toggle items preserves adjacent custom start numbers and splits numbered runs consistently.
- Preserve existing multi-block selection when opening the drag-handle menu, insert multi-block duplicates after the last selected block, remove the 1 ms `last_closed_block_menu` timestamp coupling, and disable dev-profile size optimization for heavy rendering crates in `iOS Thin Host` CI to keep cold builds within the 20-minute budget.
2026-11-29 11:43:02 +09:00
DarkSky 646d638354 fix(editor,hosts,web): resolve cold-start touch keyboard, link hit-testing, and collaborative unlink
- Track actual presented system keyboard inside MetalHostView.inputView, restore software keyboard on repeat prose taps after dismissal, honor iPadOS hardware Command shortcuts in Modifiers::secondary, and sync UITextInteraction mode synchronously across readonly/mode/form-factor transitions.

- Make mobile KeyboardToolbar visibility declarative on active selection so narrow-to-wide resize, selection clear, and Android cold start never leave a ghost bottom toolbar; deduct docked toolbar height in popover_viewport and forward iOS touches immediately when floating overlays are open.

- Re-validate LinkPopup against live document revisions and sub-ranges so concurrent partial title/text link edits survive Unlink, align full-width and adjacent-link hit-testing, update web-smoke link button geometry for the 11-item format toolbar, and harden preview-workers/sign-in redirect handling.
2026-11-29 07:35:58 +09:00
DarkSky 472b9aeab4 feat(editor): unify slash registry, format toolbar, link popup and mobile bottom slot 2026-11-29 06:44:16 +09:00
DarkSky 59af2bcbe1 fix(hosts,ci): wire edge-triggered show_soft_keyboard on iOS/Android and enable shared CI Cargo cache 2026-11-29 05:35:31 +09:00
DarkSky b547e83415 fix(playground,ci): use ToggleCollapsed in test and scope dev opt-level overrides to ios-sim 2026-11-29 02:16:48 +09:00
DarkSky bc0f4839ce fix(doc,editor,playground): enforce atomic surface delete, mode selection invariant, and spatial paste 2026-11-29 02:07:41 +09:00
DarkSky 0eff077e0d feat(doc,preview,editor,playground,mobile): add native previews, external embeds, TOC/DocInfo, table ops, and edgeless paste
- Wire asynchronous off-thread native Mermaid, Typst, and RaTeX previews with CJK/Emoji system .ttc collection discovery, compact bundled NewCMMath-Book OpenType MATH outlines, 2048px rasterization cap, and a 32 MiB byte-bounded PinnedPixelCache
- Enable preview-typst by default on affine-ios-host and affine-android-host with size-optimized release codegen and wake idle native host runtimes when background preview workers finish
- Add external embed cards (YouTube, Figma, GitHub, Loom) with Idle/Selected/Active click-shield states and validated http(s):// open_url bridges on iOS and Android hosts
- Add TOC Outline and Document Info side panels, atomic table row/column insert/delete toolbar with mobile non-overlap placement, and code block wrap/language/preview controls
- Implement lossless Edgeless Note subtree paste, upfront Connector endpoint ID remapping, Mindmap/Group Yjs V1 wire parity, mixed affine:table text predicate matching, and Web Worker crash recovery
2026-11-29 00:32:21 +09:00
DarkSky 76d32341d9 feat(mobile,playground): wire cross-platform selection core, Android native handles/menus, and multi-MIME clipboard
- Add authoritative document-level touch selection geometry, endpoint anchors, UTF-16/preedit-aware table-cell queries, cross-block handle dragging, and multi-MIME Copy/Cut/Paste/Select All actions in PlaygroundView.
- Wire native Android teardrop selection handles, floating system ActionMode menu, and multi-MIME ClipboardManager integration (text/plain, text/html, text/markdown, application/x-blocksuite-snapshot) in AffineAndroidHost.
- Suppress GPU floating selection menus when native host selection UI is active while preserving scroll/edit dismissal invariants and single-arch arm64-v8a mobile CI checks.
2026-11-28 23:11:54 +09:00
DarkSky 044e710a8c feat(mobile): add touch interaction, mobile database views, and host frame scheduling
Implement touch interaction gestures, mobile database views, and responsive host frame scheduling across Android, iOS, and BlockSuite playground:

- Record detail sheet layout and gesture isolation: measure real title, field, and wrapped tag-pill heights with block_flow::layout_inline so long multi-line titles scroll cleanly to the bottom; isolate all touch drags, flings, and wheel events inside the open sheet so the page behind stays stationary; support touch header/grabber pull-to-close and platform Back dismissal via PlaygroundView::handle_back and NativeBridge.nativeHandleBack.
- Mobile IME and block-selection continuity: preserve software keyboard focus and record the return block caret across adjacent block selection on Backspace, restore the text caret to the return paragraph on block deletion or direct typing during block selection, clear the flag on selection changes, and keep Android Autofill focus-generation isolation intact.
- Host frame scheduling, Vulkan cold-start safety, and wheel input: clear dirty state inside PlatformWindow::draw() while preserving post-draw animations and iOS keyboard transitions, wire SyncHostDispatcher::drain_ready() and next_timer_delay_ms() on both Android and iOS hosts, cache the process-lifetime NativeBridge jclass global reference in OnceLock, disable wgpu debug instance flags to avoid Vulkan emulator SetDebugUtilsObjectNameEXT crashes, dispatch Android ACTION_SCROLL via ScrollEvent::Pointer without synthetic touch flings, and remove sleep polling from Android runtime tests.
2026-11-28 12:36:27 +09:00
DarkSky 4e66722b44 feat(mobile): mount native GPU BlockSuite editor in iOS and Android hosts
- Add orthogonal PointerKind, FormFactor, and EditorCapabilities matrix in blocksuite-editor, decoupling database_readonly from edgeless_readonly and enforcing page_readonly across command/toolbar paths
- Attach cross-platform CJK and emoji FontFallbacks to blocksuite-editor text runs so iOS CoreText and Android CosmicTextSystem render CJK and emoji glyphs cleanly
- Wire real WgpuRenderer and CosmicTextSystem into Android ANativeWindow via SwappableAtlas, deterministic ui::clock_now() dispatch_after timer draining, single-JNI UTF-16 reads, surrogate-pair composing alignment, requestCursorUpdates + Matrix CursorAnchorInfo, historical ACTION_MOVE samples, hardware keyboard/scroll forwarding, and zero shadow-buffer pollution
- Frame iOS MetalHostView and SelectionOverlayView inside safeAreaInsets, gate software keyboard responder on PlaygroundView::wants_software_keyboard and pan-slop tap detection, avoid double safe_bottom subtraction on KeyboardToolbar insets, prevent spurious UITextInputDelegate textWillChange/textDidChange echo during IME composition, yield hardware pressesBegan during marked text, and guard UIEditMenuInteraction with explicit actions
- Enable wgpu/cosmic-text for target_os = "android" in packages/ui/ui and add Linux fontconfig/freetype packages to np-mobile CI workflow
2026-11-28 06:11:09 +09:00
DarkSky 6eb02b835b ci(native-playground): add backend and native-ui path filters and mobile merge-base 2026-11-28 04:43:42 +09:00
DarkSky 09f6d432fd perf(frontend,preview): split preview svg-text/pdf features and per-target wasm profiles 2026-11-27 17:22:14 +09:00
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 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 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 698c268e3a feat(android-host): implement S2 Android surface, SQLite co-storage, and auth bridge
Upgrade the thin Android host from S1 to S2 across four areas:

- Present real pixel frames via NDK EGL/GLES3 (`glClear` + `eglSwapBuffers`)
  with automatic `EGLSurface` teardown and `CpuFallback` downgrade when EGL
  is unavailable, retaining `pending_frame` on failure until a frame presents.
  Full `wgpu` Vulkan-to-GLES3 rendering lands in `S3-Android`.
- Open in-place `0.27.5` SQLite WAL databases through `affine-store` with
  `busy_timeout = 5000ms` and `onStop()` `PASSIVE` checkpoints. Gate local
  workspaces by the ordered `affine-local-workspace` allowlist with zero disk
  scanning, evict unlisted local handles on shrink, and allow cloud workspaces
  and userspaces directly.
- Implement a file-locked atomic Jetpack Preferences DataStore protobuf codec
  with zero silent corruption wipes, single-lock `getOrCreateInstallationId`,
  pure-Kotlin RFC 4648 Base64 for API 24+, `v1:` AES-GCM envelopes, process-wide
  single-flight `refreshSession` with idempotent `x-affine-refresh-attempt`
  reuse and disk-write retry caching, a default `HttpUrlConnectionRefreshTransport`
  sending `refreshToken` only in the JSON body, `INTERNET` manifest permission,
  and exact `0.27.5` three-cookie plus `affine.preferences_pb` auth cleanup.
- Wire `AndroidBootstrapCoordinator` in `MainActivity.onCreate` with unified
  `WebViewStorageSentinel` validation, active `indexedDB` interception,
  lossless raw preservation of malformed workspace lists, and explicit partial
  mount failure reporting with allowlist-synced retry and write-back gating.
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
DarkSky 8e0b345036 feat(editor): extract ui-tokens, ui-kit, and blocksuite-editor crates
Add the zero-dependency ui-tokens crate to export generated theme tokens,
icon definitions, and bundled font bytes without cross-tree include_bytes!
paths.

Add the domain-neutral ui-kit crate with logical geometry helpers, SafeArea,
VirtualList, SwipeDialog, and SwipeMenu state machines backed by scheduler
time and four-rate replay invariance tests.

Extract blocksuite-editor from playground with the WorkspaceDocDirectory
host port, exact substring UTF-16 highlight matching, and LTR/RTL logical
start/end block flow layout. Slim playground to the demo and harness host.
Update workspace manifests, static invariant guards, CI workflows, and
AGENTS.md files.
2026-11-27 06:55:47 +09:00
DarkSky d619bfbcda feat(preview): add pure-Rust offline preview kernel crate 2026-11-27 06:55:47 +09:00