fix(web): prevent chat scroll yank while browsing history - #1553
Conversation
🦋 Changeset detectedLatest commit: 7e6dc54 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
commit: |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7033926495
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Related Issue
None — this is a reproducible bug in conversation history scrolling; the problem is explained below.
Problem
While a user browses older messages, two independent timing problems can move the chat viewport against their input:
scrollevent. A previously queued bottom-follow frame could run in that gap and pull the viewport back down.Loading another page of history has a related requirement: prepended turns must not move the current reading position, but that correction must be scoped to the session that started the request and must preserve scrolling that happens while the request is in flight.
What changed
scroll; input that cannot move a short conversation keeps following.The change stays inside the existing chat scroll state machine and adds no dependency or new module.
Verification:
pnpm --filter @moonshot-ai/kimi-web typecheckpnpm --filter @moonshot-ai/kimi-web test(390 tests)pnpm --filter @moonshot-ai/kimi-web buildpnpm --filter @moonshot-ai/kimi-web check:styleChecklist
kimi-webhas no component layout harness; the existing logic suite and real Chromium exercise cover the observable behavior.)gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update. (This restores expected behavior without changing the documented interface.)