Skip to content

fix: use upstream TanStack Virtual gap updates - #65

Merged
2wheeh merged 2 commits into
mainfrom
fix/tanstack-virtual-gap
Sep 24, 2026
Merged

2wheeh merged 2 commits into
mainfrom
fix/tanstack-virtual-gap

Conversation

@2wheeh

@2wheeh 2wheeh commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

TanStack Virtual now handles reactive gaps and faster multi-lane placement upstream. Raise the @tanstack/react-virtual peer minimum to 3.14.6 (virtual-core 3.17.4), the first release containing TanStack/virtual#1223 and TanStack/virtual#1224.

Remove useMasonry's gutter-change measure() effect so gutter updates preserve measured item sizes. Align the development and example dependencies and lockfile with the new minimum.

Compatibility

Consumers on @tanstack/react-virtual <3.14.6 must upgrade their peer dependency. Includes a minor changeset following the repository's pre-1.0 breaking-change convention.

Summary by CodeRabbit

  • Bug Fixes
    • Changing the masonry layout’s gutter now updates item positions while preserving measured item sizes.
  • Compatibility
    • Requires @tanstack/react-virtual version 3.14.6 or later. Earlier versions are no longer supported.

@changeset-bot

changeset-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 662c32d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kaskaid Minor

Not sure what this means? Click here to learn what changesets are.

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

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
kaskaid Ready Ready Preview Sep 24, 2026 12:26pm UTC

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c450b5b9-8ff0-416b-9047-ee6e40ae1899

📥 Commits

Reviewing files that changed from the base of the PR and between 186ef03 and 662c32d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • .changeset/tanstack-virtual-gap.md
  • examples/tanstack-start/package.json
  • package/package.json
  • package/src/hooks/useMasonry.test.tsx
  • package/src/hooks/useMasonry.ts
💤 Files with no reviewable changes (1)
  • package/src/hooks/useMasonry.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The package now requires @tanstack/react-virtual >=3.14.6. useMasonry no longer explicitly remeasures when gutter changes. Its gutter test checks item styles before and after a gutter update.

Changes

Masonry gutter updates

Layer / File(s) Summary
Set the TanStack Virtual minimum version
package/package.json, examples/tanstack-start/package.json, .changeset/tanstack-virtual-gap.md
The package peer dependency minimum and development dependency are updated to 3.14.6. The example dependency is also updated. The changeset records the release and describes the dependency requirement and gutter-change update.
Update gutter-change handling and tests
package/src/hooks/useMasonry.ts, package/src/hooks/useMasonry.test.tsx
The hook removes the effect that called measure() when gutter changed. The test checks item 5’s styles with gutter values of 20 and 40.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 662c3

The gutter update relies on TanStack Virtual 3.14.6 or later, as required by the package. No actionable merge-blocking risk remains after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adopting upstream TanStack Virtual gap updates.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@2wheeh
2wheeh marked this pull request as ready for review September 24, 2026 12:26
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T12:28:54.014562Z 662c32d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@2wheeh
2wheeh merged commit b3eda4f into main Sep 24, 2026
6 checks passed
@2wheeh
2wheeh deleted the fix/tanstack-virtual-gap branch September 24, 2026 12:32
@github-actions github-actions Bot mentioned this pull request Sep 24, 2026

This branch was successfully deployed

1 active deployment
Preview — 662c32d4 Deployed Sep 24, 2026 by vercel[bot]
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