Skip to content

docs(virtual-core): bring the hold comments up to date with the wheel hold - #1407

Merged
piecyk merged 1 commit into
TanStack:mainfrom
piecyk:docs/webkit-wheel-hold-comments
Nov 29, 2026
Merged

piecyk merged 1 commit into
TanStack:mainfrom
piecyk:docs/webkit-wheel-hold-comments

Conversation

@piecyk

@piecyk piecyk commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

🎯 Changes

Follow-up to #1400, comments only plus the wording of its changeset. No code line changes.

A few comments around the hold went stale while #1400 moved:

  • "Real Safari … not measured" is replaced by the Safari 26.5.2 run from that thread (nothing lost on trackpad momentum, about 2.5% on a continuous mouse wheel). Without the hold only Playwright is measured, the comment says that too.
  • The two frame lag before the top was seen in Playwright WebKit 26.0 and not in 27.2, so the comment names the version.
  • The reasons a write is held and the callers of _flushHoldIfReady now name the wheel timer, the frame at the top and a command's start.
  • _startScroll said a command lands _holdOffset short of a held correction. A wheel hold is written first now, a touch or bounce hold still works the old way.
  • The changeset said "losing distance" as if none is lost. It now says a write at the top of the list can still cost a wheel event or two.

One thing the comment on _flushHoldIfReady only records and doesn't fix: a command's start passes sync: true although _willUpdate can reach it through a follow on append. Came up in review of #1400, separate from #1406.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr. (Ran virtual-core test:lib, test:types, test:eslint and the affected set from the pre-push hook.)

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified when scroll corrections may be delayed during wheel input, including at the top of a list.
    • Added WebKit measurement context and clarified how wheel-related delays differ from touch and bounce-related delays.

… hold

Comments only, plus the wording of the TanStack#1400 changeset:

- the real Safari run from TanStack#1400 replaces 'not measured';
- the two-frame lag before the top was seen in Playwright WebKit 26.0
  and not in 27.2;
- the callers of _flushHoldIfReady and the reasons a write is held now
  name the wheel timer, the frame at the top and a command's start;
- a command writes a wheel hold first, it no longer lands short of it;
- the changeset no longer says no distance is lost: a write at the top
  can still cost a wheel event or two.
@changeset-bot

changeset-bot Bot commented Nov 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 305bf0e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 9 packages
Name Type
@tanstack/virtual-core Patch
@tanstack/angular-virtual Patch
@tanstack/lit-virtual Patch
@tanstack/marko-virtual Patch
@tanstack/react-virtual Patch
@tanstack/solid-virtual Patch
@tanstack/svelte-virtual Patch
@tanstack/vue-virtual Patch
@tanstack/virtual-benchmarks Patch

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request updates comments and changeset wording about WebKit wheel-event loss and the existing wheel-hold behavior. It does not change implementation behavior.

Changes: WebKit wheel-hold documentation

Layer / File(s) Summary
Document wheel-hold behavior
.changeset/webkit-wheel-prepend-anchor.md, packages/virtual-core/src/index.ts
The changeset and code comments describe measured wheel-event loss, hold timing, flush callers, and how held corrections are written.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related issues

  • TanStack/virtual#1398 — The comments and changeset describe the wheel-hold behavior related to this issue, but this pull request does not change its implementation.
  • TanStack/virtual#1406 — The comments describe the hold-flush path involved in this issue, but the pull request does not resolve it.

Possibly related PRs

Suggested reviewers: oyobbeb

Merge Risk: Minimal · up to 305bf

This change updates documentation comments and a changeset description only. It does not alter runtime behavior, so merge risk is negligible.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title uses the conventional docs(scope) prefix and names the change: updating the comments about the wheel hold in virtual-core. The raw summary confirms the diff only edits comments and one chang…
Description check Passed The description follows the repository template. It has the Changes section with motivation and scope, the Checklist, and the Release Impact section with the docs/CI/dev-only box checked. It explains …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title uses the conventional docs(scope) prefix and names the change: updating the comments about the wheel hold in virtual-core. The raw summary confirms the diff only edits comments and one changeset line, so the title matches the main change. It is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description follows the repository template. It has the Changes section with motivation and scope, the Checklist, and the Release Impact section with the docs/CI/dev-only box checked. It explains that the PR is comments and changeset wording only, with no code changes. The checklist shows a partial local test run, and the author states that they did not run pnpm run test:pr, which the template asks for.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f99ca414-cd7a-4b3e-ad83-994b51d1e4b5
Commits

Reviewing files that changed from the base of the PR and between d40d8c8 and 305bf0e.

Files selected for processing: 2

  • .changeset/webkit-wheel-prepend-anchor.md
  • packages/virtual-core/src/index.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

@nx-cloud

nx-cloud Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 305bf0e

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 2m 58s View ↗
nx run-many --target=build --exclude=examples/** ✅ Succeeded 15s View ↗

💡 With Ultracache enabled, Nx Cloud learns each task's file inputs in CI and uses them on later runs. Turn on Ultracache in workspace settings ↗ · Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-11-29 11:20:29 UTC

@pkg-pr-new

pkg-pr-new Bot commented Nov 29, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-virtual

npm i https://pkg.pr.new/@tanstack/angular-virtual@1407

@tanstack/lit-virtual

npm i https://pkg.pr.new/@tanstack/lit-virtual@1407

@tanstack/marko-virtual

npm i https://pkg.pr.new/@tanstack/marko-virtual@1407

@tanstack/react-virtual

npm i https://pkg.pr.new/@tanstack/react-virtual@1407

@tanstack/solid-virtual

npm i https://pkg.pr.new/@tanstack/solid-virtual@1407

@tanstack/svelte-virtual

npm i https://pkg.pr.new/@tanstack/svelte-virtual@1407

@tanstack/virtual-core

npm i https://pkg.pr.new/@tanstack/virtual-core@1407

@tanstack/vue-virtual

npm i https://pkg.pr.new/@tanstack/vue-virtual@1407

commit: 305bf0e

@piecyk
piecyk merged commit cc7f7f7 into TanStack:main Nov 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant