Skip to content

fix(web-ui): stabilize flow chat follow-output during collapses#759

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:fix/web-ui-flow-chat-follow-collapse-jitter
May 17, 2026
Merged

fix(web-ui): stabilize flow chat follow-output during collapses#759
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:fix/web-ui-flow-chat-follow-collapse-jitter

Conversation

@bobleer
Copy link
Copy Markdown
Collaborator

@bobleer bobleer commented May 17, 2026

Summary

  • Run the same collapse compensation and anchor-lock path while follow-output is active during streaming, instead of letting the RAF follow loop chase scrollTop every frame (which caused visible "sink-down" jitter when tool cards above the viewport auto-collapsed).
  • Respect shouldSuspendAutoFollow inside the continuous follow loop so programmatic bottom snaps do not fight collapse protection mid-animation.
  • Treat bottom reservation as part of "distance from bottom" for auto-follow, preserve reservations on streaming scrollToLatest (behavior: auto), and add a reactive shrink-clamp restore path that distinguishes browser clamp jumps from genuine user upward scrolling.

Test plan

  • pnpm run lint:web
  • pnpm run type-check:web
  • pnpm --dir src/web-ui run test:run
  • Manual: flow chat at tail while streaming; trigger tool-card collapse above viewport and confirm no conversation-wide sink/jitter
  • Manual: wheel/touch scroll up still exits follow-output as before

Align follow mode with collapse compensation and anchor lock so tool-card
collapses no longer jitter the viewport; gate continuous auto-follow during
layout transitions and restore unsignaled shrink clamps near the tail.
@bobleer bobleer merged commit a6776e4 into GCWing:main May 17, 2026
4 checks passed
@bobleer bobleer deleted the fix/web-ui-flow-chat-follow-collapse-jitter branch May 22, 2026 02:21
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.

1 participant