Repository navigation
Conversation
Replace unavailable Blacksmith labels with ubuntu-24.04 and windows-2025 for PR tests and duplicate checks. Preserve every job, matrix entry and command while allowing this fork's queued checks to start.
The virtualizer core's reset-delay fallback ends a scroll with the offset read by the last scroll event. When a history prepend or anchor write moves scrollTop and a long task holds that write's own scroll event past the delay, the stale end delivery resets the core offset. Later prepend compensation then targets the stale offset, so loaded history rows are skipped. End-of-scroll deliveries now report the live scrollTop; scrolling deliveries are unchanged. Refs #89
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Coordinator source review of exact commit Independently ran the offset test file with the package's solid/happy-dom flags: 5 pass, 11 expectations. Inspected the unchanged production history regression and the reported 3-repeat/full-file results. The PR correctly discloses the auxiliary stability test's 3/3 baseline and 3/3 candidate failures and the small sequential benchmark sample. This does not claim that auxiliary case is fixed or that performance equivalence is proven. The exact commit is now in the local V2 integration worktree with the other reviewed fixes. The target branch remains unchanged. Required Linux/Windows checks on the final combined head remain a merge gate; #89 stays open pending that integration. |
|
Superseded by PR #96, squashed into Closing this earlier PR as superseded, not claiming it was independently merged. Its branch remains intact. Final combined verification is deferred until the scoped implementation issues are closed, as requested by the user. |
Summary
Loading older history no longer skips parts when a page's anchor write lands inside the virtualizer's scroll-reset window (#89).
The timeline uses the TanStack virtual-core defaults: no
useScrollendEvent, and a 150 msisScrollingResetDelay. CoreobserveOffsetdebounces the end-of-scroll callbackcb(offset, false)with the offset stored by the last scroll event, and never re-readsscrollTop.When a prepend compensation or anchor write moves
scrollTopinside that window, and a long task holds the write's own scroll event past the delay, the stale end delivery resets the corescrollOffset. The core callback also zeroesscrollAdjustments. The next page's compensation then works from the stale offset. Its writes land at the stale offset plus the delta, so the parts in between are never mounted.packages/app/src/session/timeline/observe-element-offset.ts:delivernow reports the liveelement.scrollTopfor end-of-scroll (isScrolling = false) deliveries.scrollTop: the wrapper's reconnect check andpinColdBottominvirtualizer.tsx.isScrollingreset still happens. This is the same path the reconnect check's live report already takes.virtualizer.tsxand every e2e assertion. No timeout, retry or fixture changes.Root cause evidence
scrollTopstayed at 2704.useScrollendEvent: truechanges the reset timing and the reconnect deadline, and browsers withoutscrollendwould keep the bug.Tests
observe-element-offset.test.ts: "ends a scroll at the live offset after a write without its own scroll event".scrollTop = 2620with no event (happy-dom's setter dispatches none), then a wait past the reset delay.[100, false]instead of[2620, false]. The other 4 tests pass.test:unitflags: 27 pass across 3 files.--repeat-each=3: 3 passed.e2e/regression/timeline-history.spec.ts: 6 passed. This covers prepend anchoring, completion and interruption, and hydration.timeline-stabilityscroll-interaction.spec.ts: 8 passed, 1 failed.observe-element-offset.tsreverted) and 3/3 with the fix, each time a 60 s wait forprt_descendant_keyboard_01_shellat L280.shellToolPartsExpanded: false, and the shell renders inside a collapsed "Used 1 Shell" group, so no element carries that part ID.bun typecheckinpackages/app: pass.bun run check: 37/37 tasks, lint 0 errors.@opencode/app:typecheckran fresh; the other tasks were cached.Performance
e2e/performance/timeline/session-entry-benchmark.spec.ts, "entry: cold session from Home", 10 repeats per side on a production build, one worker, no retries. The baseline reverts onlyobserve-element-offset.ts. All 20 runs passed with no missing or invalid records.No regression was observed. The sample is small and sequential, with the base always first, so it shows neither equivalence nor a gain. The fix adds one
scrollTopread per end-of-scroll delivery.Dependency
This branch is based on the #87 head
98b57d5349(cm-ci-runners), not directly onCM-Split-v2, because #89 is one of the cases blocking that CI branch. Until #87 merges, this PR's diff againstCM-Split-v2includes #87's commits. The #89 change is the single commit327962621e.Not verified here
Refs #89