Session switching must be instant #128

Closed
opened 2026-10-09 08:08:01 +00:00 by kayg · 3 comments
Owner

Owner (production 63b1f10e): switching a window to another session via the UI takes noticeable time; it must be instant. Measure through the real UI against the real server at the 300 ms profile (choice → first paint of the new session → live), find where the time goes (round trips, attach, snapshot, renderer re-init, layout), fix the client side (paint the cached last screen within a frame, keep renderers warm, never block on a round trip), and report backend costs for a Codex job. TASTE row main 9e99a8da.

Owner (production 63b1f10e): switching a window to another session via the UI takes noticeable time; it must be instant. Measure through the real UI against the real server at the 300 ms profile (choice → first paint of the new session → live), find where the time goes (round trips, attach, snapshot, renderer re-init, layout), fix the client side (paint the cached last screen within a frame, keep renderers warm, never block on a round trip), and report backend costs for a Codex job. TASTE row main 9e99a8da.
Author
Owner

Measured and fixed, branch canvas-switch, head 9a770037 (base dev 63b1f10e). Root cause: a stream opened on an already welcomed connection attached on stream 0 (handler ran inside openStream before the caller had its id); the server closed the socket and the page reconnected on every switch (1 socket -> 5 over 4 switches). Plus a new TerminalClient per switch and an empty terminal until the snapshot round trip. Also found: sidebar and palette opened a NEW shell instead of the session (live open() ignored session). Table (median first painted frame / live, ms): manager 174/174 -> 27/75 local, 589/589 -> 38/347 at 300 ms; sidebar 149 -> 23/123, 702 -> 23/380; palette 125 -> 16/80, 669 -> 22/374. Server side: attach to snapshot painted is one round trip plus ~30 ms; nothing slow found in Rust.

Measured and fixed, branch canvas-switch, head 9a770037 (base dev 63b1f10e). Root cause: a stream opened on an already welcomed connection attached on stream 0 (handler ran inside openStream before the caller had its id); the server closed the socket and the page reconnected on every switch (1 socket -> 5 over 4 switches). Plus a new TerminalClient per switch and an empty terminal until the snapshot round trip. Also found: sidebar and palette opened a NEW shell instead of the session (live open() ignored session). Table (median first painted frame / live, ms): manager 174/174 -> 27/75 local, 589/589 -> 38/347 at 300 ms; sidebar 149 -> 23/123, 702 -> 23/380; palette 125 -> 16/80, 669 -> 22/374. Server side: attach to snapshot painted is one round trip plus ~30 ms; nothing slow found in Rust.
Author
Owner

Deployed to production 2026-10-09 ~12:15 CEST: web build of dev 01a6d848 (server binary unchanged; rollback web.prev = 63b1f10e). Gate: scripts/verify fast EXIT 0; real-server specs 29/30 with the one failure (switch.spec keys acknowledged, load 48) passing 21/21 on three reruns.

Deployed to production 2026-10-09 ~12:15 CEST: web build of dev 01a6d848 (server binary unchanged; rollback web.prev = 63b1f10e). Gate: scripts/verify fast EXIT 0; real-server specs 29/30 with the one failure (switch.spec keys acknowledged, load 48) passing 21/21 on three reruns.
Author
Owner

Closed by the orchestrator during the 2026-10-28 handover (#254), on the owner's request to close finished issues. Evidence: Fix canvas-switch 9a770037 is in dev and was deployed to prod 2026-10-09 (web build of 01a6d848, also in dev and prod-live) with measured before/after table. Reopen if anything is still missing.

Closed by the orchestrator during the 2026-10-28 handover (#254), on the owner's request to close finished issues. Evidence: Fix canvas-switch 9a770037 is in dev and was deployed to prod 2026-10-09 (web build of 01a6d848, also in dev and prod-live) with measured before/after table. Reopen if anything is still missing.
kayg closed this issue 2026-10-28 17:52:47 +00:00
Sign in to join this conversation.
No labels
launch-qa
No milestone
No project
No assignees
1 participant
Notifications
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/infraternal#128
No description provided.