Skip to content

Improve flow chat streaming follow, scroll stability, and tool card rendering#212

Merged
GCWing merged 7 commits intoGCWing:mainfrom
wsp1911:main
Mar 21, 2026
Merged

Improve flow chat streaming follow, scroll stability, and tool card rendering#212
GCWing merged 7 commits intoGCWing:mainfrom
wsp1911:main

Conversation

@wsp1911
Copy link
Copy Markdown
Collaborator

@wsp1911 wsp1911 commented Mar 21, 2026

Summary

  • Improve flow chat scrolling behavior by adding staged auto-follow for streaming output, strengthening scroll anchoring, and making turn pinning more stable during dynamic layout updates.
  • Fix multiple rendering issues in tool cards, including duplicate text replay when cards appear or expand and unstable height transitions in FileOperationToolCard.
  • Refactor the modern flow chat implementation with supporting hooks, styles, navigation helpers, and documentation to make streaming sessions feel more predictable and less jumpy.

Key changes

  • Added staged auto-follow logic for streaming assistant output.
  • Stabilized scroll anchoring and turn pinning across layout changes.
  • Prevented replay issues for TaskTool subagent content and tool-card-driven text rendering.
  • Kept FileOperationToolCard height stable across state transitions.
  • Added supporting flow chat hooks for navigation, file actions, tool actions, copy dialog behavior, and session relationships.
  • Updated styles, docs, and localized strings related to the new behavior.

wsp1911 added 7 commits March 21, 2026 21:29
Prevent 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.
@GCWing GCWing merged commit 456f31e into GCWing:main Mar 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants