Skip to content

fix(web): require reaching the true bottom before re-engaging scroll follow#1899

Open
liujunGH wants to merge 2 commits into
MoonshotAI:mainfrom
liujunGH:fix/scroll-follow-reengage
Open

fix(web): require reaching the true bottom before re-engaging scroll follow#1899
liujunGH wants to merge 2 commits into
MoonshotAI:mainfrom
liujunGH:fix/scroll-follow-reengage

Conversation

@liujunGH

Copy link
Copy Markdown

Problem

The auto-follow state machine in ConversationPane.vue detaches correctly when the user scrolls up (following = false), but re-engages when the user scrolls back down anywhere within 80px of the bottom:

} else if (dist <= BOTTOM_THRESHOLD && top > lastScrollTop + 1) {
  following.value = true;
}

During streaming, the content a user is reading is almost always inside that 80px zone (the latest turn). When they scroll down even a few pixels to keep reading, the follow re-arms and the next delta batch snaps the view back to the bottom — repeatedly. Result: "the page keeps climbing and I can't read what I want".

Fix

Lower the re-engage threshold to 8px, so following resumes only when the user deliberately scrolls to the actual bottom, or clicks the new-message pill (unchanged). Detach-on-scroll-up behavior is untouched.

Test

  1. Start a long streaming reply.
  2. Scroll up a few screens to read history.
  3. Scroll down a little (still far from the bottom) — view now stays put (before: yanked to bottom).
  4. Scroll fully to the bottom — follow re-engages (unchanged).

@changeset-bot

changeset-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 889f63d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

liujunGH added 2 commits July 19, 2026 14:23
…follow

The auto-follow detaches correctly when scrolling up, but re-engaging
only required scrolling back within 80px of the bottom. A user reading
the streaming tail (almost always inside that zone) who scrolled down
even a few pixels to keep reading was yanked to the bottom by the next
delta batch. Lower the re-engage threshold to 8px so following resumes
only when deliberately reaching the bottom or clicking the new-message
pill.
@liujunGH
liujunGH force-pushed the fix/scroll-follow-reengage branch from b1a61df to 889f63d Compare July 19, 2026 06:23
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