Commit Graph
11869 Commits
Author SHA1 Message Date
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 864848c3cb feat(desktop): add document page width controls 2026-12-03 17:06:07 +09:00
DarkSky 07108eab54 fix(desktop): use shared icons and hover colors
Use BlockSuite icons in the desktop shell. Apply the menu hover color to menu items and toolbar buttons. Apply the list hover color to document rows.
2026-12-03 16:50:17 +09:00
DarkSky 5383bfe57e feat(desktop): add Quick Search groups and shortcuts 2026-12-03 16:33:37 +09:00
DarkSky a80af5370e fix(desktop): Float the sidebar and isolate journal split clicks 2026-12-03 16:19:28 +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 2cca599c4a test(server): count MCP reconcile work and check image updates 2026-12-03 16:07:08 +09:00
DarkSky c368500dfd refactor(ui,mobile): extract shell icons into ui-tokens and align mobile views
Extract 15 official BlockSuite shell icons into ui-tokens and regenerate icons.rs.

Replace the 13 inline SVG constants in packages/frontend/mobile with the generated icons.
Use FolderIcon for explorer folder rows and SidebarIcon for the workspace drawer button.
Keep RTL mirroring and light or dark tinting across mobile views.
2026-12-03 15:59:37 +09:00
DarkSky 4317d3c645 fix(desktop): align peek, sidebar and search colors with web tokens
Center peek:

- Remove the card shadow. The web card shows no shadow because a
  parent of the same size clips it. The old shadow darkened the
  backdrop outside the card.

- Use the overlay panel background for the card and keep the primary
  background for the document body.

- Use `--affine-v2-centerPeek-buttonBackground` for the side controls.

Sidebar:

- Use `--affine-v2-layer-background-hoverOverlay` for the hover and
  active state of the navigation rows and for the hover state of the
  section headers.

- Use `--affine-hover-color` for the hover and active state of the
  tree nodes.

Quick search:

- Use the secondary background for the selected row and the tertiary
  background for the shortcut keycaps.

Remove the unused `danger_soft` and `success` palette fields.

Add light and dark tests for each color. A pixel test makes sure that
the peek view changes no pixel outside the card except for the
backdrop.
2026-12-03 15:39:46 +09:00
DarkSky ce77f09618 fix(desktop): reveal the first app tab on keyboard entry
Show the first tab when Tab enters the strip after a horizontal scroll.
Use the web background colors for inactive and active tabs.
2026-12-03 15:33:28 +09:00
DarkSky ca71000477 perf(desktop): virtualize inspector backlinks and split right sidebar
Virtualize the Backlinks section in Properties with `ui_kit::VirtualList::fixed` on the outer scroll container. Measure the Backlinks top offset and viewport height with lightweight canvases so only visible and overscan rows mount. Clamp scroll offsets when backlinks shrink or move to Trash.

Update the empty Outline message in the inspector to match Web 0.27.5 (`Use headings to create a table of contents.`). Move `resolve_tag_color` and `FALLBACK_TAG_RGB` into `views_extra/mod.rs` so the inspector and docs explorer share one color source.

Split `views_extra/right_sidebar.rs` into `right_sidebar/{mod,outline,properties,tests}.rs` and split `views_extra/tests.rs` into `tests/{mod,outline_rail,virtual_rows}.rs` to keep each file below the 800-line limit.
2026-12-03 15:33:28 +09:00
DarkSky 44c504176f fix(web): Restore HTML preview wheel input under strict CSP
Move Desktop startup to a module and read fonts and workers from its manifest. Allow the HTML preview wheel bridge by hash on both hosts. Check the hash against the source and verify that Chromium returns wheel input to the canvas.
2026-12-03 15:26:07 +09:00
DarkSky 91e074a40a fix(desktop): Keep Today visible in folded journal splits
Allow space for the split close button and keep the week controls visible.
Exercise the Today click after opening a split and resizing the window.
2026-12-03 14:55:10 +09:00
DarkSky 9687cbb676 fix(desktop): keep the active and focused tabs visible
Check the strip width after layout. Keep manual scroll when the user moves the active tab out of view.

Show each focused tab as keyboard focus moves. Keep the close buttons in the tab order.
2026-12-03 14:49:15 +09:00
DarkSky f13cf4a110 fix(desktop): Keep journal week navigation visible
Keep the week picker mounted at narrow pane widths. Move Favorite and
View info to the journal menu. Show Today on journal documents when the
pane has at least 300 pixels.
2026-12-03 14:40:08 +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 d790bd43a2 perf(desktop): virtualize the app tab strip and unify the unhydrated tag color
The app tab strip built every tab in each frame. With 1,001 tabs, a hot
frame allocated 12.0 MB. The strip did not scroll, so the tabs at the
end were not available.

Scrolling:
- Each tab is 200 px wide with a 4 px gap.
- A wheel or a trackpad scrolls the strip sideways.
- The scroll position stays in the content range after tabs close.
- A change of the active tab scrolls that full tab into view.

Mounting:
- The strip mounts only the visible tabs and two tabs on each side.
- Each tab keeps its pane index in its element ID and close button.
- When the tabs fit, the layout is the same as before.

Tag chips:
- The All Docs list and grid now draw a tag without a color in #64748b.
- The document inspector uses the same color for such a tag.
2026-12-03 13:30:01 +09:00
DarkSky 9f4c1502ec fix(desktop): Align journal navigation and show read-only status 2026-12-03 13:28:04 +09:00
DarkSky e11104d658 perf(server): remove duplicate block extraction in MCP list rewrite
Move the editable block reconciler of `mcp.rs` into the new module
`mcp/reconcile.rs` and remove redundant work from it:

- Return early when a sequence has no old blocks and no new blocks.
  Leaf list items no longer allocate an empty nested reconcile state.
- Use one `visited` set for all exact-index extractions.
- The flavour phase now calls `apply_block_update_in_place` directly.
  An old block that the exact phase did not take cannot be equal to an
  unassigned new block, so the second extraction is unnecessary.
  The image update in `mutate_doc_body_delta` keeps the equality check.

Add test-only work counters. A unit test rewrites 500 and 2,000 list
items and makes sure that each old block is extracted once, that one
sequence runs, that all block IDs stay the same, and that the work is
linear.

The 2,000-item integration test no longer measures wall-clock time.
It now makes sure that the 2,000 list block IDs stay the same, that all
items are in order, and that the size guard rejects a body above 1 MiB.
2026-12-03 13:25:50 +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 ed17ce9008 refactor(desktop): align settings modal with Web 0.27.5
Remove the sidebar toggle from Appearance settings.
Move Display language from a separate tab into the Theme section under Color Scheme.
Remove the static export placeholder from Storage settings and update its subtitle.
2026-12-03 13:01:10 +09:00
DarkSky 0a56c8e396 perf(store): Limit share destination and collection reads 2026-12-03 12:42:12 +09:00
DarkSky 973588a31d fix(desktop): use theme tokens in Center Peek
Use the modal backdrop and card shadow tokens in both themes.
Check the backdrop and shadow in the rendered frame.
2026-12-03 12:25:40 +09:00
DarkSky 9e9e564d3b fix(editor): resolve and dismiss desktop reference popups 2026-12-03 12:24:52 +09:00
DarkSky f447fbee6a fix(desktop): restore topbar title contrast in dark mode 2026-12-03 11:31:18 +09:00
DarkSky 7f288f6bfa fix(desktop): use theme tokens for menus and dialogs
Use shared shadow tokens for menus, Quick Search, and dialogs.
Use the Web V2 scrim for shell dialogs and keep the Settings scrim.
Resolve All Docs tag colors from workspace definitions and the active theme.

Model: GPT-6.2 Sol.
Checks: Cargo tests, Clippy, rustfmt, frontend invariants, and L0 Tier A.
2026-12-03 11:18:47 +09:00
DarkSky be6ba2e561 perf(desktop): check navigation list presence
Skip definition reads when a navigation edit only checks for a list.
2026-12-03 11:05:15 +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 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 3ec3d72fc5 fix(web): keep updates after a queued document delete
Find the last queued delete for each document. Discard failed updates
before that delete and keep updates that follow it.

Model used: GPT-6.2 Sol.
Tests: Node.js and Chromium.
2026-12-03 10:22:53 +09:00
DarkSky a2d537ac25 fix(desktop): preserve showcase links and inspector tags
Read legacy tag membership from the workspace root before the first tag edit.
Keep the original sync seed clocks and append the page reference.
Use the same theme colors in both sidebars.
Show a color dot for each document tag before navigation reloads.
Skip the navigation snapshot when the edit writes no changes.
2026-12-03 10:14:06 +09:00
DarkSky cb3005de9c fix(desktop): limit work for queued document updates
Write document updates directly when media writes succeed and the queue
is empty. While media writes pause, merge chunks of equal size. Flush
the remaining chunks in order and keep frames that cannot merge.

Use weak references for submitted media so replaced buffers can drop.

Tests use the Rust test harness.
Model: GPT-6.2 Sol.
2026-12-03 10:12:23 +09:00
DarkSky 56c08077b3 perf(desktop): use compact workspace and trash element IDs 2026-12-03 10:04:23 +09:00
DarkSky 92b166dace fix(desktop): keep the outline position when the list shrinks
Save the clamped offset when the heading list shrinks.
Use a static name and an integer hash for the scroll state key.
2026-12-03 09:55:15 +09:00
DarkSky 16c509a356 test(desktop): verify document persistence after reload
Wait for title focus before the browser enters text. Read the stored
document mode, title, and paragraph from the V1 updates. Check the
browser click positions against the desktop layout.
2026-12-03 09:45:02 +09:00
DarkSky eb1f0c4985 fix(desktop): save media and document updates in one transaction
Save media with the document updates that refer to it. Read all stored
media of a workspace in one transaction when it has documents.

Release older bytes when a later write replaces the same blob. Confirm
the older write after all replacements commit. Keep document edits in
order during a quota pause and scan the queue only for blob writes.

Model used: GPT-6.2 Sol.
Tests: Node.js, Chromium, TypeScript, Oxlint, and Oxfmt.
2026-12-03 09:40:49 +09:00
DarkSky f11c69cecd fix(database): clear Table cell focus before closing Peek 2026-12-03 09:24:55 +09:00
DarkSky 241210c222 chore(frontend): guard desktop snapshot prefixes
Scan production Rust files under the desktop crate for snapshot prefix
liveness. Add the six desktop prefixes to the WebAssembly Section 11
zero-hit gate. Add unit tests for desktop source liveness, test
module filtering, and WebAssembly section matching.
2026-12-03 09:18:21 +09:00
DarkSky 0b99ccff9a feat(desktop): virtualize the outline rail and match the web geometry
The open outline panel mounted one row for each heading. With 512
headings, each frame built 514 rows. The panel now mounts only the rows
in its visible window and two rows of overscan above and below it.

The panel keeps its own scroll offset and clamps it to the content
height.

The rail now uses the geometry of the web outline viewer:

- A pane at or below 640 px shows no rail.

- The rail starts 204 px below the pane header and keeps 76 px free
  below it. It is no longer centered and has no 384 px list limit.

- The tick column is 22 px from the pane edge. The open panel is
  200 px wide, uses 8-4-8-8 px padding and stops 32 px from the pane
  edge.
2026-12-03 08:53:03 +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 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 e78fc17345 fix(store): preserve concurrent workspace navigation edits
Initialize shared root lists and keep legacy navigation fields during migration.
Replace collection rows so concurrent renames and shares can merge.
Seed the desktop showcase with tag definitions and collection rules.
2026-12-03 08:25:31 +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 53280c5db2 fix(ios): stop the cold WebContent race in the legacy storage probe
The iOS Simulator smoke test can fail with a probe timeout on a cold
GitHub runner. The first WKWebView of the process can wait more than
15 s for the WebContent XPC handshake.

- Increase the default navigation timeout of LegacyLocalStorageProbe
  from 15 s to 45 s. Increase the default evaluation timeout from 10 s
  to 20 s. Tests that inject a timeout scheduler do not use these values.
- In the 0.27.5 upgrade drill, run the real probe and the first
  bootstrap before the fail-closed timeout check. The first WKWebView
  of the process then completes the cold handshake and is not removed
  immediately.
- Run the fail-closed timeout check on a separate copy of the
  unmigrated Documents directory. Make sure that the legacy database
  bytes do not change.
2026-12-03 07:51:51 +09:00
DarkSky f45bc95361 fix(desktop): use workspace tag definitions in search
Show current tag names and colors. Hide tags that the workspace deletes.
Filter documents by tag before scoring. Cache up to eight results per tag query.
Keep search row snapshot names in harness builds.

Before the first tag edit of a workspace writes its tag table, record the tags
of all its documents, including trashed documents.
2026-12-03 07:48:37 +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 d9b776c34e fix(desktop): persist workspace media across reloads
Record media replacements in the order that editors report them.
Save media before the document updates that reference them.
Wait for all queued writes before an explicit flush completes.
Pause failed media writes until a new write or an explicit flush.
Restore live documents from Web Desktop URLs.
2026-12-03 06:56:39 +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 78143d3d13 fix(desktop): sync link graph, cache outline, and hash dynamic IDs
Update outgoing document references and reverse LinkGraph edges together across CRDT updates, undo, trash transitions, and lazy hydration. Preserve on-demand hydration for trashed documents while keeping them out of active backlink edges.

Cache outline heading projections by workspace, document, and revision in both the outline rail and right sidebar inspector. Reuse the shared heading slice across body-only edits when headings stay identical.

Resolve inspector tag chip and option colors against the active light or dark theme tokens. Replace dynamic heading, tag, and link element IDs with hashed integer IDs while keeping harness snapshot strings behind `ui::snap_id!`.
2026-12-03 06:51:06 +09:00
DarkSky 2db0d21191 fix(desktop): unify journal selection and split settings modal
Align the desktop journals view with the document store contract so every entry picks the smallest document ID. Bind rendered journal title buttons to their drawn document ID and fall back to date lookup when absent. Replace dynamic date string IDs with NamedInteger IDs to remove dynamic date prefixes from Wasm data.

Check whether a journal exists for the current date directly on stored document entries. The topbar no longer collects the full journal vector per frame.

Split the desktop settings modal into pages and controls modules. Convert all four shadow color channels through Rgba.
2026-12-03 06:48:38 +09:00