Notes: format toolbar covers text after Undo #1409

Closed
opened 2026-10-07 22:11:49 +00:00 by kayg · 4 comments
Owner

Problem

After Undo (Cmd+Z) in a Note, the floating format toolbar stays at a stale position and covers body text. In the #1371 replay (WebKit and Chromium, 1440×900), the selection is on line 3 ("nearby left right") but the toolbar sits over line 2 and hides "Typing probe stays in its own" and part of line 1. Evidence: worktree wklink-1371, artifacts/wklink/chromium-light-adjacent-undo.png, webkit-light-adjacent-undo.png.

Expected

The toolbar always follows the current selection after any change (Undo, Redo, remote change, paste, typing), placed above the selection and never over text. If the selection collapses, it hides at once. Repositioning happens in the same frame as the selection change (no stale frame, no waiting on motion).

Scope

packages/editor floating toolbar positioning (find the existing owner; do not add a second positioner). Regression test: select a range, Undo, assert the toolbar rect does not intersect any text line rect and sits above the selection rect. Screenshots at actual size (1440×900, light and dark) after the Undo, next to the normal selection state.

## Problem After Undo (Cmd+Z) in a Note, the floating format toolbar stays at a stale position and covers body text. In the #1371 replay (WebKit and Chromium, 1440×900), the selection is on line 3 ("nearby left right") but the toolbar sits over line 2 and hides "Typing probe stays in its own" and part of line 1. Evidence: worktree wklink-1371, `artifacts/wklink/chromium-light-adjacent-undo.png`, `webkit-light-adjacent-undo.png`. ## Expected The toolbar always follows the current selection after any change (Undo, Redo, remote change, paste, typing), placed above the selection and never over text. If the selection collapses, it hides at once. Repositioning happens in the same frame as the selection change (no stale frame, no waiting on motion). ## Scope packages/editor floating toolbar positioning (find the existing owner; do not add a second positioner). Regression test: select a range, Undo, assert the toolbar rect does not intersect any text line rect and sits above the selection rect. Screenshots at actual size (1440×900, light and dark) after the Undo, next to the normal selection state.
Author
Owner

Starting. Branch job/tbover-1409, base ef0aa12b1.

Starting. Branch job/tbover-1409, base ef0aa12b1.
Author
Owner

Finished. Head c71094d7b on job/tbover-1409. Selection toolbar now picks the side that does not cover text (bubblePlacement.ts); e2e apps/web/e2e/toolbar-undo-1409.mjs passes (Chromium, 1440 and 820, light and dark). bun run check: 0 errors, perf-lint PASS. apps/web tests: 2119 passed, 1 fixture failure fixed afterwards (format dir 35/35 pass). packages/editor: 22 files, 445 tests passed.

Finished. Head c71094d7b on job/tbover-1409. Selection toolbar now picks the side that does not cover text (bubblePlacement.ts); e2e apps/web/e2e/toolbar-undo-1409.mjs passes (Chromium, 1440 and 820, light and dark). bun run check: 0 errors, perf-lint PASS. apps/web tests: 2119 passed, 1 fixture failure fixed afterwards (format dir 35/35 pass). packages/editor: 22 files, 445 tests passed.
Author
Owner

Revision done, head 4b25180b6. Placement reverted to above-selection. Toolbar now uses shared glass-opaque tint and no opacity fade. E2E toolbar-undo-1409.mjs passes in Chromium and WebKit at 390/820/1440, light and dark. check: 0 errors, perf-lint PASS. apps/web: Test Files 297 passed (297), Tests 2116 passed (2116). packages/editor: Test Files 22 passed (22), Tests 445 passed (445).

Revision done, head 4b25180b6. Placement reverted to above-selection. Toolbar now uses shared glass-opaque tint and no opacity fade. E2E toolbar-undo-1409.mjs passes in Chromium and WebKit at 390/820/1440, light and dark. check: 0 errors, perf-lint PASS. apps/web: Test Files 297 passed (297), Tests 2116 passed (2116). packages/editor: Test Files 22 passed (22), Tests 445 passed (445).
kayg referenced this issue from a commit 2026-10-08 10:41:40 +00:00
Author
Owner

Deployed to calternal.cloud in merge round 35a (build cc1af3c12, live 2026-10-09 00:12 IST). Closing.

Deployed to calternal.cloud in merge round 35a (build cc1af3c12, live 2026-10-09 00:12 IST). Closing.
kayg closed this issue 2026-10-08 18:41:35 +00:00
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal-v0#1409
No description provided.