Improve flow chat streaming follow, scroll stability, and tool card rendering by wsp1911 · Pull Request #212 · GCWing/BitFun
added 7 commits
March 21, 2026 21:29Prevent streaming thinking/text from being regrouped mid-stream so tool startup no longer remounts the text block and replays the typewriter animation.
Trace and eliminate multiple sources of FlowChat viewport jitter, including explore-group top margin drift, thinking-card collapse transitions, missing scrollbar gutter reservation, and overly aggressive follow-output behavior. Introduce pre-collapse compensation with post-layout reconciliation so card headers keep their visual position during collapse. Also pin new turns to the top, add turn navigation controls to the FlowChat header, and route turn navigation through top-pinning instead of scrolling to a transient position.
Introduce a staged follow-output controller for the virtualized FlowChat list. New turns first pin the latest user message near the top for reading, then enter follow mode once the latest streaming output is ready to take over. Enter follow mode when the user explicitly jumps to the latest output, or when a new streaming turn has been armed for sticky top pinning and auto-follow is not suspended. Exit follow mode on explicit upward user intent, session changes, manual turn/index navigation, or pinning another turn to the top.
… transitions Unify the preview max height between receiving and completed states, and avoid showing the running status icon once preview content is available. This keeps FileOperationToolCard visually stable when switching from receiving to completed.
Prime auto-follow for already-streaming latest turns and only exit follow mode on explicit user scroll intent. This prevents layout-driven upward scroll shifts from cancelling follow while still honoring wheel, touch, keyboard, and scrollbar interactions as intentional exits.
Prevent synthetic bottom compensation from triggering follow jitter while tool cards collapse during streaming, and fix pin-to-top when the first turn is shorter than the viewport so later turns can still anchor correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters