Make Auto-scroll actually follow the live stream - #50
Merged
Conversation
The "Auto-scroll" checkbox was dead state: `auto_scroll` was written by the checkbox but never read, so during adb streaming or file tailing new rows piled up below the viewport while the view stayed frozen. Wire it to the table's `stick_to_bottom(self.auto_scroll)`. egui pins to the bottom only while the view is already there, releases the instant the user scrolls up, and defers to an explicit scroll_to_row (goto/arrows), so it follows the tail without fighting manual navigation.
egui's stick_to_bottom only re-engages once the view is already at the end, so flipping Auto-scroll on while scrolled up did nothing until you manually scrolled back down. Detect the toggle and request a jump to the last row so the switch takes effect immediately.
laomou
force-pushed
the
fix/auto-scroll-follow-tail
branch
from
August 6, 2026 11:09
09de2a0 to
860d91b
Compare
1 task
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
The Auto-scroll checkbox was dead state —
auto_scrollwas written by the checkbox but never read anywhere. During adb streaming or file tailing, new rows piled up below the viewport while the view stayed frozen. This breaks the core "watch a live logcat" workflow.Fix
Wire it to the table's
stick_to_bottom(self.auto_scroll). egui's stick-to-bottom:scroll_to_row(goto / arrow keys / bookmark jump)So it follows the tail like
tail -f/ Android Studio logcat, without hijacking navigation.Notes
Test plan
open_file_tails_appended_lines_without_moving_scroll(the fix works via the scroll area's offset, notpending_scroll, so that assertion still holds)adb logcatstream — view follows new lines; scrolling up pauses following; scrolling back to bottom resumes