Repository navigation
Fix CI e2e flakes: section links in Chromium, and 4K video in WebKit - #108
Conversation
Under CPU load Chromium stops updating :target-current: with 4x CDP throttling it stayed on the section scrolled away from after a link click (5/6 runs), and at 6x it never left Notes, even after programmatic scrolls and a wheel scroll. aria-current mirrored it, so the indicator and aria-current both stuck. CI's episode.spec section-link tests failed on this in Chromium only (the one browser with scroll-target-group). Firefox and WebKit already tracked the section in the script (the last section whose top reached the bar's line). Use that path everywhere and anchor the indicator to aria-current. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hls.js climbed to the 2160p rendition for the corner picture (measured 3840x2160 decoded into a picture a few hundred pixels wide), which costs viewers bandwidth and, in CI's software-decoding WebKit, all four cores. Capped, the corner plays 240p and the level rises when the picture grows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Why
The goal is to merge
media-redesigninto main with confidence. Several e2e tests pass locally but fail or flake in CI. This PR fixes the cause I could pin down for each one. It also reports the one it only partly fixes.What changed
:target-current. Under CPU load, Chromium stops updating that value. With 4x CDP throttling it stayed on the section the page had just scrolled away from in 5 of 6 runs. At 6x it never left "Notes", even afterscrollToand a wheel scroll.aria-currentcopied that value, so it got stuck too, and so did the indicator. This matches CI: the stale value was "Transcript" at scrollY 2798 when "More episodes" was clicked. The fix runs the script path that Firefox and WebKit already used (the last section whose top has reached the bar) in every browser, and anchors the indicator toaria-current. This deletes thescroll-target-groupbranch, its utility and its variant.capLevelToPlayerSize: true. Before, it decoded 3840x2160 into the corner picture. In the CI Playwright image (WebKit on Linux uses hls.js), that one page held the 4-CPU container at about 400% CPU. Capped, the corner plays 240p.Verification
episode.specsection tests on chromium,--repeat-each=10 --workers=8: 70/70 passed. All ofepisode.specacross the 3 browsers: 82 passed, 1 failed. The failure was the firefox landscape-phone test, which passed 5/5 when rerun alone. My change does not touch the Firefox path.mcr.microsoft.com/playwright:v1.60.0-noble(docker, 4 CPUs, 2 workers), full suite. Before: 3 failed (player :220, player :275, explorer :707) in 8.4m. With the cap: 2 failed (player :49, player-phone :81) in 6.3m. This is one run each, so it is not conclusive. See below.pnpm lintclean.vitest277/277.pnpm build0 errors.player*.specon chromium and firefox: 18/18.Not fixed
In the CI image, WebKit renders in software at about 10 fps while anything plays, even audio only. Running animations (scrubber particles, card progress transitions, on-air bars) make each frame cost about 100ms. Tests that play media sit at 17 to 26s of a 30s budget, and they starve the other worker. That is what times out the ⌘K palette tests and player :220/:275 under load. One full WebKit run with
--workers=1had all of those pass (1 unrelated failure, 10.3m). I did not change the worker count on a single run.🤖 Generated with Claude Code
Summary by CodeRabbit