Files
pipelines/app/notes/chat-pane-performance.md

2.8 KiB

Mobile chat switching: active pane on top

Selecting a chat now places it immediately in the top80% slot, with the previous chat in the bottom20% preview. Saved desktop tree order, axes and ratios remain unchanged. Every retained thread keeps its state and draft.

Both mobile threads keep one stable80%-height content layout. Switching moves their viewport positions once, rather than relaying out the header, transcript and composer on every animation frame. Repaint boundaries retain the rich thread bodies. A120ms focus cue repaints only a2px strip in the native theme primary color; the conversation body stays fully opaque and stationary. Reduced motion skips the cue; rapid selections take effect immediately without queued movement.

A measured full-pane opacity/slide candidate was rejected: although it reduced total work, its full-pane alpha layer increased p95 raster and total-frame time. The final implementation removes that alpha layer entirely.

Repeatable profile evidence

The manager profiled the same headless CanvasKit fixture at560px, with30 chats and120 rich messages, three repetitions per scenario. Warm-up frames were drained and every one of10 switches was checked in each run. Final normal-run medians:

Metric Previous renderer Final renderer
Framework build time, summed 736.61ms 381.9ms
Raster time, summed 2472.51ms 1333.2ms
p95 raster time 39.5ms 32.4ms
p95 total frame time 62.7ms 56ms
Long-task time 1765ms 718ms
Long-task count 30 13

The final rapid-switch scenario also verified10/10 selections in each of three runs: p95 total frame time56.4ms,12 long tasks totaling638ms. These are headless rich-fixture measurements, not physical-device frame-rate claims. Raw normal-run evidence is under /private/tmp/pane-bench-final-baseline/ and /private/tmp/pane-bench-final-optimized/.

Checks

The23-test workspace suite passes. It includes active-top geometry, stable content height and RenderProxyBox layout counters across animation ticks, no body fade/slide, a2px focus accent with intermediate progress, rapid interruption, reduced motion, drafts/state identity, retained extra panes and desktop geometry. Bounded analysis is clean. Animation/controller objects initialize during initState and dispose in dependency order, including inactive/desktop teardown paths.

Actual browser captures and a six-frame film in /private/tmp/chat-pane-performance-final-film/ passed four assertions: newly added chat at top, selected preview promoted to top, keyboard remains closed after pointer switching, and switching back again promotes the chat to top. All four final screenshots/contact sheet were inspected: bodies remain opaque, geometry changes immediately, and the typed draft remains present. No production data, device testing or deployment was involved in this lane.