Repository navigation
Conversation
A Link with the 'visible' strategy now waits until it has been in the viewport for 300 ms before prefetching. Leaving the viewport cancels the wait, entering again restarts it, and unmounting clears it, so links scrolled past in a long list are not prefetched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yangshun
marked this pull request as draft
November 4, 2026 06:40
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yangshun
marked this pull request as ready for review
November 4, 2026 06:44
cpojer
approved these changes
Nov 4, 2026
cpojer
left a comment
Member
There was a problem hiding this comment.
Makes sense. We should get this out and then see if we should adjust the thresholds a bit.
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.
A
'visible'Link now prefetches only after it has been in view for 300 ms. Scrolling it out of view cancels the wait, and coming back restarts it.300 ms skips links scrolled past quickly in long lists, now that
'visible'can be the app-wide default.Precedent: Astro debounces viewport prefetches by the same 300 ms, and TanStack Router applies
preloadDelayto viewport preloads, cancelling when the link leaves the viewport.Tests: fake-timer unit cases for the delay, cancel, restart, firing once, and cleanup.
🤖 Generated with Claude Code