Skip to content

fix(ui): stop reasoning output scroll jitter - #653

Open
pascalandr wants to merge 2 commits into
NeuralNomadsAI:devfrom
pascalandr:fix/issue-652-shaky-reasoning-scroll
Open

fix(ui): stop reasoning output scroll jitter#653
pascalandr wants to merge 2 commits into
NeuralNomadsAI:devfrom
pascalandr:fix/issue-652-shaky-reasoning-scroll

Conversation

@pascalandr

@pascalandr pascalandr commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep follow-scroll anchor correction directional.
  • Avoid scrolling upward when the bottom sentinel is already visible above container padding.
  • Preserve downward correction as streamed reasoning content grows.

Root cause

Streaming first pins the reasoning output to its bottom. The follow-scroll anchor pass then measures the sentinel slightly above the container edge because of bottom padding. The previous absolute-delta check treated that negative offset as actionable and scrolled upward; the next streamed update pinned back to the bottom, producing visible oscillation.

Validation

  • npm exec --no -- tsx --test packages/ui/src/components/virtual-follow-behavior.test.ts
  • npm run typecheck --workspace @codenomad/ui
  • npm run build --workspace @codenomad/ui
  • git diff --check

Fixes #652

Keep bottom-follow anchor correction directional so an already visible sentinel cannot scroll the reasoning output upward between streamed updates. This removes the oscillation caused by bottom padding while preserving downward correction when content grows.

Validated with the virtual follow behavior tests, UI typecheck, UI production build, and git diff checks. The reporter's Electron Ubuntu scenario remains the final visual confirmation.
@pascalandr pascalandr assigned pascalandr and shantur and unassigned pascalandr Aug 15, 2026
@pascalandr pascalandr added the bug Something isn't working label Aug 15, 2026
@pascalandr

Copy link
Copy Markdown
Contributor Author

@shantur LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Shaky text scrolling when agent is writing thought output

2 participants