Skip to content

fix(flow-chat): keep streaming code preview tail visible#1037

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/fix-flow-chat-autoscroll
Jun 2, 2026
Merged

fix(flow-chat): keep streaming code preview tail visible#1037
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/fix-flow-chat-autoscroll

Conversation

@limityan
Copy link
Copy Markdown
Collaborator

@limityan limityan commented Jun 2, 2026

Summary

  • Adjust streaming CodePreview tail sizing when nested auto-scroll is disabled so the rendered tail fits the preview viewport.
  • Keep overscan for previews that still use autoScrollToBottom and keep completed previews rendering full content.
  • Add regression coverage and update the tool-card preview scrolling contract.

Details

CodePreview now derives the streaming tail line limit from the preview height and only includes overscan when the preview is allowed to auto-scroll internally. For compact Write/Edit streaming previews, the latest generated code lines remain inside the nested viewport without requiring per-update scrollTop writes.

The tradeoff is limited to the disabled nested auto-scroll path: compact streaming previews show slightly less tail context while content is still streaming. Completed previews continue to render the full content or full diff.

Verification

  • pnpm --dir src/web-ui run test:run -- src/flow_chat/components/CodePreview.test.tsx src/flow_chat/tool-cards/FileOperationToolCard.test.tsx
  • pnpm run type-check:web
  • pnpm run lint:web
  • pnpm run check:repo-hygiene
  • git diff --check

@limityan limityan merged commit 8c96a48 into GCWing:main Jun 2, 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.

1 participant