Skip to content

test(chat-virtual): read the PageUp place once the list has drawn the rows it uncovered - #3659

Merged
devswha merged 1 commit into
mainfrom
fix/chat-virtual-away-shift
Nov 11, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/chat-virtual-away-shift

Conversation

@devswha

@devswha devswha commented Nov 11, 2026

Copy link
Copy Markdown
Owner

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 away keys [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: after page(-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, no patches/ 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 show hearUnheardScroll never firing in the step (16 plain, 12 CPU-throttled steps).

Validation

Not verified

  • The exact frame order on the CI runner. The forcing reproduces the same mechanism, and CI's numbers fit it.

Not in this PR (LOW)

… 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.
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Improved automated validation of chat scrolling after PageUp. Checks now wait until a chat row reaches the top edge of the visible chat area before recording scroll position measurements, making the check reflect the displayed content more accurately.

The QA script now waits for a mounted chat row to intersect the chat view’s top edge after PageUp. It records the reader’s anchor metrics after that condition is met.

Changes: PageUp position check

Layer / File(s) Summary
Wait for rendered row before measuring
scripts/chat-virtual-browser-qa.ts
After PageUp, the test waits for a mounted chat row to intersect the top edge of the chat view before recording reader position metrics.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Possibly related issues

  • devswha/ovis#3662 — Describes a similar PageUp timing scenario. This change updates the QA test, but does not fix the product-level content shift.

Possibly related PRs

  • devswha/ovis#2735 — Changes how upward navigation inputs handle pending timeline scrolling; this QA scenario exercises PageUp behavior.

Suggested reviewers: odfalik

Merge Risk: Minimal · up to 39f8c

This change only adjusts a browser QA test so it waits for a drawn row at the top of the view before measuring. It has no product impact, and no concrete merge-blocking risk was found.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly identifies the test change: it waits for uncovered rows to draw before reading the PageUp position.
Description check Passed The description explains the failure, the cause, the change, proof, validation results, and skipped checks. It uses “## Why” and “## What” instead of the template’s “## Change” heading, but it provide…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the failure, the cause, the change, proof, validation results, and skipped checks. It uses “## Why” and “## What” instead of the template’s “## Change” heading, but it provides the required change information. The validation section is complete and specific.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between df59ebd and 39f8cbe.

Files selected for processing: 1

  • scripts/chat-virtual-browser-qa.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

@devswha
devswha merged commit 1075cab into main Nov 11, 2026
13 checks passed
@devswha

devswha commented Nov 11, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head 39f8cbeda639 as 1075cabc9bd9 on GitHub's checks, with no unresolved review threads.

Reviewer Verdict Note
claude CLEAR
codex CLEAR

Test-only PR (scripts/chat-virtual-browser-qa.ts, nine lines). Two reviewers at this head: Claude (Opus) CLEAR, Codex Terra CLEAR with no findings.

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: main failed 2 of 2, the commit before #3650 failed 2 of 2 at the same assert (so this is not #3650's doing), the fix passed 2 of 2.

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 settled() helper is there if the flake returns).

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