Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
Summary by CodeRabbit
WalkthroughChromium browser startup now supports configurable GPU argument profiles. The environment schema validates ChangesGPU mode configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
CloakBrowser launches Chromium through Playwright with ignoreDefaultArgs = ["--enable-automation", "--enable-unsafe-swiftshader"], dropping the SwiftShader flag Playwright passes by default, and adds --ignore-gpu-blocklist in headed mode. Since f531646 moved Teams onto CloakBrowser, our --disable-gpu + --disable-software-rasterizer + --disable-gpu-compositing stacked on top of that, leaving no rasterizer able to handle a large surface. Small camera tiles still paint; the moment a screen-share track appears the whole stage is captured as row-shifted garbage (bot cdb011f5, 2026-07-09: 46 min of unusable video, zero errors logged). Replace the flag set with a coherent software stack (--disable-gpu + ANGLE-SwiftShader) and make it env-selectable via BROWSER_GPU_MODE so the config can be swapped in preprod without a rebuild. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
434c2d6 to
fa8a602
Compare
Problem
Teams recordings turn into row-shifted garbage the moment someone screen-shares. Confirmed on prod bot
cdb011f5-9530-4a3c-81af-5ef42baaaafa(2026-07-09, customer-reported): clean for the first 3 min, then 46 minutes of unusable video — and zero errors logged. Corruption is present inraw_video.mp4, i.e. at capture, so ffmpeg/branding is not involved. The Teams DOM overlay stays crisp, so x11grab is fine — Chromium is painting the video surfaces as garbage.Reproduced live on prod today with a fresh bot + screen share.
Cause
f531646(Jul 2) moved Teams from plain Chrome to CloakBrowser, carrying over these flags:CloakBrowser launches through Playwright with
ignoreDefaultArgs = ["--enable-automation", "--enable-unsafe-swiftshader"](itsconfig.js), so it drops the SwiftShader flag Playwright normally passes, and adds--ignore-gpu-blocklistin headed mode. Result: no hardware GPU, no SwiftShader, no GPU compositing — but the blocklist ignored. Nothing is left that can raster a large surface. Small camera tiles still paint; a full-size share track does not.The pre-Jul-2 Chrome path passed no GPU flags and kept
--enable-unsafe-swiftshader, which is why this never happened before. Meet has run this same broken combo since Jun 2 — its screen-shares are likely affected too, just unreported.Fix
BROWSER_GPU_MODEenv var selects the flag set (browser/browser.ts):swiftshader(default)--disable-gpu --use-gl=angle --use-angle=swiftshadernonelegacyEnv-selectable so preprod can bisect the three variants without rebuilding the image.
Note:
--enable-unsafe-swiftshaderis deliberately not passed — Playwright appliesignoreDefaultArgsas a filter over the whole arg list, user args included (coreBundle.js:38322), so it would just be stripped again. It only gates WebGL; ANGLE-SwiftShader raster/compositing works without it.Test plan
swiftshader→ clean captureBROWSER_GPU_MODE=none(no rebuild) → clean capture🤖 Generated with Claude Code