mirror of
https://github.com/stablyai/orca.git
synced 2026-10-17 16:02:55 +00:00
A pinnedViewport intent could latch while the viewport was still at the bottom (sub-row trackpad wheel, wheel consumed by a mouse-reporting TUI, plain PageUp/Home delivered to the app). Per-write-batch enforcement then froze the viewport at that absolute line: during agent generation the live TUI region visibly scrolled "underneath" static committed rows, and after a long generation the scroll position sat near the top. Rebuild paths (snapshot replay, fit reflow) additionally restored pinned positions by raw pre-rebuild row numbers into renumbered buffers. - The wheel/keyboard settle tick reclassifies intent from the real viewport instead of preserving a pin the viewport never followed. - Write capture treats a pinned intent whose live viewport is at the bottom as followOutput, so a latched phantom pin can never freeze streaming. - Visibility-resume enforcement follows output for pins recorded at the bottom and restores by bottom offset when the buffer was rebuilt shorter. - Snapshot replay restores by bottom offset; safeFit restores pinned panes through an xterm marker so reflow renumbering cannot misplace them. Deterministic repro harness: unit tests red on the old code for each latch/ freeze/restore shape, plus a stdin-phase-gated streaming e2e fixture — both e2e tests fail without this fix and pass with it. Co-authored-by: Orca <help@stably.ai>