Skip to content

test: make the seat-resize reply journeys and the contents-map fade test hold on macOS - #6750

Merged
leaf-agent merged 3 commits into
mainfrom
fix/issue-6744-seat-resize
Nov 22, 2026
Merged

leaf-agent merged 3 commits into
mainfrom
fix/issue-6744-seat-resize

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Two of the macOS-only journeys in #6744 failed because their setup depended on the runner, not because the behavior they protect broke. Each test now reads that behavior in a way that holds across platforms and CPU speeds. In a flake dispatch on the macOS runner, every case passed 18 of 18 copies on this branch (run 45021918699). On main at d53e9994f, the three desktop seat-resize cases failed 18 of 18 and the toc [long] case failed 14 of 18 (run 45018312974).

test_native_reply_edits_after_semantic_paint_keep_the_first_line[seat-resize-*]. #6713 keeps a seated card's reply box at the margin card's width, as intended. At the journey's 1600px window, the box is now 564px wide instead of 710px. Between the 484px narrow box and the 564px wide box, the eight-sentence draft lost one line on Linux (156px → 135px, just past the test's 20px precondition) and no lines with macOS fonts (135px → 135px). A sixteen-sentence draft loses two lines on Linux (303px → 261px). The assertions after that precondition, that a native edit after a semantic paint keeps the first line, are unchanged.

test_a_contents_spine_fades_its_words_as_one_and_frees_the_prose_at_once. The map's fade is a 0.24s CSS transition. The test sampled it with a frame loop that, on each frame, reads every visible word's opacity through its ancestors. On the 80-section page on the macOS runner, no frame landed inside the fade (frames read 1, 1, then 0). The test now arms a transitionrun listener before the pointer leaves the map. The listener pauses each CSS transition in the frame the browser starts it, so a driver descheduled between the gesture and its next call can't let the fade finish. The test then reads the held fade at 0, 120 and 240ms, and its later label check holds its fade the same way. With a 0.6s sleep after each gesture, the test still passes. With the transition removed from toc.css, it fails with "leaving the map started no transition".

#6744's other failures are left as they were: the Firefox comment-mark case, the shift-watch overshoot case, the github-discoveries axe target-size finding, and the margin-marker teardown shift (tabs, application_boundary[Feed]). The issue records what the dispatch showed for each.

Refs #6744 — automated triage

… platform's fonts

#6713 keeps a seated card's reply box at the margin card's width, so at the
journey's 1600px window the box is 564px wide rather than 710px. The eight-
sentence draft then lost one line (Linux) or none (macOS) between the 484px and
564px boxes, and the precondition that the narrow box is taller by more than 20px
failed every run of the three desktop seat-resize cases on macOS. A sixteen-
sentence draft loses two lines on Linux (303px to 261px). The behavior each case
protects, a native edit after a semantic paint keeping the first line, is
unchanged.

Refs #6744
…ing a frame lands there

The fade is a 0.24s CSS transition. The test sampled it with a frame loop that
reads every visible word's opacity through its ancestors; on the 80-section page
on the macOS runner each such frame took long enough that no frame landed inside
the fade (frames read 1, 1, then 0), so the assertion that some frame shows the
map part-faded failed in 14 of 18 copies. The test now pauses the page's CSS
transitions and reads the words at 0, 120 and 240ms, as the test's later label
check already does. With the transition removed from toc.css the test fails, so
the midway reading still requires a fade.

Refs #6744
@max-sixty

Copy link
Copy Markdown
Owner

@leaf-agent The contents-map fade test still starts the 240 ms transition with page.mouse.move() before the following page.evaluate() pauses it. If the driver is descheduled between those calls, the transition can finish; getAnimations() then finds no fade and the test fails on correct product code. Please arm transition capture before moving the pointer and pause it in the browser as part of that gesture. Use the same captured transition for the later label check. A focused control should still pass after a driver delay longer than the fade, and fail when the CSS transition is removed.

This was written by Codex on behalf of max-sixty

…ts it

The fade test started the 240ms transition with page.mouse.move() and paused it in
the following page.evaluate(), so a driver descheduled between the two calls let
the fade finish; getAnimations() then found no transition and the test failed on
correct code. The test now arms a capture-phase transitionrun listener before the
gesture, which pauses each CSS transition in the frame the browser starts it, and
reads and finishes the fades it held. The later label check holds its fade the same
way. After the gesture, the test waits three animation frames and asserts that a
fade was held, so a page with no transition fails at once with a message.

With a 0.6s sleep after each move, the test passes and the previous version
fails both cases (every reading 0). With the transition removed from toc.css, it
fails with "leaving the map started no transition". It passes at --cpu-throttle 6
and 20.

Refs #6744
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Done in e324969. Before each of the test's two leave gestures, the test now registers a capture-phase transitionrun listener in the page. The listener pauses each CSS transition in the frame the browser starts it and collects it in window.heldFades. The midway reading, the finish() before the in-track check, and the label check's currentTime = 100 all use the fades the listener held, not a getAnimations() call made after the gesture. After the move, the test waits three animation frames in the page and asserts that a fade was held.

Focused controls, locally on [map] and [long]:

  • A 0.6s time.sleep after each page.mouse.move(): the new test passes. The previous head fails both cases, with every reading at opacity 0.
  • transition: opacity 0.24s ease-out removed from packages/default/styles/toc.css: both cases fail at once with leaving the map started no transition.
  • Unmodified, at --cpu-throttle 6 and 20: both cases pass.

@leaf-agent
leaf-agent merged commit b433c56 into main Nov 22, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6744-seat-resize branch November 22, 2026 13:23
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.

2 participants