Commit Graph
11913 Commits
Author SHA1 Message Date
DarkSky 49f4e53cac feat(desktop): add sidebar section menus, empty states, and new-tab routing
Align AppSidebar section headers, row menus, and Web new-tab navigation
with AFFiNE 0.27.5:

- Add Favorites, Organize, Tags, Collections, and Others empty-state
  prompts and inline creation actions, plus right-click and three-dot
  menus across non-active document, tag, collection, and folder rows.
- Open document, tag, and collection "Open in new tab" actions as real
  browser tabs on Web Desktop (/desktop/?workspace=...&doc|tag|collection=...)
  and persist tag/collection view routes across reloads via SavedView
  and start.js URL sync.
2026-12-04 10:26:10 +09:00
DarkSky 9b75a4adc8 perf(editor): reuse table cell layouts 2026-12-04 10:21:41 +09:00
DarkSky 6f2778bafa feat(desktop): add tag picker toggle and collapsible link sections
Align the document Properties sidebar and the Page information dialog
with AFFiNE 0.27.5:

- Keep all workspace tags visible in the tag picker with checkmarks on
  selected tags, click or Enter toggling, and explicit selection index
  restoration across search filter edits.
- Add collapsible Outgoing links and Backlinks section headers with
  bidirectional Tab and Shift+Tab focus traversal shared cleanly across
  the workbench and modal scopes.
2026-12-04 10:03:27 +09:00
DarkSky 0223894d82 perf(client): score search fields before building hits
Search now scores documents without allocations and builds highlights
only for the documents it returns.

- `PreparedQuery` lowercases each field into a reusable `QueryScratch`
  buffer. ASCII text uses ASCII lowercase and skips UTF-16 tables.
  Other text uses `str::to_lowercase()`, and maps lowercase bytes to
  source UTF-16 ranges only when the field contains the query.

- `score_with_scratch` returns the field score without highlight spans.
  `match_utf16_with_scratch` returns the same result as `match_utf16`.

- With a limit, `WeightedSearchEngine::search_refs` keeps the best
  documents in a bounded heap. Then it builds hits for those documents
  only. Ties resolve as in a stable full sort.

- With no limit, search matches each document once and sorts the hits.

On 4,096 documents with 2,048-byte bodies and a limit of 20, a query
that matches every document allocates 0.04 MB instead of 188 MB.
2026-12-04 09:43:21 +09:00
DarkSky d18b6bbc2c feat(desktop): add right-sidebar frame panel and live thumbnails
Align the Edgeless right-sidebar Frame slide panel with AFFiNE 0.27.5:

- Add the Frame inspector tab with All frames count, Presentation stage
  trigger, empty-state guidance, ordered slide cards, live canvas
  selection sync, and click-to-center navigation.
- Render live frame thumbnails directly from `PreparedEdgelessScene` in
  unified scene paint order across notes, surface elements, and text,
  and fit the active slide on the first fullscreen presentation frame.
2026-12-04 09:30:33 +09:00
DarkSky c0de995075 fix(desktop): restore keyboard control in the Trash confirmation
Keep keyboard focus in the confirmation and return it to the trigger on cancel.
Keep the buttons visible as the message scrolls in short windows.
Use the Web tooltip colors and dimensions for Trash and Center Peek.
2026-12-04 09:27:11 +09:00
DarkSky 564b31e49e feat(desktop): open copied block and element links across web and desktop
Align copied block and canvas element link navigation and table Markdown
export with AFFiNE 0.27.5:

- Parse and route Web `/desktop/?workspace=…&doc=…` links carrying
  `blockIds` or `elementIds` on cold start and live navigation, selecting
  all linked Page blocks in document order or centering and selecting
  linked Edgeless elements across frames.
- Export inline `@reference` page chips inside table cells as `[Title](url)`
  links during `Copy as Markdown`.
2026-12-04 09:24:31 +09:00
DarkSky c7e48d5cb3 feat(desktop): add explorer row menu and journal day activity
Align the document explorer and the right-sidebar journal panel with
AFFiNE 0.27.5:

- Add the explorer row menu (favorite, new tab, split view, center peek,
  duplicate, and move to trash with confirmation), hover favorite star,
  Shift+Click range selection, two-step Escape dismissal, New doc menu,
  and searchable tag switcher breadcrumb.
- Add right-sidebar journal calendar activity dots, local-time-zone
  Created and Updated document lists (pre-parsed TZif and IEEE 1003.1
  POSIX Mm.w.d, Jn, and n date rules), and same-day journal list with
  trash confirmation.
2026-12-04 08:55:43 +09:00
DarkSky 657a2b0b03 perf(ui): skip paint operations on the rounded clip root scene
The rounded clip compiler replays the frame into a scratch root scene.
It then replaces the operation stream of that scene with the original
stream. Before this change, the root scene recorded each operation
again, and the compiler discarded that copy without a read.

Add a private flag on `Scene` that stops the recording, and set it only
on the scratch root scene. Child clip scenes keep their streams, because
the empty-group check reads them. The compiler clears the flag before it
returns the scene.
2026-12-04 08:16:47 +09:00
DarkSky 5968d54aaa ci(frontend): ratchet 83 snapshot prefixes in production wasm
Add 15 verified desktop sidebar, outline, trash, journal, and resize snapshot prefixes to ZERO_IN_PRODUCTION.
Check uniqueness and non-redundancy across the added prefixes in unit tests.
Update packages/frontend/AGENTS.md to list desktop source liveness alongside BlockSuite crates.
2026-12-04 07:44:17 +09:00
DarkSky afdc4c0f54 perf(mobile): search borrowed document views without cloning
Add SearchDocumentRef and WeightedSearchEngine::search_refs so callers search live records by reference.
Keep WeightedSearchEngine::search as a wrapper with identical scores, tie-breaking, and UTF-16 highlight spans.
Route MobileAppState::search_hits through search_refs to remove per-query title, tag, and preview clones.
2026-12-04 07:35:03 +09:00
DarkSky 9a158a3086 fix(desktop): Scroll short modals and wire trash footer Tab focus
Split page property panels into links and tag input modules so modal
dialogs scroll independently inside short viewports. Route Tab and
Shift+Tab from read-only trashed document previews through the trash
footer actions and show button tooltips.
2026-12-04 07:32:18 +09:00
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 9a23ae7513 fix(desktop): Keep the sidebar resize line visible during drag 2026-12-04 06:09:28 +09:00
DarkSky b817bd251d refactor(frontend): tighten harness gate, ratchet prefixes, and move icon
Check (package, kind, name) tuples for harness Cargo targets in check-invariants.sh. Duplicate target names of another kind now fail the check.

Add desktop.app_tabs.tab., desktop.split.resize., and desktop.explorer.group. to ZERO_IN_PRODUCTION. Update the snapshot prefix test count to 68.

Extract PresentationIcon into ui_tokens::icons::PRESENTATION. Replace the inline SVG in edgeless/present.rs with that static icon definition.
2026-12-04 06:09:28 +09:00
DarkSky d0f4d0b0ec feat(editor): align block menu copy actions, conversions, and short-viewport scroll
Add Copy as Markdown and Copy link to block to the drag-handle menu and
format toolbar More menu. Export inline page references as Markdown
links, parse ordered multi-block Page URLs, align Turn into options, and
scroll the drag-handle menu inside short viewports.
2026-12-04 05:53:46 +09:00
DarkSky 9864df9d5f fix(desktop): Match Web resize handles
Show the same line and shadow on split dividers during hover and drag.
Use the sidebar accent token for the fixed and floating resize handles.
2026-12-04 05:13:44 +09:00
DarkSky c5ee94a3bf perf(desktop): virtualize sidebar rows and strip snapshot strings
Store compact row references in the sidebar tree index instead of full
row strings. Build full row data only for rows inside the visible
window, and hash structured keys into numeric element IDs.

Replace dynamic snapshot format strings in sidebar and outline rail
elements with fixed static literals via `ui::snap_id!`.

Use the hover overlay color for the sidebar row action buttons, as the
Web `IconButton` does. The hover test now checks the section add button.
2026-12-04 05:13:44 +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 099a308c91 feat(desktop): add trash preview footer and inline tag creation
Open trashed documents from Trash in a read-only pane, split view, or
tab. Exit presentation mode when the active document moves to the trash,
and render the Trash preview footer with 56x36 px restore and permanent
delete icon buttons and confirmation dialog.

Share the live Properties view and inline TagInput across the right
sidebar and the Page information dialog. Support UTF-16 IME filtering,
inline tag creation, scrollable candidate keyboard reveal, empty-query
tag chip selection and removal, and modifier-click navigation on
outgoing links and backlinks.
2026-12-04 05:02:25 +09:00
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 46c44feba2 fix(desktop): Match Web settings navigation and font slider 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 8da16f102f perf(desktop): read explorer tag names in place and align topbar chrome
Explorer row keys now read tag names from the shared document views
without a copy. Each frame of the docs explorer built a new string for
each tag of each document. With 1,024 documents and 4 tags each, one
frame now makes 4,182 fewer allocations (11,524 to 7,342).

Topbar and explorer icon buttons use the 4px radius and the hover
overlay of the web IconButton. The explorer row menu uses the vertical
"more" icon. The active app tab has a 1px innerBlackBorder ring outside
its bounds. A three-pane divider draws a 3px line in the primary button
color with a 15% soft glow (0 12px 21px 4px) on hover and while it
resizes.

Topbar, tab, menu and divider controls take numeric element IDs, and
their snapshot IDs build only in harness builds. An app tab keeps its
element ID by tab ID, so its state follows the tab when tabs before it
close.
2026-12-04 03:33:15 +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 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 59b28730b7 fix(desktop): scroll focused settings controls into view on keyboard navigation
Scroll the settings navigation and page panes when Tab, Shift+Tab, or control keys focus or activate an offscreen control.
Refresh the window inside FocusStop::reveal when the scroll offset changes, attach Enter and Space reveal handlers to selected switch options without writing unchanged preferences, and derive compact navigation from the optional scroll region.
Add short-window forward, reverse, and wheel-scrolled keyboard regression assertions across 700x480, 640x400, 390x640, and 800x260 viewports.
2026-12-04 02:09:51 +09:00
DarkSky 22649e8852 perf(ui): keep path triangles on the GPU between frames
Keep the triangles of a path in an Arc with an identity. A change gives the triangles a new identity. The process never gives an identity twice.

Paint a path without a copy of its vertices. The scene path shares the triangles and keeps the scale factor and the paint transformation. The vertex shaders scale and transform the vertices in the order of operations of the CPU code. The Metal shader turns off fast-math contraction and reassociation for this.

A GPU can fuse a multiply and an add into one rounding. For a rotation or a skew, the renderer thus keeps screen positions that the CPU placed. The GPU still scales the vertices for the local clip.

Keep the triangles of each identity in a pool on the GPU. Append only the triangles that no earlier frame drew. Replace the pool when it is full or when the frame uses less than one eighth of it. Never write to a part of the pool that a frame can read. After a failed upload, forget the pool.

Draw each path with one 144-byte instance record. Use this design for storage buffers, the WebGL2 texture transport, and Metal. Write WebGL2 instance data and pool data in blocks of whole rows. Each array needs a maximum of four texture writes.

Remove the frame paths of wgpu and Metal that no caller can reach.
2026-12-04 01:21:03 +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 70f25beb78 fix(desktop): match web hover overlay and responsive peek layout
Composite the hover overlay color over the center peek button background
in both themes so dark mode shows a clear hover state.

Align the peek card and control rail breakpoints with the web modal rules
for compact (<= 640 px), medium (640..=1024 px), and wide (> 1024 px)
viewports.
2026-12-04 01:19:09 +09:00
DarkSky 5645646250 fix(desktop): show keyboard focus rings in settings modal
Add focus-visible accent rings to Settings tabs, switch pills, the font-size slider, and the close button without layout shifts. Keep property radio groups unchanged. Test keyboard focus rings and mouse focus suppression with pixel checks in Light and Dark themes.
2026-12-04 01:15:32 +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 c24c39301f feat(desktop): apply editor fonts and stage presentations
Apply the editor font settings to split panes and Center Peek.
Save the font settings on Web Desktop and load the serif font assets.

Give full screen presentations the desktop viewport.
Restore the workbench when the presentation or its document changes.

Show tag names in the workbench. Skip writes for an in-place folder drop.
2026-12-03 23:42:07 +09:00
DarkSky 2b606566c4 fix(web): start readiness checks after navigation
Set a separate time limit for the first document request.
Use the same readiness deadline for the home and document routes.
Run each negative test in a separate context on one Chromium process.
2026-12-03 22:41:01 +09:00
DarkSky c7f075a79c feat(playground): add editor fonts and presentation fullscreen 2026-12-03 21:45:06 +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 4e2edf3cd9 perf(desktop): virtualize inspector outline and align hover styles
Virtualize the right sidebar outline list inside one scroll container. Keep the 38 px row stride (28 px row and 10 px gap). Cache shared strings for heading rows. Align outline row hover to hoverOverlay. Align the inspector tab switcher to Web RadioGroup active, shadow, and hover tokens.
2026-12-03 20:58:36 +09:00
DarkSky 8319361c3c feat(desktop): add sidebar drag, peek width, and share modes 2026-12-03 20:32:17 +09:00
DarkSky 0e9f8933ab fix(desktop): match Web radio groups and hover colors
The Page width property used the Settings segmented control. Its dark
selected fill and track had almost the same color. Settings also changed
the shared palette with fixed colors.

Changes:
- Render the Page width property as the Web PropertyRadioGroup: a 194 px
  track, 20 px options, regular text, and 4 px gap.

- Paint the Settings choices and the property group with the switch
  theme tokens. A selected option uses the active color and shadow.

- An unselected option that you can change uses the switch hover color.
  A read-only option does not change on hover.

- Keep a 24 px hit target for each option. The option pill stays in the
  track padding.

- Remove the fixed Settings palette colors. Settings secondary text uses
  the secondary text token.

- Use the layer hover overlay on the Settings close button and on the
  inspector link rows.
2026-12-03 20:23:52 +09:00
DarkSky 193c69b48d perf(desktop): limit Quick Search rows to the viewport
Use shared row offsets for scrolling and keyboard selection. Match the
web list width, group heading height, and icon spacing.
2026-12-03 20:14:38 +09:00
DarkSky a5090f2576 perf(desktop): reuse Wasm editor builds and strip snapshot IDs
Use the same editor features in Desktop and Playground.
Keep calendar and settings snapshot IDs in harness builds.
Check ten more snapshot prefixes in production Wasm.
2026-12-03 19:34:05 +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 faa28f603b fix(desktop): match explorer card and sidebar hover styles 2026-12-03 18:51:22 +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 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