Skip to content

feat: add scroll-to-bottom control for chat sessions#65

Open
oa1mgo wants to merge 1 commit into
agegr:mainfrom
oa1mgo:fix/issue-59-scroll-to-bottom
Open

feat: add scroll-to-bottom control for chat sessions#65
oa1mgo wants to merge 1 commit into
agegr:mainfrom
oa1mgo:fix/issue-59-scroll-to-bottom

Conversation

@oa1mgo

@oa1mgo oa1mgo commented Jun 8, 2026

Copy link
Copy Markdown

Summary

Fixes #59.

This PR updates the chat scroll behavior so the view no longer jumps to the bottom after a response completes when the user has scrolled away from the latest message.

It also keeps the chat pinned to the latest message when new or streaming content arrives while the user is already at the bottom.

It adds a lightweight scroll-to-latest control that appears when the user is away from the bottom of the conversation, and removes the previous running-state bottom spacer that pushed the message list upward while the agent was active.

Changes

  • Track whether the chat viewport is near the bottom before auto-scrolling
  • Preserve the user's reading position while an agent response is streaming or completing
  • Keep the chat pinned to the latest message when new or streaming content arrives while the user is already at the bottom
  • Remove the running-state bottom spacer and last-user-message scroll anchoring
  • Add a centered scroll-to-bottom button for returning to the latest message
  • Hide the button naturally once the viewport reaches the bottom

Testing

  • node_modules/.bin/tsc --noEmit
  • npm run lint
  • Manually verified the scroll button appears, scrolls smoothly to the latest message, does not flicker on click, and preserves bottom auto-follow for new messages

@oa1mgo oa1mgo marked this pull request as ready for review June 8, 2026 17:01
@oa1mgo oa1mgo force-pushed the fix/issue-59-scroll-to-bottom branch from 9aa4c3c to 322b518 Compare June 8, 2026 17:31
@oa1mgo oa1mgo force-pushed the fix/issue-59-scroll-to-bottom branch from 322b518 to 48791d6 Compare June 8, 2026 17:40
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.

Avoid Auto-Scrolling to Bottom After Response Completion

1 participant