test(react-virtual): add e2e test for React Compiler with directDomUpdates, bump react to 19#1187
Conversation
…dates, bump react to 19
📝 WalkthroughWalkthroughReact 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. ChangesReact 19 Upgrade
React Compiler E2E Regression Tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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. Comment |
|
View your CI Pipeline Execution ↗ for commit 534fa4e
☁️ Nx Cloud last updated this comment at |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
🧹 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 styleA 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
⛔ 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
🎯 Changes
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
New Features
Bug Fixes