Context
.maka-turn uses content-visibility: auto + contain-intrinsic-size: auto 250px (maka-tokens.css), so off-screen turns occupy a 250px placeholder until first laid out. On a ~24-turn session the un-warmed transcript underestimates true height ~2x (measured on mount: scrollHeight 14640 vs 31872 real).
Behavior today
- Endless upward scroll: each viewport arrival inflates a placeholder to its real height; scroll anchoring compensates; the top keeps receding (~51 viewport-sized steps to reach the top vs an honest ~23).
- Remount lands mid-document: opening a long session pins to bottom once, but placeholder inflation then grows the document with no DOM mutation and no scroll event; the mutation-only follower strands the viewport mid-document (observed scrollTop 5408, far from bottom).
- Any fix that pre-records sizes must measure the final layout: fallback font metrics and the lazy-markdown Suspense fallback (~7.5px taller per turn) otherwise re-create per-arrival drift.
Fix direction (implemented in the linked PR)
- Chunked bottom-up idle-time warm-up so every turn's remembered size replaces the placeholder.
- A ResizeObserver channel in the pinned-bottom follower for mutation-less growth.
- Warm-up gated on final layout (fonts ready + no pending markdown) and re-run when a mode switch rebuilds the transcript DOM.
Acceptance
Context
.maka-turnusescontent-visibility: auto+contain-intrinsic-size: auto 250px(maka-tokens.css), so off-screen turns occupy a 250px placeholder until first laid out. On a ~24-turn session the un-warmed transcript underestimates true height ~2x (measured on mount: scrollHeight 14640 vs 31872 real).Behavior today
Fix direction (implemented in the linked PR)
Acceptance