Skip to content

Fix Android Scroll to end moving up inside tall replies - #1103

Merged
ivanfenenko merged 1 commit into
mainfrom
fix/android-scroll-to-end-direction
Nov 23, 2026
Merged

ivanfenenko merged 1 commit into
mainfrom
fix/android-scroll-to-end-direction

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Scroll to end could move the Android timeline up instead of down. From inside a reply taller than the screen, the distance was measured to the reply's far (older) edge and applied as a positive scroll, which in a reversed list moves toward older content. Each tap landed at the same place near the start of the reply, with the pill still showing.

  • Measure the distance from the bottom anchor and scroll toward the end with a negative delta.
  • Finish the animated scroll on the bottom anchor so it lands exactly at the end.
  • Layout-change follow had the same math and now goes straight to the end.

iOS computes its target from the true bottom content offset, so it needs no change.

Checks

  • iOS and Android both covered, or the reason one is not: Android only. iOS code read but not run; it targets the true bottom content offset
  • Screenshots for UI changes: attached in a PR comment
  • Tests run: :app:testDebugUnitTest --tests 'dev.opencode.mobile.ui.scroll.*' passed on this branch and on a local merge with current main
  • Verified on an API 37 emulator with the scenario harness (v1): Scroll to end from inside a tall reply, auto-follow during streaming, and keyboard open and close

Risks / Follow-ups

Not run against a v2 server or on a physical device. The change is in client scroll math and does not depend on the protocol.


See it in action
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@ivanfenenko
ivanfenenko marked this pull request as ready for review November 22, 2026 22:59

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review: no finding that 2+ of 3 passes agreed on.

opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.067 · 1 pass(es) stopped early

@ivanfenenko

Copy link
Copy Markdown
Collaborator Author

Android verification

Debug build of fcba324b4 on a temporary API 37 Pixel 7 emulator, against the scenario harness (v1 server, stream-long-markdown).

Step Result Screenshot
Inside a reply taller than the screen Scroll to end is showing Inside tall reply
Tap Scroll to end Lands at the end of the reply, pill clears After Scroll to end
Open the keyboard at the end Last line stays directly above the composer Keyboard open
Close the keyboard Returns to the same end position Keyboard closed
Reply streaming Follows the newest text, no pill Streaming
Stream finished Rests at the end, no pill Finished

Opening and closing the keyboard while scrolled up also kept the reading position.

@ivanfenenko
ivanfenenko added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 47d7257 Nov 23, 2026
@ivanfenenko
ivanfenenko deleted the fix/android-scroll-to-end-direction branch November 23, 2026 11:31
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