fix(virtual-core): reconcile index scrolls after pending measurements - #1294
minwookshin wants to merge 1 commit into
Conversation
|
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 configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe virtualizer now tracks when a scroll reaches its target and continues index-based reconciliation while measurements are pending. Tests cover deferred ResizeObserver delivery, external scrolls, and end-clamp adjustments. The cached-measurements demo and Playwright test exercise end pinning with both observer scheduling modes. ChangesScroll reconciliation
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable issue remains from this review; the change is mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change affects scroll positioning and cancellation, but the reviewed paths do not show a new security boundary or sensitive operation. Some delayed-event ordering remains unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
packages/virtual-core/tests/index.test.tsParsing error: "parserOptions.project" has been provided for 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 |
🎯 Changes
Fixes #1290. Keep
scrollToIndexreconciliation active long enough for pending ResizeObserver measurements to update the target, including rAF-deferred measurements. If an external scroll leaves a reached target during that wait, retire reconciliation so it respects the new position; measurement compensation still reconciles.Added core and browser regressions for a cached row growing while re-pinning to the end, plus coverage for scrolling away and regular/clamped measurement compensation. Both observer modes previously stopped 30px short and now land at the end.
Validation passed:
pnpm test:pr --base=origin/main --parallel=1(69 affected projects), pluspnpm --filter @tanstack/react-virtual test:e2e cached-measurements.spec.ts --browser=all --workers=1(9 tests across Chromium, Firefox, and WebKit). The core suite passes 173 tests, and the existing Marko chat reading/prepend cases also pass five consecutive runs each.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit