Commit Graph
1586 Commits
Author SHA1 Message Date
DarkSky 063afdfdca fix(edgeless): show text outside its stored frame
Keep the stored width for line wrapping.
Use the laid-out text bounds to decide if text is visible.
2026-12-04 04:32:24 +09:00
DarkSky 1a7ad80429 refactor(edgeless): use ui-tokens icons in presentation toolbar
Add StartPointArrowIcon, EndPointArrowIcon, LayerIcon, StopAiIcon, and ExpandCloseIcon to the icon token generator. Replace all five inline SVG constants in the presentation toolbar with static IconDef paints.

Remove the hand-written fullscreen exit stroke path and adopt the official ExpandCloseIcon vector shape. Add static source and rasterized alpha-mask regression tests for the presentation toolbar icons.
2026-12-04 03:54:49 +09:00
DarkSky c61a276d07 fix(frontend): Preserve host font configuration
Use default Serif fonts only with the default Desktop font set.
Bundle the Playground Serif fonts on native desktop targets.
2026-12-04 02:24:27 +09:00
DarkSky e6c8bded7c perf(edgeless): reuse surface geometry
Reuse paths and labels when surface elements move. Check both endpoints
before a connector reuses its route. Rebuild the items affected by edits.
2026-12-04 01:19:09 +09:00
DarkSky 10c0b03d39 test(room-sync): Wait for the relay to queue seed claims
Use a reply on the same WebSocket to order both waiters before the
original winner disconnects.
2026-12-04 00:28:52 +09:00
DarkSky c7f075a79c feat(playground): add editor fonts and presentation fullscreen 2026-12-03 21:45:06 +09:00
DarkSky db6580abe7 feat(edgeless): add frame presentation 2026-12-03 18:35:08 +09:00
DarkSky 3a75ecff4c feat(desktop): add the outline header and share menu icons
Add a Table of Contents header with a button that opens the sidebar.
Use the BlockSuite icons in the document menu and the outline header.
Keep the last outline tick when the rail has room for it.
Clear the active outline entry when its block stops being a heading.
2026-12-03 17:43:38 +09:00
DarkSky 207e250fdc feat(desktop): track the active heading in the outline rail
Each Page pane now marks its own active heading, as the Web 0.27.5
outline viewer does. The editor uses the layout and the scroll offset
of its own viewport. It selects the last laid-out heading whose center
is above the viewport center plus the heading height.

A click on an outline entry keeps that entry active until the page
scrolls again. A click on the title scrolls the page to the top.

The rail shows only on pages with at least one heading. A page with a
title lists the title first.

Inactive ticks are 20 x 2 px in black-10.
The active tick is 24 x 2 px in the primary text color. Ticks keep a
16 px pitch while they fit, then shrink to 2 px, and the rail clips the
rest.

Entries use weight 600, and the active entry uses the emphasis text
color. When the panel opens, the list centers the active entry. While
the panel stays open, only the wheel scrolls the list.

Tests: cargo test, cargo clippy, cargo fmt, check-invariants.sh,
check-l0-tier-a.mjs.
2026-12-03 16:15:42 +09:00
DarkSky c496a1bdd1 perf(frontend): remove unused desktop dependencies
Use the workspace y-octo features in the editor and playground.
2026-12-03 14:03:27 +09:00
DarkSky 9e9e564d3b fix(editor): resolve and dismiss desktop reference popups 2026-12-03 12:24:52 +09:00
DarkSky f10c254b03 fix(desktop): use the reference mode to open documents
Pass the effective mode to tab and split navigation.
Focus the target pane when a document tab restores its split.
Keep the document mode from an inline reference or Center Peek.
Clear the active Edgeless tool or selection on the first Escape.
Close Center Peek and restore source focus on the next Escape.
2026-12-03 11:01:45 +09:00
DarkSky f11c69cecd fix(database): clear Table cell focus before closing Peek 2026-12-03 09:24:55 +09:00
DarkSky bb53227364 fix(desktop): sync workspace media in write order
Track local media writes when editors change blob bytes. Apply writes in order and skip unchanged editors during shell sync.
2026-12-03 08:39:49 +09:00
DarkSky 549b9478fc perf(doc): project single database view column directly from crdt
Move database view types and parse_views into read/database_views.rs and re-export them from read/mod.rs.

Add DatabaseViewColumn::project_column to scan view.columns entries in place and read only matching column_id fields.

Share merge_fields between project and project_column so width, hide, and statCalcType follow one merge rule.

Use project_column in set_view_column_field to avoid exporting unrelated columns to JSON.
2026-12-03 08:11:19 +09:00
DarkSky 3d7ff37287 perf(desktop): prepare search queries once and sync blobs by cursor
Search:
- Add PreparedQuery. It folds the query to lowercase one time per search.
- Reject a field with a fast substring check before the UTF-16 span scan.
- Keep the scores and the highlight spans the same as before.

Desktop:
- Build the directory from one visible document list.
- Move each blob cursor past the blobs that the editor already has.
- Remove the blob caches of removed workspaces.
- Use a numeric element ID for the tab close button.

Quick Search:
- Shape the input line at the 18 px heading size that the modal paints.
- Type the first key into the field when the focus moves to it.
2026-12-03 07:04:50 +09:00
DarkSky 70bb09d772 fix(desktop): route Escape through the Center Peek editor
Let the editor dismiss transient controls before Center Peek closes.
Restore source focus and clear routes to trashed documents.
2026-12-03 06:51:35 +09:00
DarkSky e94ea95768 fix(database): skip unchanged view column edits
Use the same column projection for snapshots and writes.
2026-12-03 04:58:46 +09:00
DarkSky 9f97756eb9 fix(editor): guard Callout clicks and table previews
Reject clicks from an earlier opening of the Callout picker.
Use typed toolbar snapshot IDs.
Use the physical column count for table grow previews.
2026-12-03 04:35:54 +09:00
DarkSky fd636581e3 fix(database): preserve view edits and lane order
Skip writes when all entries for a column have the requested value.
Create the shared lane array with each new grouped view.
Keep the manual lane order when a user moves a card.
Merge duplicate view entries by key in one pass.
2026-12-03 04:11:36 +09:00
DarkSky 24ed5ec97f fix(editor): keep dynamic snapshot IDs out of production Wasm
Add `ui::SnapshotId` and the `ui::snap_id!` macro. Under `harness`, the
macro formats its arguments into the ID.

In other builds, `SnapshotId` has zero size. The macro type-checks its
arguments in a branch that never runs, so no ID text gets into the
binary.

`SharedString` gets `From<SnapshotId>`, so `snapshot` keeps its
signature and literal IDs need no change.

The toolbar icon button, the toolbar menu row, the context menu row,
the block menu row and the image lightbox control take a `SnapshotId`.
A caller that gives a plain string does not compile.

Remote cursors and selections, presence badges, the doc panel, the
record sheet and the block toolbars now build their dynamic IDs with
`ui::snap_id!` instead of `format!`.

`check-snapshot-prefixes.mjs` checks the prefixes of these IDs and
accepts more than one Wasm file.
2026-12-03 03:32:46 +09:00
DarkSky 0f2537a376 fix(editor): trim table tails by physical position
Use physical row and column positions for trim previews and commits.
Keep cells shared with the remaining rows and columns.

Move table axis menus into their own module and use static swatch strings.
Keep fragments on pasted canvas links and share the mobile search offset helper.
2026-12-03 03:15:00 +09:00
DarkSky 00b3fd2337 fix(edgeless): validate label ancestry and bound hover allocations
Check every parent group and mind map before a label write.
Close the label editor when a format action finds a lock.
Resolve shallow group hovers without heap allocation.
Keep rotated quick connect ports and align canvas outlines.
2026-12-03 02:35:08 +09:00
DarkSky 4ea9100aee fix(edgeless): cache the first Page Note and check snapshot conditions
Store the first Page Note position when the header index rebuilds.
Read that position when the canvas draws the header.

Pass each required view path as a separate argument. Ignore Rust
comments and literals when matching test module braces. Reject
harness and mixed test conditions on file module declarations.
Keep the Wasm PDF module available to native unit tests.

Model: GPT-6.2 Sol.
Tests: Python, Cargo fmt, Clippy, and Cargo unit tests.
2026-12-03 02:19:52 +09:00
DarkSky 21d8948c9d fix(database): end stale board drags and move one lane entry
Cancel the database drag, its previews and its settle motion when the
view loads another document, switches pages, or becomes read only. A
release after that writes nothing to the new page.

Move a Kanban lane inside the stored lane array. Remove and insert only
the moved entry, so peer edits to the card order and visibility of the
other lanes merge. Write a new lane array only when the view has no
lane array or keeps the lanes in a plain object.

Keep drag moves free of string copies. Write the drag state back in
place, and find the lane bounds in one pass.

Return the row count for Count All without a read of the cells. Collect
the values only for the median and fold the other numeric statistics.

Models: Claude Opus 5.5. Tests: cargo test (blocksuite-playground-doc,
blocksuite-editor, playground with the harness feature), cargo clippy,
bs-harness audit-states.
2026-12-03 01:04:52 +09:00
DarkSky cd590346b0 perf(editor): speed up table trim previews and hover
Compare small sets of axis IDs directly and use hash sets for larger sets.
Check the row ID once for each row in the table layout.
Move the preview code into a table paint module.
Reuse the table bounds to classify both pointer positions.

Model GPT-6.2 Sol.
Tests used the Rust test harness.
2026-12-03 01:00:20 +09:00
DarkSky 9ed267770f fix(editor): close link, table, canvas, and code gaps
Validate the hovered link before paint and before Open or Copy.
Fit and scroll the table axis menu in short panes.
Keep Group available in either mixed selection order.
Keep the top of a rotated shape in place as its label grows.
Show a scrollbar thumb under overflowing code.

Model: GPT-6.2
Tests: Rust unit tests and Linux headless input replay.
2026-12-03 00:19:14 +09:00
DarkSky 73c4150dc4 perf(edgeless): reuse the note header index across frames
The Edgeless note header pass walked the root tree on each frame. It
rebuilt two maps, copied the page title and formatted element ids.

- Keep a NoteHeaderIndexCache in EdgelessCanvasState. The document
  epoch, the page id, the document revision and the snapshot
  allocation key the index. A frame without header candidates returns
  at once.

- Collect the Frame title pills only for an expanded Page Note header.
- Use static element id prefixes with a stable FNV-1a hash of the
  block id.

- Format snapshot ids with format_args at each snapshot call. Release
  builds then keep no snapshot id text. Remove the SNAPSHOT_IDS cfg!
  constant.
- Split chrome/note_header.rs into mod.rs and paint.rs.

The fold reads the note lock and the lock of each parent Group from the
current snapshot when it writes. A lock change after the last paint now
applies. A visited set stops the walk on a Group cycle.

check-invariants.sh now also rejects cfg! macros and multi-line cfg
predicates that name the harness feature or test.
2026-12-02 23:44:39 +09:00
DarkSky 5c0e0d5540 fix(edgeless): align canvas outlines and rotated connections
Keep the shape rotation and use its ports when a quick-connect click
adds a linked shape. Edit the new label in place.

Show a hover outline and keep the group border clear of the title.
Write label background colors to shared text.

Keep dropdown snapshot IDs at the call sites so the production Wasm omits them.
2026-12-02 23:07:49 +09:00
DarkSky 3b1ff2542f fix(editor): route canvas links and scope Callout icon edits
Use the workspace origin for canvas cards. Route card and Bookmark links through the editor.
Keep the Callout picker in its own pane and cancel preedit before it closes.
2026-12-02 22:39:12 +09:00
DarkSky 5d4122b17a perf(database): skip row band indexing for ordered cells
Merge cells into the latest Table band when their row IDs and positions
match. Append bands in visual order and build the bucket index only
when a cell goes back. Use linked buckets for cells that arrive out of
order.

Use a hash set to find rows to delete. Prepare search once per view.
Share the groups used by table layout and row selection. Check whether
a popover is open without laying it out. Remove default view state.
2026-12-02 22:37:30 +09:00
DarkSky 7515eebd76 fix(edgeless): correct the selection toolbar and color picker
Hide the toolbar during canvas pans. Keep More visible on narrow viewports and add Lock to its menu.

Show shared actions for mixed selections. Use the text color glyph for EdgelessText and show the standard color grid.
2026-12-02 22:30:47 +09:00
DarkSky 38b9e02f9e fix(editor): preserve desktop table controls and use V2 colors 2026-12-02 22:25:11 +09:00
DarkSky ab7ef04aa9 fix(editor): align database controls and embedded toolbars
Correct database calculations and show hints over empty footers.
Keep code tools in the canvas when a note nears the top edge.
Preserve linked documents when the desktop directory replays a create request.
2026-12-02 21:36:49 +09:00
DarkSky cb3e658654 fix(editor): show link popups in active notes
Use the note camera to hit inline links and document references.
Show Copy link to block in the code block More menu.
2026-12-02 21:22:12 +09:00
DarkSky 81870088c2 fix(desktop): restore workbench input and layout
Use the shaped Quick Search line for pointer input and IME bounds.
Support copy and cut in Quick Search.
Close the narrow sidebar drawer after navigation from Quick Search.
2026-12-02 20:52:49 +09:00
DarkSky 1282738ec1 feat(database): reorder Kanban lanes by dragging headers
Keep the full lane order, including the ungrouped lane.
Use the preview position when a peer reorders lanes during a drag.
Keep date values visible while the date picker owns edits.
Clear stale hover when the database search closes.
2026-12-02 20:46:58 +09:00
DarkSky a3a7496b4c perf(blocksuite): eliminate snapshot ID leaks and table/toolbar hot-path work
Remove harness snapshot ID literals from production Wasm Section 11 across 36 prefixes.
Extend `check-snapshot-prefixes.mjs` to lock those 36 prefixes and bare container IDs at zero.

- Clip table grow preview to visible viewport rows and columns in one pass.
- Defer page table cell focus label formatting behind lazy evaluation.
- Compare derived four-state table edge zone on pointer hover to skip center redraws.
- Reuse shared `toolbar_chrome` geometry constants and color tokens in edgeless chrome.
- Replace multi-pass selection scans and `rotate().transform_point()` math with single passes.
2026-12-02 20:36:12 +09:00
DarkSky 65460a7f13 fix(editor): cancel stale code toolbar clicks 2026-12-02 19:26:22 +09:00
DarkSky 9def8ed791 fix(desktop): sync linked documents and media across panes
Use the workspace directory for mentions and persist documents created in the editor.
Share media bytes within each workspace so split panes and previews can display them.
Use the browser date for journals and link the Outline to heading blocks.
2026-12-02 18:47:28 +09:00
DarkSky dfc8446ba2 fix(editor): guard code menu actions and translate pane input bounds 2026-12-02 18:13:38 +09:00
DarkSky 155f30f3b8 fix(blocksuite): reduce table and toolbar overhead
Release cached table axes when a block leaves the document.
Read label marks from the shared text delta.
Reuse pending toolbar timers and keep the final frame.
Convert pasted string labels to shared text.
Share the transaction code for compound edits.
2026-12-02 18:13:38 +09:00
DarkSky f5002e1eda perf(database): borrow database data and delete rows in one pass
Build the Table row bands in one pass over the hits. Each row id links
its bands, so a cell finds its band in constant time.

Read the database data and the view state of a block by reference on
the hover, drag, key and click paths. These paths no longer copy the
whole database.

Delete many rows with one read of the block graph. Each run of adjacent
rows is removed with one array edit, in one undo step. Row selection
and the Kanban lane menu use this path.

Look up a fresh row id in the blocks map instead of a decoded page
snapshot.

Format and lay out the hidden fields of a record only while their
section is open.

Open record URLs through the shared editor URL handler. Build the
snapshot ids of record notes and Calendar resize handles lazily. Use
the accent foreground token for the today button.
2026-12-02 17:51:02 +09:00
DarkSky 77d76401a2 fix(editor): anchor Callout emoji candidates to the caret 2026-12-02 15:31:12 +09:00
DarkSky 8e1e32acdf feat(edgeless): add note headers and canvas navigation
Scale Page Note headers and their controls with the Note and camera.
Use the Note screen bounds to size the header.
Clip collapsed Notes to their stored canvas bounds and fit the
camera to those bounds.

Save the title fold and canvas height in one edit. Keep the stored
clip height on expand. Show the bottom clip control only on Notes
without a Page header.

Open linked documents from the header and route canvas navigation
through the desktop editor host.
2026-12-02 15:31:12 +09:00
DarkSky f5df9b27be feat(editor): complete code toolbar copy actions
Add Markdown and block link copy actions to the code toolbar menu.
Use window coordinates to hit-test the More button in embedded panes.
2026-12-02 15:10:56 +09:00
DarkSky 4e2ad7d416 fix(edgeless): support Page controls in active notes
Map Page block controls, table editing, and block moves through
the Active Note camera. Share the database view state between
the Page flow and the Note paint pass.

Place database popovers within the editor pane. Use window
coordinates for paint, pointer hits, scrolling, and IME.
Position popover hitbox elements relative to the pane.

Support media and caption editing inside active notes. Capture
mouse moves and release during image resize as soon as the drag
starts. Keep database and media writes behind read-only gates.
2026-12-02 15:10:56 +09:00
DarkSky 3b972c667a feat(edgeless): add selection toolbar actions
Add font controls and a shape drag handle. Show the short shape color
palette, and keep toolbar dividers within their rows. Add frame, group,
and clipboard actions to the More menu.

Copy selection links with the workspace origin. Encode document blocks
and surface elements in their own query parameters.
2026-12-02 14:59:13 +09:00
DarkSky 04db94c6d1 feat(database): add date picker, row selection, search and statistics
Open a month picker for date cells and stretch one-day calendar events.
Select visible table rows and delete them in one undo step.
Move table focus with the keyboard.
Add named Kanban groups from the board.
Filter each view with Search and save footer statistics per column.
2026-12-02 14:59:13 +09:00
DarkSky 7453b4aee2 feat(editor): add Callout emoji search
Place the search caret at the clicked character. Keep the picker and toolbar menus mutually exclusive.

Keep one full emoji row above the phone keyboard.
2026-12-02 14:51:59 +09:00