Repository navigation
fix(web): hide jump to latest once a closed fold brings the end back - #781
Merged
Merged
Conversation
Opening a tool fold stops following the end so its header keeps its place. Closing it again shrank the feed back to the end, but following stayed off, so "Jump to latest" showed with nothing below. The feed now follows the end again when its rows shrink and the end is on screen, and never shows the button when there is nothing to scroll. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 16, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 28, 2026
## Change A fast jump through a thread could leave several “Show earlier work” buttons on screen until the next upward gesture. Web and desktop now fetch a page when a gap or the start of the loaded history comes within 240 CSS pixels of the reading area. The feed waits for its initial position, then rechecks the current window after each page. Failed reads expose the existing retry action. When older rows turn out shorter than their estimates, the feed restores the reading anchor before it decides whether to follow the end. This keeps the same message on screen across consecutive reads. ## Verification - Exercised the real thread route in Chromium with 96 turns and 1,112 items. After Home, five sequential reads filled all six visible gaps with the first prompt moving less than one pixel. Also checked a fast wheel gesture at 390 px wide. - Approached a gap from each direction. Requests started with the gap still offscreen and stopped outside the margin. A short thread with a visible gap loaded on opening. An HTTP 503 paused automatic reads until Retry. - Kept an answer within half a CSS pixel of its position through four pages of a 540-command turn. Closing the last work fold still resumed following at the end. - Web typecheck, lint on changed files and 15 existing history and scroll tests passed locally. Repository-wide checks and selected builds run in CI. Fixes: #1049 Fixes: #781
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.
What was wrong
Opening a tool fold at the end of a thread (
keep()) stops following the end, so the fold's header keeps its place while its rows grow below it. Closing the fold shrank the feed back so the end was on screen again (or nothing scrolled at all), but following stayed off, so "Jump to latest" kept showing with nothing below it.Fix
FeedExtent(apps/web/src/lib/shared/ui/virtual/feed-extent.svelte.ts) measures the scroll height at each settle. When the rows shrank and the end is withinFEED_END_THRESHOLD, the feed follows the end again. Only shrinking does this: a fold that opens grows towards the end, and its header still keeps its place.atEndis true (seen marking, composer fold).Checks
/dev/long-thread?turns=1with the disposable bench stack, viewport heights 600–900 px, open and close the last turn's fold:bun install,bun run gen:check,bun run typecheck,bun run lint,bun run format:check, web build: clean.bun run check:tmp: 3162 pass, nothing left in the temp dir; 2 failures from the local environment, unrelated to the web:worker-profile-env.test.tspicks upCANOPY_SUPERVISEDfrom the session (passes without it) andcodex/connections.test.tshits the locally installed Codex CLI refusing a provider change on resume.Copy audit (docs/copy.md §8)
No UI text added or changed.
🤖 Generated with Claude Code