Repository navigation
test(chat-virtual): read the PageUp place once the list has drawn the rows it uncovered - #3659
Conversation
… rows it uncovered The PageUp step read the reader's place right after the scroll. On a loaded runner the list draws the rows the scroll uncovered a frame or more later, so the view's top was still blank and the first drawn row below it was taken as the place. The list then drew the row above at its estimated height and held that one; it measured 20 px shorter, so the read place moved 20 px and the anchor check failed (CI run 42989933116 on PR #3655). The step now waits until a drawn row covers the view's top before it reads the place. Not #3650's list patch: it never runs in this step, and the same forced order fails the same way on the commit before it.
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Merge passMerged head
Test-only PR ( It closes the failure of that script's "PageUp stays at its anchor through output" step (line 728) seen twice in CI run 42989933116: the step read the reader's place before the list had drawn the rows PageUp uncovered, so the first drawn row was taken as the anchor and then moved 20 px when the row above it was measured. The step now waits until a drawn row covers the top of the view, then reads; the assertion is unchanged and there is no sleep. The author forced that order: Left, both LOW (Claude, not run), sent to the author's lane: nothing in the script now checks the visible 20 px shift of text on a slow device when PageUp's rows are drawn late, and no issue tracks it; the anchor could still be read one frame before a correction (the script's |
Why
scripts/chat-virtual-browser-qa.ts:728("PageUp stays at its anchor through output") failed in both attempts of CI run 42989933116 on PR #3655 (an unrelated change): the row the reader was on moved 20 px.The test reads the reader's place right after PageUp. On a loaded runner the list draws the rows that PageUp uncovered a frame or more later, so the top of the view is still blank and the first drawn row (ROW-987, y=116) is taken as the anchor. The list then draws ROW-986 at its estimate and holds that one; ROW-986 measures 20 px shorter, so ROW-987 moves up 20 px. CI's numbers fit exactly: the
awaykeys[7, 8, 987..999]show nothing above 987 was drawn, and the scroll height changed by -18 = -20 + 2.This is not #3650's
hearUnheardScroll: it never fires in this step, and the same forced order fails the same way on 301934f, the commit before #3650.What
scripts/chat-virtual-browser-qa.ts: afterpage(-1), wait until a drawn row covers the top of the view, then read the place. No sleep, no timeout change, the assertion unchanged. No product change, nopatches/change, so no changelog fragment.Proof
In the CI runner image (fix-ci harness,
WORKERS=1): a forced order (PageUp, then 600 px past the drawn rows, the place read in the same task) fails 2/2 on main and 2/2 on 301934f at the same assertion (anchor 240 -> 226), and passes 2/2 with this change. Traces on main showhearUnheardScrollnever firing in the step (16 plain, 12 CPU-throttled steps).Validation
bun run check faston this head (rebased on a55d9b7): pass (unit 16104 pass, 0 fail).chat-virtual-browser-qa.ts, plain, interleaved: main 4/4, this change 4/4.check full, the integration suite,ui-regression.ts, WebKit, Firefox, macOS, Windows.Not verified
Not in this PR (LOW)
hearUnheardScrollmay treat the chat's selection-hold write as a reader's scroll, so a row that grew above would be applied twice. Found by reading, not run (Opus's LOW on fix(chat): going to the end while a row is still measured no longer jumps back to where you were #3650).