Composer search handoff waits for the outgoing surface #1536

Open
opened 2026-10-10 12:34:57 +00:00 by kayg · 0 comments
Owner

Parent: kayg/calternal#1233

A 7-sample Chromium profile on the locked perf VM measured Composer from Search at 1440 px at p50 789.9 ms / p95 945.7 ms. The trace sample took 844.5 ms. It showed the Search surface exit ending at +343 ms after Enter, followed by the Composer entrance starting at +480 ms.

apps/web/src/lib/composer/controller.svelte.ts polls until .surface.search-window or .surface.composer-window is removed before it calls composer.show(). The Search surface remains in the DOM for its visual outro after its focus trap has released. This makes the new Composer wait for the old surface's motion. The trace found about 16 ms of top source-mapped JS self time, 106.22 ms in style updates, 4.20 ms in Layout, 7.87 ms in Paint, and short API requests in the input window; these do not account for the explicit ~300 ms overlay handoff wait.

The branch change opens the Composer as soon as the previous surface releases its shell, while preserving the old surface's visual outro and focus handoff. The focused Composer regression test failed before the change and passes after it. The profile completed all Composer action groups (7 samples each); the full report is marked incomplete because its unrelated LinkNav Calendar fixture timed out before finishing.

Parent: kayg/calternal#1233 A 7-sample Chromium profile on the locked perf VM measured Composer from Search at 1440 px at p50 789.9 ms / p95 945.7 ms. The trace sample took 844.5 ms. It showed the Search surface exit ending at +343 ms after Enter, followed by the Composer entrance starting at +480 ms. `apps/web/src/lib/composer/controller.svelte.ts` polls until `.surface.search-window` or `.surface.composer-window` is removed before it calls `composer.show()`. The Search surface remains in the DOM for its visual outro after its focus trap has released. This makes the new Composer wait for the old surface's motion. The trace found about 16 ms of top source-mapped JS self time, 106.22 ms in style updates, 4.20 ms in Layout, 7.87 ms in Paint, and short API requests in the input window; these do not account for the explicit ~300 ms overlay handoff wait. The branch change opens the Composer as soon as the previous surface releases its shell, while preserving the old surface's visual outro and focus handoff. The focused Composer regression test failed before the change and passes after it. The profile completed all Composer action groups (7 samples each); the full report is marked incomplete because its unrelated LinkNav Calendar fixture timed out before finishing.
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#1536
No description provided.