test(react-virtual): add e2e test for React Compiler with directDomUpdates, bump react to 19 #1187
main fromrefs/pull/1187/head·merged by piecyk 🎯 Changes#
✅ Checklist#
- I have followed the steps in the Contributing guide.
- I have tested this code locally with
pnpm run test:pr.
🚀 Release Impact#
- This change affects published code, and I have generated a changeset.
- This change is docs/CI/dev-only (no release).
Summary by CodeRabbit#
New Features
- Upgraded to React 19 support across all examples and core packages
- Added React Compiler integration with end-to-end testing
Bug Fixes
- Fixed directDomUpdates positioning behavior in position and transform modes
- 1
View your CI Pipeline Execution ↗ for commit 534fa4e9bf079d27ba7b1c62ab8c76f0cb307b2d
Command Status Duration Result nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded 2m 30s View ↗ nx run-many --target=build --exclude=examples/**✅ Succeeded 16s View ↗
☁️ Nx Cloud last updated this comment at
2026-06-02 08:09:12UTCReview the following changes in direct dependencies. Learn more about Socket for GitHub.
Diff Package Supply Chain
SecurityVulnerability Quality Maintenance License @types/react-dom@19.2.3 @types/react@19.2.16 babel-plugin-react-compiler@1.0.0 react@18.3.1 ⏵ 19.2.7 +1
react-dom@19.2.7 More templates
- @tanstack/virtual-example-angular-dynamic
- @tanstack/virtual-example-angular-fixed
- @tanstack/virtual-example-angular-infinite-scroll
- @tanstack/virtual-example-angular-padding
- @tanstack/virtual-example-angular-smooth-scroll
- @tanstack/virtual-example-angular-sticky
- @tanstack/virtual-example-angular-table
- @tanstack/virtual-example-angular-variable
- @tanstack/virtual-example-angular-window
- tanstack-lit-virtual-example-dynamic
- tanstack-lit-virtual-example-fixed
- tanstack-react-virtual-example-chat
- tanstack-react-virtual-example-dynamic
- tanstack-react-virtual-example-fixed
- tanstack-react-virtual-example-infinite-scroll
- tanstack-react-virtual-example-padding
- tanstack-react-virtual-example-pretext
- tanstack-react-virtual-example-scroll-padding
- tanstack-react-virtual-example-smooth-scroll
- tanstack-react-virtual-example-sticky
- tanstack-react-virtual-example-table
- tanstack-react-virtual-example-variable
- tanstack-react-virtual-example-window
- tanstack-svelte-virtual-example-dynamic
- tanstack-svelte-virtual-example-fixed
- tanstack-svelte-virtual-example-infinite-scroll
- tanstack-svelte-virtual-example-smooth-scroll
- tanstack-svelte-virtual-example-sticky
- tanstack-svelte-virtual-example-table
- tanstack-vue-virtual-example-dynamic
- tanstack-vue-virtual-example-fixed
- tanstack-vue-virtual-example-infinite-scroll
- tanstack-vue-virtual-example-padding
- tanstack-vue-virtual-example-scroll-padding
- tanstack-vue-virtual-example-smooth-scroll
- tanstack-vue-virtual-example-sticky
- tanstack-vue-virtual-example-table
- tanstack-vue-virtual-example-variable
@tanstack/angular-virtual
npm i https://pkg.pr.new/@tanstack/angular-virtual@1187@tanstack/lit-virtual
npm i https://pkg.pr.new/@tanstack/lit-virtual@1187@tanstack/react-virtual
npm i https://pkg.pr.new/@tanstack/react-virtual@1187@tanstack/solid-virtual
npm i https://pkg.pr.new/@tanstack/solid-virtual@1187@tanstack/svelte-virtual
npm i https://pkg.pr.new/@tanstack/svelte-virtual@1187@tanstack/virtual-core
npm i https://pkg.pr.new/@tanstack/virtual-core@1187@tanstack/vue-virtual
npm i https://pkg.pr.new/@tanstack/vue-virtual@1187commit:
534fa4e🧹 Nitpick comments (1)
packages/react-virtual/e2e/app/react-compiler/main.tsx (1)
73-77: ⚡ Quick winConsider adding a comment to clarify the conditional styling logic.
The triple-nested ternary controlling
topandtransformis correct but complex. WhendirectDomUpdatesis enabled, the virtualizer writes positioning directly to the DOM:mode='transform': virtualizer writestransform: translate3d(...), so we providetop: 0as a basemode='position': virtualizer writestop: ...px, so we omit it from the initial style
A brief inline comment would help future maintainers understand why the styles differ by mode.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/react-virtual/e2e/app/react-compiler/main.tsx` around lines 73 - 77, Add a brief inline comment explaining the nested ternary that sets top and transform based on directDom (or directDomUpdates) and mode: clarify that when directDom is true and mode === 'transform' we set top: 0 because the virtualizer will write translate3d to the DOM, whereas when mode === 'position' we omit top because the virtualizer will set top directly; likewise note the fallback for non-directDom that sets both top: 0 and transform using v.start. Place this comment next to the expression that uses directDom, mode, and v.start to make the intent clear for future maintainers.🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Nitpick comments: In `@packages/react-virtual/e2e/app/react-compiler/main.tsx`: - Around line 73-77: Add a brief inline comment explaining the nested ternary that sets top and transform based on directDom (or directDomUpdates) and mode: clarify that when directDom is true and mode === 'transform' we set top: 0 because the virtualizer will write translate3d to the DOM, whereas when mode === 'position' we omit top because the virtualizer will set top directly; likewise note the fallback for non-directDom that sets both top: 0 and transform using v.start. Place this comment next to the expression that uses directDom, mode, and v.start to make the intent clear for future maintainers.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
6de9e63b-97a8-48b9-9347-555ab33db9fb📥 Commits
Reviewing files that changed from the base of the PR and between b983b21a48dabdb87e7ca36f5f8587d2cc02f837 and 534fa4e9bf079d27ba7b1c62ab8c76f0cb307b2d.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (21)
benchmarks/package.jsonexamples/react/chat/package.jsonexamples/react/dynamic/package.jsonexamples/react/fixed/package.jsonexamples/react/infinite-scroll/package.jsonexamples/react/padding/package.jsonexamples/react/pretext/package.jsonexamples/react/pretext/src/main.tsxexamples/react/scroll-padding/package.jsonexamples/react/smooth-scroll/package.jsonexamples/react/sticky/package.jsonexamples/react/table/package.jsonexamples/react/variable/package.jsonexamples/react/window/package.jsonknip.jsonpackages/react-virtual/e2e/app/react-compiler-vite.config.tspackages/react-virtual/e2e/app/react-compiler/index.htmlpackages/react-virtual/e2e/app/react-compiler/main.tsxpackages/react-virtual/e2e/app/test/react-compiler.spec.tspackages/react-virtual/package.jsonpackages/react-virtual/playwright.config.ts
piecyk merged this932c358
piecyk closed this
Sign in to join this conversation.
📝 Walkthrough
Walkthrough#
React ecosystem upgraded to v19.2.7 across all benchmarks and example applications with corresponding TypeScript type definitions, accompanied by a new React compiler end-to-end regression test suite for validating directDomUpdates behavior in position and transform modes.
Changes#
React 19 Upgrade
benchmarks/package.json,examples/react/chat/package.json,examples/react/dynamic/package.json,examples/react/fixed/package.json,examples/react/infinite-scroll/package.json,examples/react/padding/package.json,examples/react/pretext/package.json,examples/react/scroll-padding/package.json,examples/react/smooth-scroll/package.json,examples/react/sticky/package.json,examples/react/table/package.json,examples/react/variable/package.json,examples/react/window/package.json@types/reactand@types/react-domupdated to React 19 type versions.packages/react-virtual/package.json,knip.jsonbabel-plugin-react-compiler.examples/react/pretext/src/main.tsxuseElementWidthhook'srefparameter type updated fromReact.RefObject<HTMLElement>toReact.RefObject<HTMLElement | null>to reflect nullable ref.current state.React Compiler E2E Regression Tests
packages/react-virtual/e2e/app/react-compiler-vite.config.ts,packages/react-virtual/playwright.config.tspackages/react-virtual/e2e/app/react-compiler/index.html,packages/react-virtual/e2e/app/react-compiler/main.tsxpackages/react-virtual/e2e/app/test/react-compiler.spec.ts#736regression), and incremental scroll behavior with assertions on DOM positioning and render count ≤ 2 per scroll.Estimated code review effort#
🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related issues#
Possibly related PRs#
examples/react/pretext/src/main.tsxensures React 19 compatibility for the same file.benchmarks/package.jsonand example dependencies; this PR completes the ecosystem-wide upgrade.directDomUpdatesand positioning mode options that this PR's e2e test suite directly validates.Poem#
🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)#
✅ Passed checks (3 passed)
✨ Finishing Touches
🧪 Generate unit tests (beta)
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