Repository navigation
Fix auto scroll not re-enabling at certain window heights - #240
Merged
Merged
Conversation
The check for "scrolled to the last message" compared rounded item counts, with the visible item count taken from the full messages area height. The horizontal scrollbar is always shown, so the real viewport is shorter, and whenever the fractional part of visible rows exceeded the scrollbar's share of a row the check failed even at the maximum scroll position. Compare in pixels instead. Also show the window size in the developer mode debug toolbar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
💡 Harness Review
The change replaces the rounded row-count check with a pixel-based check for re-enabling auto-scroll. I examined the surrounding scroll handling, row-height and test-assembly contracts, added tests, developer toolbar, and changelog; no actionable issues were found.
Reviewed commit 13cdea3
🤖 Helpful? 👍/👎
JacobSimpson-unity
requested review from
JacobSimpson-unity
and removed request for
a team
November 17, 2026 11:04
BorisShir
reviewed
Nov 18, 2026
BorisShir
approved these changes
Nov 18, 2026
…ndow-size # Conflicts: # com.unity.mobile.android-logcat/CHANGELOG.md
todi1856
enabled auto-merge
November 18, 2026 09:10
JacobSimpson-unity
approved these changes
Nov 18, 2026
JacobSimpson-unity
left a comment
There was a problem hiding this comment.
Tested this logcat branch on trunk, with different Scroll behaviors (whilst the PR was targeting auto scroll, I also took a look at disabled, scroll-to-end). All behave as described in the tooltip.
Checked the exact repro size (1467x900) and other random resizes, with Auto in different use cases (disconnect/reconnect/clear/reload/closing and reopening the window).
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.
Purpose of PR
Type of change:
See this video of the bug
BEFORE
https://github.com/user-attachments/assets/f6fb9b49-fedf-4397-b9c4-314a1051ccdf
AFTER
https://github.com/user-attachments/assets/35ede4ca-6459-45ae-97f3-71f198fecb66
With Scroll set to Auto, scrolling back to the last message sometimes didn't turn auto scrolling back on. It depended on the window height, e.g. it reproduced at 1467x900
The check compared rounded item counts, using the full height of the messages area. The always visible horizontal scrollbar makes the real viewport shorter, so at some heights the check came out one short even when scrolled all the way down. It now compares pixels:
scrollY + visibleHeight >= rowHeight * entryCount.Also shows the window size in the developer mode debug toolbar.
UUM-162014
Halo effect
Only Auto scroll mode is affected.
Checklist for PR maker
Testing status
AndroidLogcatAutoScrollTestssweeps messages area heights, row heights and scrollbar heights, and checks that the last entry counts as visible when scrolled to the bottom.🤖 Generated with Claude Code