Commit Graph
11739 Commits
Author SHA1 Message Date
DarkSky f7dc193f9d feat(editor): unify ToolbarChrome, tooltips, page block toolbars, and table hover controls
Extract shared ToolbarChrome, Tooltip, and HoverController (500ms enter / 250ms leave with hover bridge) under blocksuite-editor overlays.

Align FormatToolbar (Turn into current-block icon and selected row, Align dropdown, score-ordered inline actions, dual-section vertical Highlight list, Create Table, More), Image inner top-right hover/selected toolbar with all four corner resize handles, Bookmark/LinkedDoc/SyncedDoc/ExternalEmbed/Callout toolbars (single-click select, double-click open), Link/Reference hover popup above inline anchor with bridge and dropdowns, and desktop Simple Table hover add-bars (a press counts as a drag only after 4 px of travel along the bar's axis, a forward drag adds at least one row or column, and a drag back to the press point or away from the table adds nothing), three-dot axis pills, and 5px column resize handles.

Unify Page and canvas media downloads onto ImageStore's single set_on_blob_download host channel (with Web anchor fallback), and show the canvas Image and Attachment Download button only when ImageStore::can_deliver_downloads() is true and non-empty blob bytes are cached for that source_id.

Compute document math presence once per page and document revision (snapshot_has_math, memoized on BlockFlow) instead of walking the whole page on every layout, and include database titles, row titles, and rich-text cells in both the math check and the per-block preview fingerprint.

Route /pdf through the media slash path so that a host without a file picker keeps the typed /pdf text, the same as /attachment.
2026-12-01 19:26:55 +09:00
DarkSky 69cc024e71 feat(edgeless): align element toolbar chrome, note style panel, media actions, and quick-connect preview 2026-12-01 19:13:16 +09:00
DarkSky 2144304032 perf(preview): keep PDF documents open in the worker by docId
The preview workers now use a linear-memory ABI with four exports:
`memory`, `prepare(len)`, `invoke()` and `output_ptr()`. The host writes
each request into worker memory in one copy and copies each response out in
one copy. The old ABI called an export for every 4 bytes in each direction.

Rust gives out only the addresses of its own buffers, so the crate keeps
`forbid(unsafe_code)`. Buffers larger than 1 MiB go back to the allocator
after each request.

The PDF worker keeps each parsed document under a `docId` that the host
assigns. The frames are `PDF_OPEN`, `PDF_RENDER` and `PDF_CLOSE`.

The bytes of a document go to the worker once per open, not once per page.
Page pixels come back as a compact RGBA buffer that the worker transfers.

The playground bridge has one session table in `wasm_pdf_state.rs`. It
opens at most 8 documents or 256 MiB of source bytes.

To make room, the table closes least recently used idle documents, but only
when that makes the new document fit. Empty documents and documents larger
than 256 MiB never go to the worker.

The table closes a document when the view clears the last scope that used
it, also when no page request claimed it yet. A reopen that fails after a
worker restart keeps the known page count.

The table restarts the worker before the IDs run out.

The bridge no longer keeps 16 copies of PDF bytes.

Each worker event listener ignores events from a replaced worker, so a late
error of an old worker cannot stop the new one. A crash answers each sent
request once, so the count of unanswered requests stays exact.

`pdf-client.js` uses the same protocol and keeps its public methods. It
keeps the same open budget and waits for room before it sends an open.

New bytes for a known `docKey` now open a new document and drop the old
page count and pages. Before, the client returned the old page count.

Four snapshot IDs of the PDF viewer and the attachment toolbar use
`format_args!`, so the production bundle has no copy of their prefixes. The
prefix gate now checks 14 prefixes.
2026-12-01 18:55:10 +09:00
DarkSky a8ff41ccdf perf(editor): format code toolbar snapshot ids lazily and rank languages without heap keys
The desktop code toolbar, its More menu and the touch code toolbar now give
`format_args!` directly to the snapshot call. Release builds format no
snapshot ids for these controls. Harness builds record the same ids as before.
The interactive element ids do not change.

`filter_code_languages_ordered` keeps its signature and its order. It gives
each catalog entry the dense order of its first entry in the history. Then it
sorts one integer key for each match on the stack.

The label match compares ASCII bytes without case, so a query makes no
lowercase copy of each label.

A table test compares the new order with the previous sort for all query
prefixes, cases, aliases, duplicates and a history of 65,538 entries.

`Palette` now has `error`, `error_background` and `focus_ring` from the theme
tokens. The More menu and the touch toolbar read these fields. The colors do
not change.

Wheel and touch fling scrolls lend the collapsed block set to the overlay
scene and do not clone it. This change also
removes `ScrollAxis::set_max` and `ScrollAxis::snapped`, which had no
production callers.
2026-12-01 18:35:52 +09:00
DarkSky 67ccd2fc3d feat(editor): add paint-only database hover, cursors, and desktop record peek
Unify Table, Kanban, and Calendar hover state into a paint-only overlay in playground without triggering document relayout or text-cache rebuilds, map all database hit targets and popovers to standard cursor styles with full modal, overlay, and side-panel hover isolation, and invalidate cached hover on document revision changes. A pressed title cell hides the OPEN and more buttons of its row in the same frame, and an open database popover or record peek hides the page block hover under it.

Add a centered desktop Record Peek modal with checkbox fields and an editable title that splices each keystroke into the live row title, like a title cell: peer edits merge, Enter, Escape, an outside click, or closing the peek only end the edit and write nothing, and one undo removes the local typing. A double click on a Calendar event edits its title in place only when its first click opened the peek. Also add 24x24 icon row/card and Kanban lane context menus with the CenterPeek icon, single-transaction atomic Undo row CRUD primitives (insert at slot with group inheritance and immediate title editing in the same undo step, lossless rich-text and reference duplication, and deletion cleaning prop:cells), dual-date-column Calendar resize that keeps the local time of day of the dragged edge across DST changes and the exact timestamp of the other edge, readonly Link cell click pass-through, and Escape/outside-click dismissal for all database popovers.
2026-12-01 17:57:01 +09:00
DarkSky 4057255c50 feat(store,client): add DocSyncCoordinator per-doc sync state machine, content-checked pushed_clock, lazy unpushed subdocs, and sidecar share receipts 2026-12-01 17:13:20 +09:00
DarkSky 36daa68232 perf(native): share PDF pages and parse each document once off the UI thread
Embedded PDF cards that show the same page now share one bitmap.
Twelve cards of one page keep 1 image instead of 12.

A card with a current preview now stops at a pointer check.
The refresh does not hash bytes, touch the document table or call the provider.

The native provider parses each document on a background thread.
Views that open the same content share one parse through a weak table.
Render jobs share the parse without a lock.

This change removes the second parsed copy, the provider cache and the byte copies.
The parse also renders the first page, so one wakeup brings the document and its first page.

The view keeps one LRU table of open documents.
It never evicts what the open viewer shows or what a card waits on.
A card that waits for a free slot opens in a later pass or when the viewer closes.
An open that no card or viewer wants any more frees its slot.

Content identity uses the shared allocation, then a full byte compare.
The sampled hash is only a map key, so new bytes with the same name and length render again.
2026-12-01 16:05:36 +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 4a2a44d9b9 feat(editor): unify inline caption editing and code block toolbars
Replace detached caption prompts with direct in-place caption editing across all captioned block flavours, unify the desktop hover code toolbar with 28x28 icon buttons and More menu, and dock a horizontally scrollable >=44pt touch code toolbar on Phone and Tablet viewports.

- Add touch docked code toolbar via place_touch_docked_toolbar with language picker, conditional preview toggle, copy, caption, wrap, line number, collapse, duplicate, and pinned delete controls
- Reserve touch code toolbar height in Page viewport scroll/caret reveal and touch selection visible-band calculations so typing in a focused code block never falls behind the docked bottom toolbars
- Map in-place caption pointer hit-testing, drag selection, and IME selection bounds through Edgeless Note camera/scale transforms alongside Page coordinates
- Report wants_software_keyboard() while the in-place caption editor is active on Page and Edgeless modes, and enforce edgeless_readonly alongside page_readonly
- Preserve non-collapsed selection text when splitting a caption on Enter in Page mode, commit and exit cleanly on Enter in Edgeless mode, and only clear focus when the structural commit succeeds
- Support clipboard paste with newline normalization, word-granularity navigation/deletion, mouse drag selection, and standard line-height placeholder carets in the in-place caption editor
- Update AGENTS.md invariants, headless harness states, and deterministic unit tests
2026-12-01 15:04:12 +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 f1a22cbb93 feat(editor): unify subpixel scroll kernel and align CodeLangPicker
Unify Page, code/table/database horizontal containers, popover lists,
and touch scroll gestures on a shared unrounded subpixel ScrollAxis and
single-source AxisLatch, snapping strictly to device pixels at paint
time. Add full-height 24px hover and thumb drag support for wide table
and database horizontal scrollbars, keep world-anchored input popovers
from scrolling off-screen on page wheel or touch drags, pin the Create
row at the bottom of the 400px Database Select popover with scroll
reset on filter edits, and split CodeLangPicker with Plain Text pinning
and a centered empty state.
2026-12-01 14:14:17 +09:00
DarkSky 5737334704 perf(store): move owned blob bytes into the set_blob query
The set_blob function bound the payload by reference. The sqlx encoder
then copied the full payload into a new buffer.

The function now moves the owned key, data and mime values into the
query arguments. The SQL, the upsert behavior and the public signature
do not change.

A new single-test binary counts Rust heap requests with a global
allocator. It also checks insert, overwrite, soft delete and revive.

For an 8 MiB payload, the old code requested 8,393,257 bytes in one
set_blob call, with one block at or above 1 MiB. The new code stays
below 64 KiB and makes no block at or above 1 MiB.
2026-12-01 13:23:55 +09:00
DarkSky 4f85a19896 fix(edgeless): align element toolbar CRDT writes, palettes, and group lock with BlockSuite 0.27.5 2026-12-01 12:58:58 +09:00
DarkSky ce8701adf9 feat(editor,playground,web): CenterPeek multi-page PDF viewer, async bounded staging, and Mermaid/Callout parity 2026-12-01 12:36:02 +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 cfbfed3211 feat(store,client,android,edgeless): atomic draft persistence, share inbox orphan sweep, and lazy doc hydration 2026-12-01 10:05:23 +09:00
DarkSky 0db16d17e2 perf(editor): lay out one block when its database view state or table focus changes
Keep database view state and table focus out of the environment revision that each block hashes.
Before this change, a pointer move to another Calendar day or Kanban lane laid out the whole page again.

`DatabaseFlowState` records each block whose view state changed.
Its state map is private. Each change of one block goes through a method that marks that block dirty.
A tab strip scroll that only stops the reveal of the active tab also marks its block dirty.

`update_pointer_hover` sets the Calendar day hover and the Kanban lane hover in one call.
It replaces `set_calendar_hovered_day` and `set_kanban_hovered_lane`.
The call adds no empty state for a block that the pointer is not on.

`LayoutKey` is a struct with named fields in `layout_cache.rs`.
It holds the database revision, a hash of the focused table, and the inputs that every block reads.
A layout pass adds the changed database blocks and the two tables of a focus change to its changed blocks.
The pass reuses each other block.

Remove the environment revision increments from the entry points that change one database block.
These are view switches, Calendar month steps, tab strip scrolls, cell input, key input, drag moves, and commits.
A sideways scroll of a database, a table row drag, and a table column drag change no layout state.
They start no layout pass.
`set_database_mobile_readonly` keeps its increment because it changes each database block.

Find the outermost Callout of an indented block in one pass from the page root.
The pass only enters blocks with children.
Before this change, each pointer move did one whole-tree parent lookup for each ancestor level of the block.

Add tests on a page with 10,000 paragraphs, one database, and one table.
One test uses a touch swipe on the view tabs of a right-to-left phone page.
Add a test of the drag handle rect of each block in nested Callouts and in deep lists.
Hold the preview provider test lock in `editing_one_block_lays_out_only_that_block_again`.
A preview revision that a parallel test changed started a second layout pass in that test.
The comment on the lock tells which tests must hold it.
2026-12-01 09:09:02 +09:00
DarkSky 2b94d66b97 perf(editor): skip snapshot markers and reuse static icon strings 2026-12-01 08:22:39 +09:00
DarkSky 4fadb706fa perf(editor): cache text selection geometry and cut per-frame allocations
Move the text selection geometry into overlays/paint_page/geometry.rs as one function for Page and Edgeless inline editing.
A style value sets the optional 2 px minimum width and the marker of empty blocks.
Delete the Edgeless copy of that function.
Store the UTF-16 length of the plain text with the laid-out text of a block.
A selection reads that length for each block before its last one and scans no text.

Cache the world-space selection rectangles and their bounds by document revision, layout instance, and selection.
Selection painting finds the rectangles in the viewport with a binary search.
It applies the code scroll to those rectangles only.
The formatting toolbar reads the cached bounds as its anchor.
The start of each frame releases the rectangles and the format that the caches hold for a selection that ended.
This release covers text selections and block selections, also when the host draws the selection.

Rank manual Kanban card order, group keys, and group properties with hash maps instead of linear scans.
Reuse one cell key for all rows of a grouping pass.

Paint a sideways-scrolled block in two passes over its primitives without temporary vectors.

Keep code preview revisions in one table per kind and one eviction order.
A table and the order share the text of a source.
A lookup of a revision borrows the source text and allocates nothing.

Make bs-harness bench report the path when it cannot read the size of its binary.
Count the allocations of one thread in bs-harness only while a benchmark asks for them.
Assert that steady selection frames add no geometry work and that revision lookups allocate nothing.
Count the CRDT text reads of link hit-testing.
Assert that a hover over text without a link under the pointer reads no text.
2026-12-01 05:08:08 +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 7dbb4efe41 perf(frontend): generate shadow tables and restore Mermaid ELK routing
Generate shadow tables from CSS tokens. Validate numeric ranges.
Preserve fractional color channels. Remove the runtime parser and cache.
Drop unused palette slices and typography fields.

Restore ELK layout. Test the geometry of nine directed edges.
Record the Wasm sizes. Remove unused frontend dependencies.
2026-11-30 16:25:12 +00:00
DarkSky 5c8890a991 perf(editor): optimize selection geometry, format bar, overlays, and image drain
Merge block selection rectangles in one postorder pass and cache document-space bounds in the editor session.
Key selection and format caches by document revision and a weak FlowLayout reference, and clear them on overlay reset.

Read inherited text alignment directly from laid-out blocks so unaligned RTL paragraphs report default right alignment matching layout.
Cache block-selection format marks and shared selected text across steady frames, and stream UTF-16 slices without temporary Vec<u16> buffers.

Stream the first nine lines for collapsed code blocks instead of collecting all lines into a vector.
Check link and reference decoration hits before reading rich text during hover.

Extract shared single-line input painting and horizontal scroll calculation into overlays/input_field.rs for link fields and bookmark prompts.
Skip invisible format button construction when the toolbar renders in link-only mode.

Move retired image draining to the start of chrome render so desktop frames reclaim retired images without touch input.
Remove the redundant frame sequence counter from the image cache while keeping deduplication, active-slot checks, and LRU order intact.
2026-11-30 15:36:53 +00:00
DarkSky bfd7eb9eaf fix(editor,playground,web,ios): polish block toolbars, lightbox gestures, Mermaid SVG sizing, and touch modality 2026-11-30 23:18:52 +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 4b3c175aba perf(native-ui): optimize database sort, image cache, icons, and web host
Extract database sort keys once per row and sort row indices with stable merge sort.
This keeps multi-column order, empty-tail placement, NFD collation, and linked page title resolution.

Add MoveLeftIcon, MoveRightIcon, and InvisibleIcon to ui-tokens and keep only static SVG strings in IconDef.
Use IconPaint::from_def in database column menus to fix blank icons and remove runtime lock lookups.

Clear stale active-page directory snapshots instead of cloning the active PageSnapshot in PlaygroundView::refresh_document.
Encapsulate image cache mutations in ImageStore with bounded Undo LRU and deferred cross-frame window.drop_image cleanup.
Defer Apple Metal atlas tile deallocation until in-flight MTLCommandBuffer submissions complete and remove unused ui helpers.

Share cached syntax highlight lines with Arc<[HighlightedLine]> and evict stale entries with LRU.
Remove unused render_breadcrumb_bar and BreadcrumbVisualStyle from ui-kit.

Move CRDT append projection into wasm_crdt_core with single-pass block ID checks and a delta-only path.
Surface durable openDoc errors in default-app-entry and clone returned snapshots in host.js.
Scan covered IndexedDB keys with openKeyCursor and use logical CSS properties in sign-in.html.
2026-11-30 18:59:52 +09:00
DarkSky c02056c82d feat(blocksuite): add inline popovers, block toolbars, and overlay polish
Add inline link and linked-doc 500ms hover popovers, dual-field text+link editing, and Inline/Card/Embed view conversion.

Extend the desktop format toolbar with inline equation, linked-doc creation, More submenu, and block-selection mounting.

Add block-level controls for code blocks (searchable language picker, line numbers, 8-line collapse), block/note LaTeX 2-step editing, image double-click lightbox, bookmark style toolbar, and callout 44px layout with emoji and 9-color toolbar.

Include targeted fixes:
- Flatten H4-H6 in touch Slash menus and hide scrolled-out desktop Slash preview cards.
- Allow Slash Copy in page_readonly mode.
- Preserve nested Y.Map background and readonly guard in Edgeless note slicer, guard locked mindmap descendants on delete, and skip dangling mindmap children.
- Consume click when dismissing active Calendar inline edit and restrict selected-day '+' visibility to touch form factors.
- Expand Page block_selection highlight to cover visible nested subtrees (skipping collapsed children) and align Move Up / Move Down icons in the block menu.
2026-11-30 18:18:41 +09: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 9244320f20 feat(edgeless): complete element toolbar, brush panel, quick-connect, mindmap, presence and note-slicer
- Add incremental Y.Map entry mutations (apply_mindmap_children_delta / update_mindmap_children) so MindMap add-child, add-sibling, collapse, and subtree delete preserve the nested children Y.Map for concurrent Web/Native edits and encode layoutType, style, and connector mode as Float64 JS numbers.
- Replace silent fractional-index fallbacks with checked next_spatial_index / next_index_after / prev_index_before helpers across Edgeless authoring ops.
- Enforce edgeless/page readonly and element locked guards across element toolbar, reorder, MindMap, quick-connect (click and drag), align, group, inline edit, and note slicer; dismiss open popovers on canvas click, Escape (before clearing selection), and selection changes.
- Cascade MindMap subtree deletes (and full MindMap removal on root delete) in one atomic undo step and suppress Shape 4-way quick-connect arrows on MindMap member nodes.
- Insert sliced Notes immediately after the source Note in page.children, preserve themed {light, dark} backgrounds and prop:edgeless styles, trigger the Note slicer overlay strictly on inter-block gap hover, and remove the bare '-' slice shortcut.
- Render the compact Page reading-order badge only on selected Page Notes (pre-laid out during scene prep, eliminating per-frame paint layout_inline and mobile Frame title occlusion), cache decoded RoomAwareness payloads with page-scoped selectionV2 filtering, and clean up duplicate actions and dead code.
2026-11-30 13:20:22 +09:00
DarkSky 4976121f6a feat(editor,playground): refine multi-level tree DnD, handle quick-insert, and page-margin marquee
Complete multi-level Page tree drag-and-drop, gutter handle quick-insert, and margin marquee selection:
- Insert sibling paragraphs at index + 1 on '+' clicks (matching Web), expanding all covering collapsed ancestor headings via a shared monotonic-stack helper in the same undo step on '+' or sibling drop so inserted and dropped blocks stay visible.
- Compute `has_gutter_chevron` in block flow layout as the single source of truth so childless empty headings do not expose desktop or touch collapse chevrons.
- Align Tab reparenting with tree DnD via `is_valid_reparent_target` so Tab can indent into Callout blocks.
- Run edge auto-scroll once per frame without re-entrant render notifications, scaling smoothly past viewport edges up to 40 px/frame.
- Preserve far-margin single-click caret placement until pointer movement exceeds 6 px, and clear in-progress marquee selection on Escape.
- Preserve explicit custom numbered-list start orders while keeping upward drag renumbering intact.
- Truncate drag ghost labels by pixel width, keep Quote hover grabbers distinct from Quote borders, and verify with frame-stepping headless tests.
2026-11-30 13:09:25 +09:00
DarkSky 8c82e71b8d feat(editor): complete Slash commands, @ linked-doc menu, and table resize/axis controls
Enable Page-mode /frame (1600x900 non-overlapping under affine:surface with monotonic index and presentationIndex) and /mindmap (non-overlapping canvas placement, real mindmap + 4 shape nodes, ref_flavour = mindmap, single-step undo). Suppress the 800ms Slash preview card on touch form factors and narrow viewports so it never overlaps the Slash menu. Enforce readonly guards before trigger deletion (including /copy), clip table column resize grips to the visible table bounds when scrolled, and add deterministic per-client jitter to table row/column fractional order keys so concurrent peer inserts never collide. Align Slash Database order (Table/Calendar/Kanban), Web 0.27.5 descriptions, YYYY-MM-DD HH:MM Now output, calendar view date.startColumnId, 800ms one-shot preview timer wakeup, single-step undo for MoveUp/MoveDown/Duplicate, @ linked-doc Journal subtitles and CreateEdgeless wiring, and narrow 8px hover-only column resize drag with Row/Col axis menu dismissal.
2026-11-30 12:46:33 +09:00
DarkSky 2bf2e00e59 fix(database): pin scrolled table row grip, gate hidden calendar plus, and stabilize inline scroll 2026-11-30 11:46:26 +09:00
DarkSky d62eaa2aec fix(database): resolve inline edit overlap, row drop clip, and narrow view strip
Hide the underlying calendar chip label on the clicked week segment while its
inline title input is active, and create an empty-title day event ready for
in-place typing when clicking the calendar day header plus button.

Clip table row reorder drop lines strictly to the horizontal scroll grid area,
place the caret at the clicked character on single-click table title editing,
and carry single-source overflow view indices into the narrow desktop More
menu with toggle, Escape dismissal, and toolbar panel mutual exclusion.
2026-11-30 07:45:08 +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 2464632248 fix(playground): isolate multi-view picker ids and hidden-column drag order
Allocate media picker request identifiers from a process-global AtomicU64 counter.
Deduplicate desktop and web file pickers onto one request-bound callback path.
Keep direct PDF insertion independent from open media picker anchors.
Read picked desktop files through one bounded file handle.
Map visible table column drop targets past hidden view columns.
2026-11-29 23:08:13 +09:00
DarkSky 5a625a1601 feat(editor): add drag previews, drop slots, auto-scroll, and landing motion
Add PageDocSession::move_database_row for single-step row reorder and lane moves.
Paint kanban and calendar drag ghosts, source dimming, drop lines, and 160 ms settle motion.
Add table row handles, column header drag reorder, and full-height resize guides.
Paint page block tree drag previews and scroll near top and bottom edges.
Add edgeless 5 px snap guidelines, frame drop highlights, and transform HUD badges.
2026-11-29 22:32:33 +09:00
DarkSky 2eb0983e03 feat(editor): align database table, kanban, and calendar views with BlockSuite styling
Remove the outer database frame and merge tabs with Filter, Sort, and Group controls.
Paint table headers with 1 px hairlines and 100 px checkbox defaults.
Paint borderless 260 px kanban lanes with hover-only footer add buttons.
Wrap multi-select tags horizontally inside kanban cards.
Format calendar titles with full month names and 22 px tinted event bars.
2026-11-29 22:32:33 +09:00
DarkSky 09070d0317 feat(edgeless): add full-edge resize, outer-corner rotate, and rotated cursors
Hit-test full-length 8 px edge bands with 14 px corner priority.
Add outer-corner rotation zones for rotatable elements.
Enforce per-element ResizeMode rules and aspect-ratio locks.
Render 12 px circular corner handles and Note edge pills.
Map hover and drag cursors to 45-degree rotated sectors.
2026-11-29 22:32:33 +09:00
DarkSky 0151d5e591 style(web): format preview-workers test with oxfmt 2026-11-29 22:17:16 +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 2ce403df16 fix(editor): align scalar cell editor, edgeless note clip, calendar hover, and trackpad zoom 2026-11-29 19:44:08 +09:00
DarkSky e872a5a2f7 refactor(database): index prop:cells directly by columnId and honor reference title aliases 2026-11-29 19:01:30 +09:00
DarkSky e6f4c4313a feat(editor): add image toolbar, slash media authoring, and worker math font loading 2026-11-29 19:01:30 +09:00
DarkSky 6a87984317 fix(blocksuite): decode bare delta cell arrays and reconcile aliased row map keys 2026-11-29 17:46:38 +09:00
DarkSky 20ec72c4d4 fix(blocksuite): preserve legacy cell siblings, kanban multi-select tags, and wrapped card titles 2026-11-29 17:32:20 +09:00
DarkSky 69073d03db fix(blocksuite): unify database rich-text editing, multi-select arrays, and kanban drag 2026-11-29 15:40:02 +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