Repository navigation
fix(ui): prevent native history from jumping during prepend - #123103
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
|
Land-ready verification is complete on head Root cause: TanStack Virtual 3.17.6 could paint the compensating scroll position before the matching row transforms. The patch consumes the upstream 3.17.7 same-paint fix and keeps the e2e assertion tied to real painted mutation batches instead of fake-clock animation frames. Proof:
The first CI attempt had two unrelated timing flakes ( |
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where users scrolling to older native session history could see the visible transcript jump by one estimated row while the older page was prepended. The unrelated CI failure in run 31681003925, job 94386567989 captured the top row moving from
24pxto-96pxeven though it remained mounted.Why This Change Was Made
TanStack Virtual 3.17.6 wrote the resize-compensation scroll position before the matching row transforms were notified, allowing one inconsistent paint. This updates
@tanstack/virtual-coreto 3.17.7 and@tanstack/lit-virtualto 3.13.36, which contain the upstream same-paint compensation fix from TanStack/virtual#1239.The existing regression now samples every mutation batch after a real rendering opportunity instead of advancing fake
requestAnimationFramecallbacks. It preserves the strict viewport-position assertion, adds no retries or timeout increases, and can emit sanitized before/after screenshots when proof capture is enabled.AI-assisted: yes; the final diff was independently autoreviewed.
User Impact
Older native history now loads with its spinner while the current transcript stays visually anchored. When the page completes, the spinner disappears without a one-row flash or duplicate request after history is exhausted.
Evidence
Before: the deterministic real-paint probe failed on Blacksmith Testbox at iteration 10 with five post-paint samples holding the original anchor at
-96pxinstead of24px. The original unrelated CI failure showed the same 120px displacement.After: the same top message remains in the same position after the older page is prepended and the spinner is removed.
Validation on Blacksmith Testbox
tbx_01kzx5pg8dfdey86n2ynqvf0yh:ui/src/e2e/claude-sessions.e2e.test.ts: 7/7 passed on the final diff--mode uncommitted): no accepted/actionable findingsProduction LOC: +0/-0. Test code: +101/-42. Package manifest and lockfile version substitutions are net-neutral.