Repository navigation
fix(web): follow the live end when jumping to latest - #307
Merged
Merged
Conversation
Track the current end during animation and settle directly on completion. Follow footer reservation changes after DOM updates and preserve reader cancellation. Related: #302
This was referenced Nov 13, 2026
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.
Jump to latest can leave the reader above the end when the composer expands or virtual rows change height during navigation.
Cause and fix
The old jump took one native smooth-scroll target before the new layout settled.
settle()ignored corrections for a 1 s lease, and onlyscrollendexplicitly completed navigation. If the browser cancels that scroll without the completion event, the last measurement can be swallowed by the lease; its expiry schedules no correction. This leavesstuck = truewhile the actual scroll position is short of the end. Ordinary isolated idle cases reached the bottom; the exact natural sequence on the reported nightly remains unconfirmed. The cancelled-scroll/missing-event path below is reproducible with fault injection.Replace end navigation with a frame-driven animation using existing motion tokens. Each frame reads the current end, every write is attributed to the feed, and completion calls the normal end settlement directly. Reader gestures, row navigation and fold anchoring cancel it. Far jumps and reduced motion retain the instant path. Track the actual derived footer reservation in the post-DOM correction effect, including the delayed footer-height commit. Extract unchanged keyboard targeting helpers to keep the component within the size limit; document the behavior in Polish.
Browser evidence
Used the isolated long-thread route with production feed/composer/state logic, 120 variable-height turns loaded tail-first (24 initially), older pages through
view.history.load(), work folds/tool groups, markdown tables/code blocks, real composer compaction, draft/empty states, queue and secret panels. Temporary fixture changes and traces are excluded from the commit.Sampled
scrollHeight - scrollTop - clientHeightabout every 100 ms for 2 s. For a 1000 px start, explicitly cancel native scrolling at 350 ms and suppressscrollend:Preview limitations: its container-scroll action emits trusted scroll events but no wheel event, so gesture attribution also used a dispatched wheel event. CPU throttling and native reduced-motion emulation were unavailable. Reduced motion was simulated through the media query and disabled CSS transitions. This checks the shared web UI in Chromium; an Electron binary and the user's exact browser build were unavailable.
Validation
Passed:
bun install,bun run gen:check,bun run typecheck,bun run lint,bun run format:check,bun run check:tmp, and the web build. The full run processed 1,717 tests across 280 files with 0 failures (158 opt-in/skipped tests) and no test temp directories left behind. Test temp data stayed inside the worktree, with Git parent discovery bounded at that directory so plain-folder fixtures do not inherit the repository origin. No UI/component tests added.Copy audit (docs/copy.md §8): no UI text changed.
Related: #302 (tail-first history coverage; not identified as the introducing change).