Repository navigation
Conversation
… reading older ones Follow a new message only on the first load, for the user's own message, or while the previous newest one's bottom edge is on screen. Otherwise keep the place and show a "New message" hint that scrolls down when tapped.
alexxg20
marked this pull request as ready for review
November 18, 2026 16:46
Mamel0uk
previously approved these changes
Nov 18, 2026
Mamel0uk
left a comment
Contributor
There was a problem hiding this comment.
lgtm, could you open an issue for the two nitpicks below?
Photos the user is sending count as their own messages and are followed; the hint and the bottom-edge rule now use the list's bottom item, a pending photo or the newest message.
…st message goes away A photo's message that was pending takes the place of its bubble, and a deleted newest message is not an arrival, so neither scrolls the list nor shows the hint. The hint clears once the newest message or a photo under it is in view.
Mamel0uk
reviewed
Nov 19, 2026
Mamel0uk
left a comment
Contributor
There was a problem hiding this comment.
Nice move pulling the decision into messageListChange, every case is easy to read and test now. One question and one nitpick below.
The hint goes once the newest message or a photo being sent under it is on screen, looked up by key, so it holds whether or not the new message has been laid out when the hint is set.
|
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.



Summary
Closes #320. The conversation now follows a new message only while the user is at the end of the conversation. If they have scrolled up, the list stays where it is and a "New message" hint takes them down when tapped. The user's own messages and photos still scroll down.
What
messageListChange(next toconversationBody) classifies each change in the list:MessageListfollows it if the previous bottom item's bottom edge was on screen; otherwise it keeps its place and shows the hint.requestScrollToItem(0), which takes no scroll lock, so a finger already on the list cannot cancel it.Why
Every new message scrolled the list to the bottom, so a user reading older messages lost their place each time the other person wrote. The photo messages from #373 and #374 had the same problem, plus a jump whenever an upload finished.
Validation
./gradlew ktfmtCheck: passed../gradlew check: passed (unit tests, lint).MessageListChangeTestcovers each kind of change. Robolectric tests inConversationScreenTestcover: following at the end, keeping the place with the hint, the hint going away, the user's own messages and photos, uploads finishing, deletions, a drag in progress, a long newest message, and recreation. Each rule was checked to fail its tests when broken.Follow-ups
AI use
Claude Code (Claude Opus 5.5) drafted the plan, implemented it with its tests, resolved the merge with the photo messages, and ran adversarial reviews. The reviews found that a drag cancelled the scroll, that a long newest message pulled the reader down, and that photo uploads and deletions still moved the list; all are fixed and covered by tests.
🤖 Generated with Claude Code