Skip to content

Sheet auto-scroll slot baseline taken at the first scroll - #217

Merged
grunion-ai merged 1 commit into
mainfrom
claude/sheet-scroll-flake-e316
Nov 1, 2026
Merged

grunion-ai merged 1 commit into
mainfrom
claude/sheet-scroll-flake-e316

Conversation

@grunion-ai

Copy link
Copy Markdown
Owner

What changed

test/sheet-scroll.test.mjs: the "still pointer in the bottom zone" test records its baseline insertion slot in the page, on the first frame the sheet has moved. It used to read the slot over the wire after the pointer move.

Why

main went red on e316487 (run 41234180787): sheet auto-scroll (firefox) failed with expected: 12, actual: 12 on "the insertion slot tracks the thumbnails moving under the still pointer". Chromium, WebKit and embedded passed in the same run, and the next commit on main was green.

The sheet scrolls at about 19px a frame from the moment the pointer enters the zone. A slow round trip let the baseline read land about a row down, and the 400px wait then ended inside the same 243.5px row, so both reads saw slot 12.

The product was correct: track() updates ins in the same tick as scrollTop.

Verification

Firefox, with a stall injected after the pointer move:

Stall Old test New test
0ms pass pass
250ms fail, 12 and 12 pass
330ms fail, 12 and 12 pass
600ms not run pass

node --test test/sheet-scroll.test.mjs on all four projects: 22 pass, 0 fail, with the host under load (20.8 on 10 cores).

🤖 Generated with Claude Code

The test on e316487 failed on Firefox in CI (run 41234180787) with the
slot at 12 on both reads. The baseline was read over the wire after the
pointer reached the bottom zone, while the sheet scrolled at about 19px
a frame. A round trip of 250ms put that read a full row down, inside
the 243.5px row the 400px wait assumes it starts from, so both reads
saw the same slot.

The page now records the slot itself on the first frame the sheet has
moved, so the baseline no longer depends on round-trip time.

Injecting a stall after the move, on Firefox:
old test: 0ms passes, 250ms and 330ms fail with 12 and 12, the CI values.
new test: 0ms, 250ms, 330ms and 600ms pass.

Test-only. The insertion slot in template.html was correct throughout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grunion-ai
grunion-ai merged commit 3be7e81 into main Nov 1, 2026
1 check passed
@grunion-ai
grunion-ai deleted the claude/sheet-scroll-flake-e316 branch November 1, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant