feat(tui): count blocks arriving below a scrolled view in the follow hint - #234
Merged
Merged
Conversation
Max17190
marked this pull request as ready for review
August 27, 2026 03:53
…hint A reader scrolled up had no way to know whether anything new landed at the bottom; the hint said only how to get back. Count blocks appended while the offset is off the floor and render the count ahead of the re-arm hint. The count clears whenever the view reaches the bottom, so a later scroll-up starts from zero instead of resurrecting content already seen, and chat dirt promotes a chrome repaint while a count is showing so the status line never goes stale.
Max17190
force-pushed
the
tui-follow-state-unread
branch
from
August 27, 2026 03:55
895daf9 to
ed7174f
Compare
…ntees Every path that dirties chat goes through Dirty::mark_chat, which marks chrome for exactly the reason the promotion cited; the invariant test now says the unread hint depends on it.
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.
Why
A reader scrolled up has no way to know whether anything landed at the bottom; the hint says only how to get back. Forced or silent follow behavior is the largest complaint class in comparable terminal frontends.
Summary
Count blocks appended while the view is scrolled up and render the count ahead of the re-arm hint (
N new · esc follow · pgup/pgdn scroll). The count clears whenever the view reaches the bottom, so a later scroll-up starts from zero instead of resurrecting content already seen. Chat dirt promotes a chrome repaint while a count shows, so the status line never goes stale.Test Plan
unread_counts_blocks_while_scrolled_and_clears_at_the_bottom(transcript state machine, incl. no-resurrect).scrolled_hint_counts_blocks_arriving_below(hint text, chrome promotion, no-resurrect at the app layer).Greptile Summary
Adds an unread-block count to the follow hint when completed transcript blocks arrive below a scrolled view. Returning to the latest content clears the count, and status chrome continues to repaint through the existing chat invalidation path.
Confidence Score: 5/5
No blocking failure remains.
Focused checks confirmed unread blocks increment while the view is scrolled, clear when the view reaches the bottom, and appear in the status hint. The full TUI test suite also completed successfully with 248 passing tests and 6 ignored tests.
What T-Rex did
Reviews (2): Last reviewed commit: "fix(tui): drop the draw-time chrome prom..." | Re-trigger Greptile