mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-12-05 11:15:01 +03:00
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.