Repository navigation
fix(transcript): keep scroll position stable while streaming when scrolled up - #359
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Keep transcript scroll position stable while an agent response streams in when the reader has scrolled up.
Minimal, targeted change in
feature/transcript/.../list/TranscriptListScroller.kt:resizeHoldon user scroll input (nestedScrollConnection.onPreScroll,NestedScrollSource.UserInput).requestScrollToItempinning whilestate.isScrollInProgress(hold,holdTopRow,holdRowTop,holdToggledRow).hold, re-checkisScrollInProgressafter awaiting the frame before re-pinning, and don't count that frame toward settling; don't apply the first synchronous pin while scrolling.Auto-follow when at the end (
isFollowing) is unchanged; only the scrolled-up + streaming case is affected.Reference: Msg-bit (
kr-ashwani/msgbits) webuseChatViewScrollAnimationscroll handling reviewed; Android divergence kept (this repo's reversedLazyColumn+ hold mechanism), only the not-scrolling/user-input gating was hardened.Verification
:feature:transcript:assembleDebug,:feature:transcript:lintDebug,:feature:transcript:testDebugUnitTest— BUILD SUCCESSFUL.scripts/translations.py all— OK (1 pre-existing unrelated warning).Note: opencode-android was not actually checked out on the target machine; used a fresh separate clone in
~/worktrees/opencode-android-scroll, no other work touched.