You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Terminal view stops following output when scroll reports arrive late #686
A base/terminal View stops following its program's output: while a command writes quickly (a build log, a dev server), the view leaves the bottom on its own and new output is no longer shown until the user scrolls down. Seen on macOS in AgioX's run windows.
Likely cause
view.follow posts followRow, which sets v.setY and calls scrollRef.ScrollTo. The platform reports the new offset asynchronously (ItemScrollTo → EventScroll). scrolled compares each report with the single v.setY, so when a second followRow runs before the first report arrives, the first report (now stale) differs from setY by ≥ 0.5, is taken for the user's scroll, and calls ScrollToRow on the stale row: the terminal's viewport leaves the bottom and stays there.
The core already knows which reports predate scrolls it issued (scrollNode.report with the applied count), but OnScroll receives the raw reported point, so the view cannot tell them apart.
The view keeps following the end of the output while the user has not scrolled away, however fast it arrives; only the user's own scrolling moves the viewport off the bottom. A test could drive a few followRows before delivering the earlier reports.
Also wanted
An option on terminal.View to hide its scroll bar (the Scroll's HideIndicator), for apps that would rather show none.
Main cause — output faster than frames: the scroll layer was sized from the frame's scrollbar while the row it scrolled to was read later, so the platform clamped the offset to the old end and the view took the clamped report for the user's scroll, pinning the viewport off the bottom. follow now sizes the layer and picks the row from one read of the terminal.
Late reports:core.ScrollEvent.Stale (TSX's stale) marks a report from before the platform applied a scroll from code, using the applied count every backend sends; the terminal ignores those.
A report at the content's end follows the output again, so scrolling back down resumes following.
terminal.View.HideIndicator hides the scroll bar.
Covered by tests for fast output, stale reports and re-following at the end, and checked by hand in AgioX's run windows on macOS.
Activity
oneo-me commentedon Nov 18, 2026
Working on this in branch
agiox/issue-686-in-progress.oneo-me commentedon Nov 18, 2026
Fixed in #692:
follownow sizes the layer and picks the row from one read of the terminal.core.ScrollEvent.Stale(TSX'sstale) marks a report from before the platform applied a scroll from code, using the applied count every backend sends; the terminal ignores those.terminal.View.HideIndicatorhides the scroll bar.Covered by tests for fast output, stale reports and re-following at the end, and checked by hand in AgioX's run windows on macOS.