Skip to content

Commit f0e99b8

Browse files
karkarlCopilot
andcommitted
Fix chat-timeline scroll CI: pin-storm coalescing, dynamic anchoring, prepend preservation
The ItemsRepeater SizeChanged storm during row realization fired a flood of reactive QueueScrollToBottom calls that each superseded the user's own ChangeView, so the proof tests' scroll-up never "took" and the view stayed pinned. Replace the multi-pass QueuePass stabilization with: - A coalescing guard (scrollPinPendingRef) so host.SizeChanged enqueues at most one reactive pin at a time. Held across the synchronous pin window (which can re-enter SizeChanged) and released only in terminal paths. - An authoritative ViewChanged handler: a genuine user scroll past the abandon gap cancels the in-flight settle timer/pending pin and disables anchoring immediately; symmetric re-arm to 1.0 when back in the bottom band. - A single settle timer (converges on atBottom, hands off to VerticalAnchorRatio = 1.0) instead of parallel timers fighting over ChangeView. - A per-render anchoring gate: VerticalAnchorRatio = following ? 1.0 : NaN, deferring to any pin/prepend that owns the ratio for its async window. Prepend: our FunctionalUI reconciler full-remounts every Entry (#996), which destroys the element the platform chose as the bottom anchor, so leaving VerticalAnchorRatio = 1.0 re-pinned a scrolled-up reader to the NEW bottom (offset 2528 -> 8531, gap 0). QueuePreservePrependOffset now disables anchoring and manually re-seats the offset by the measured inserted height instead, keeping the reader in the middle band (not reset to top, not dragged to bottom). Also update the ChatTimelineVirtualizationContractTests source-text assertions to the current mechanism and relax the prepend proof's anchoring assertion to the dynamic model (NaN while scrolled up, or 1.0 at bottom). Removed dead DIAG diagnostics and the unused FollowToBottomExtentEpsilon constant. Validation: build.ps1 green; Shared 2863 passed/31 skipped; Tray 1717 passed; UITests ChatTimelineVirtualizationProofTests 5/5; contract tests 3/3. Co-authored-by: Copilot App <[email protected]>
1 parent 8acd924 commit f0e99b8

3 files changed

Lines changed: 378 additions & 105 deletions

File tree

0 commit comments

Comments
 (0)