fix(viewer): keep tail-first follow attached#15
Merged
Conversation
Give an active follow or explicit reattach tail pin precedence over the one-draw tail-preservation guard. This prevents pretty JSON breadcrumbs from shrinking the first viewport after layout and immediately detaching a live timeline. Cover wrapped, unwrapped, narrow, older-prepend, detach, reattach, pause, resume, and appended-record behavior with backend-neutral timeline tests.
siriusctrl
marked this pull request as ready for review
July 22, 2026 13:00
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
UnreleasedRoot cause
A tail-first viewer begins with both
preserve_tail_on_next_drawandFollowState::Following. During sticky-layout convergence, the exact live tail was computed and pinned, then the older one-draw preserved position overwrote it. When the JSON breadcrumb changed the visible height, the viewport ended one row before the recomputed tail and the render state immediately becamefollow:detached.The fix makes active follow or explicit reattach tail pins authoritative. Paused follow and ordinary snapshot preservation are unchanged.
Validation
follow:detached, then passed with the fixcargo fmt --all --checkcargo check --workspace --all-targets --lockedcargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --all-targets --locked: 384 passed, 0 failed, 13 ignoredfollow:onand clean terminal exitPTY evidence remains under ignored
target/and is not part of the PR. No release, tag, or publish action is included.