Skip to content

test(media): keep the mute-glide check off playback and transitionrun timing - #917

Merged
baxen merged 1 commit into
mainfrom
claude00/fix-media-mute-flake
Oct 13, 2026
Merged

baxen merged 1 commit into
mainfrom
claude00/fix-media-mute-flake

Conversation

@baxen

@baxen baxen commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

media-controls.spec.mjs › "mute glides the volume knob and keyboard changes stay immediate" failed on webkit in 14 CI runs over the last day (5 on main). It is now the most frequent browser flake on main.

The CI traces from the 23:17 and 21:22 main runs show the same sequence each time:

  1. The 2s review clip autoplays. While it plays the controls are hidden, so hover retries on "<video> intercepts pointer events" for about 3.4s.
  2. By the time the test clicks Mute, the clip has ended. On Linux WebKit, muting then restarts playback from 0, as the screencast shows.
  3. The knob's transition never stays paused, and the poll times out after 10s.

This PR changes only the test:

  • It pauses the clip and turns off autoplay before the hover, so only the volume UI moves. The test checks volume CSS, not playback.
  • It pauses the knob transition from inside the poll instead of from a one-shot transitionrun listener, and stretches --duration-fast on the knob while it does, so a slow runner can't finish the 120ms glide first. The override is removed in finally.

No assertions were removed or loosened.

Testing

  • pnpm test:browser --project webkit --project chromium --no-deps tests/browser/media-controls.spec.mjs passes: 16/16 locally.
  • --repeat-each 10 across both engines passes: 20/20.
  • Not reproduced locally. macOS WebKit never failed, including under heavy parallel load and with the ended-clip-restarts-on-mute sequence emulated. I'll take the evidence from CI's Linux WebKit runs on this PR and on main afterwards.

🤖 Generated with Claude Code

… timing

On CI's Linux WebKit the 2s review clip autoplays while the hover waits on
hidden controls, ends, and restarts when the test mutes it. The knob's
transition then never stays paused and the poll times out. Pause the clip
for this test, and pause the stretched transition from the poll instead of
a one-shot transitionrun listener.

Co-authored-by: claude00 <fb8b76a01257932b8ca35060862c29bd09b2137638573731c2d5074fc02c5385@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Bradley Axen <[email protected]>
@baxen
baxen marked this pull request as ready for review October 13, 2026 00:16
@baxen
baxen requested a review from a team as a code owner October 13, 2026 00:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T00:18:56.298539Z d5c16cb Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5c16cbe0c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

});
// Playback hides the controls and, on CI's Linux WebKit, restarts the ended
// clip when it is muted. Keep the clip still so only the volume UI moves.
await dialog.locator("[data-review-media]").evaluate((video) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the required attribution trailers

This commit is authored and committed as Codex, but its message contains neither a Signed-off-by nor a Co-authored-by trailer. Any PR containing it will fail the hosted DCO check, and an agent-authored commit must also credit its human collaborator, so add both trailers before publishing the commit.

AGENTS.md reference: AGENTS.md:L194-L200

Useful? React with 👍 / 👎.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes requested: the test still exercises the production transform transition and retains keyboard/reduced-motion assertions, with cleanup restoring the duration token. Hosted Linux logs show all 16 cases in this file passing across Chromium/WebKit on the PR test merge; overall CI was incomplete at the snapshot, and one run does not establish flake elimination. Star Lord’s automated source review via Wes’s account; no tests or app executed locally.

Head: d5c16cbe0c259d7503ebc49d28945fd8c2b9705a · Base: 55b71bf1db0ff6f5700dafc0d9f347a7d52ec8ed.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 No changes requested. Carl, an automated reviewer, commenting via Wes’s GitHub account.

The test still proves a real transform transition on the production knob: the stretch resolves on .volumeKnob itself (VideoPlayer.module.css:240-242), an absent animation still fails the poll, and the keyboard and reduced-motion 0s assertions are unchanged. Pausing playback is the right scope, since this test checks volume CSS, not playback. Cleanup finishes the animation before removing the override, so the later assertions don't see a stray transition.

  • The Codex DCO/trailer comment is incorrect. The commit carries both Co-authored-by and Signed-off-by, and DCO Check passes.
  • Non-blocking follow-up: if muting an ended clip really restarts it from 0 on Linux WebKit (likely WebKit re-running autoplay once the clip is muted), users would see that too. This PR now steps around it, so it may deserve its own issue.
  • Validation: all CI on this head is green, including 6/6 WebKit shards. One green run doesn't prove the flake is gone. Watching main afterwards, as the PR plans, is the real exit check. No local runs.

Head: d5c16cbe0c259d7503ebc49d28945fd8c2b9705a

@baxen
baxen merged commit bd52c73 into main Oct 13, 2026
23 checks passed
@baxen
baxen deleted the claude00/fix-media-mute-flake branch October 13, 2026 03:30
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