Skip to content

test: wait for the page search's marks to repaint before reading them - #5951

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5950
Nov 14, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5950

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

test_a_search_match_across_blocks_marks_and_selects_each_piece[browser-page] failed in the Nov 14 scheduled test-macos job with marks [1, 0]. The test waits for the search status to read 1 of 1 and then reads the marks. The input handler draws the count right away, but the marks are drawn in the next repaint frame (browser/runtime/repaint.js, nextRender). On a slow renderer, the test can read the marks while they still show an earlier query's frame. The partial query before shadow also reads 1 of 1, and it marks only the first block, which gives the [1, 0] macOS reported. The run's failure picture shows both pieces marked once the frame arrived. The test now calls rendered(page) between the status and the marks read. What it asserts is unchanged.

Verified on Linux. With the page's animation frames delayed by 1.5s after before shadow is typed, the old test fails with AssertionError: [1, 0] and the new one passes. All four engine/staging variants pass. Under the repository's rule for failures only test-macos shows, the next scheduled macOS run is the evidence after the fix.

This settles one of the four failures in #5950. The margin card's 460px jump on reply focus and the two widget-quality runtimes that never started remain open there.

Refs #5950 — automated triage

…locks

test_a_search_match_across_blocks_marks_and_selects_each_piece waited for the search status to read "1 of 1" and then read the painted marks. The input handler draws the count at once, but the marks are drawn in the next repaint frame (repaint.js, nextRender), so a slow renderer still showed the frame an earlier query painted: on macOS the marks read [1, 0], the shape the partial query "before shadow" leaves. The test now waits for rendered(page) between the two reads. The behavior it protects, a mark over each block's piece of a cross-block match, is unchanged.

Refs #5950
@leaf-agent
leaf-agent merged commit 11e9a9a into main Nov 14, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5950 branch November 14, 2026 18:58
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