Skip to content

Pin the activity log to its newest entry - #45

Merged
iTerminate merged 2 commits into
mainfrom
activity-log-tail-scroll
Aug 13, 2026
Merged

Pin the activity log to its newest entry#45
iTerminate merged 2 commits into
mainfrom
activity-log-tail-scroll

Conversation

@iTerminate

Copy link
Copy Markdown
Owner

Summary

  • The docked activity log ticker follows the newest entry across reloads, scope/page changes, and live appends — unless the reader has scrolled up, in which case it stays put.
  • The maximized selectable list gets the same rule: a live append moves the highlight to the new newest entry only when it was already parked there.

Root cause

Every reload/reflow path does Log.clear() followed by write_lines. clear() zeroes virtual_size but leaves scroll_y untouched, so the next write's is_vertical_scroll_end check reads stale and Textual's own auto_scroll silently declines to scroll — including for every live append after that, since nothing ever puts scroll_y back at the bottom on its own.

Fixes #44.

Test plan

  • tests/test_log_scroll.py (new) — pinned/scrolled-up behavior across open, live append, reload, empty history, and reflow
  • tests/test_log_maximize.py — added a follow-the-newest-selection case alongside the existing preserves-selection case
  • uv run ruff check . / uv run pyright clean
  • Full pytest suite: 1306 passed

@iTerminate
iTerminate merged commit 6a2b8b3 into main Aug 13, 2026
1 check passed
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.

Activity log doesn't stay pinned to the newest entry

1 participant