Skip to content

fix(chat): stop yanking the transcript back down while the reader scrolls up - #184

Open
Nordalux wants to merge 1 commit into
every-app:mainfrom
Nordalux:fix/chat-scroll-follow-bottom
Open

fix(chat): stop yanking the transcript back down while the reader scrolls up#184
Nordalux wants to merge 1 commit into
every-app:mainfrom
Nordalux:fix/chat-scroll-follow-bottom

Conversation

@Nordalux

Copy link
Copy Markdown
Contributor

SamConversation and OnboardingChatConversation both pinned their scroll container to the bottom on every messages change. During a streaming reply that fires per token, so scrolling up to re-read something is undone within milliseconds. Fixes #160, which reports it for SAM; the onboarding chat carried the same three lines.

The pin now holds only while the reader is still at the bottom — scrolling away releases it, scrolling back re-arms it. The duplicated effect moves into one hook, with the pin decision as a pure function so it is testable without a DOM.

Verified in:

  • Windows 11, Node 24.15.0, pnpm 10.30.1 — pnpm ci:check clean, pnpm test:ci 774 passed, pnpm vite build green
  • By hand in the running app — scrolling up mid-reply now stays put, and scrolling back to the bottom re-arms the pin.

Verified and tested by hand. The description was drafted with AI assistance — I'd rather let the diff do the talking than a long write-up.

…olls up

Both chat views pinned the scroll container to the bottom on every messages
change. During a streaming reply that fires on each token, so scrolling up to
re-read something is undone within milliseconds and the transcript is
effectively unreadable until the answer finishes.

Pin only while the reader is still at the bottom. Scrolling away releases it,
scrolling back re-arms it. The shared hook replaces the duplicated effect in
SAM and onboarding; the pin decision is a pure function so it can be tested
without a DOM.
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.

Not able to scroll until SAM complete it's response

1 participant