Repository navigation
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This changes the effective default appearance of server-backed browser tabs and popup tabs, including how System clears Playwright’s light override. The implementation is narrow and backward-compatible, but the user-visible default behavior warrants human review. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughPreview creation now passes an optional color scheme to server tabs. Server tab snapshots retain supplied schemes, and browser rendering applies the requested appearance. ChangesPreview appearance
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Preview opens remain compatible with older servers, though those servers will not apply the new appearance setting. No merge-blocking issue is established. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Appearance choices remain narrowly constrained and do not expand access or ownership. However, failure while applying the initial appearance can leave surviving browser resources outside normal tab cleanup and limits. This is a limited failure-containment risk; no new authorization bypass or data-access expansion was identified. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Problem
In the desktop app, a browser tab always renders light, even when Settings sets the default browser appearance to Dark or to System with a dark app theme. To reproduce, put macOS in Dark mode, set both the app theme and the default browser appearance to System, then open github.com in a new browser tab. The page renders light. The tab should open at the configured appearance, and a System tab should follow the app theme.
There are two causes. First,
PreviewOpenInputhas nocolorScheme, so server tabs never receivebrowserDefaultAppearance. The desktop applies that default only to its own webview tabs, throughbrowserDefaultTabState. Second, the desktop renders server tabs in its own webview, and the server drives that page through PlaywrightconnectOverCDP. Playwright setsprefers-color-scheme: lighton attach.ServerTab.colorSchemestarted as"system", soapplyRenderingtreated a System tab as already applied and never cleared that override.Change
PreviewOpenInputgains an optionalcolorScheme.PreviewManager.openwrites it into the new tab's snapshot.openPreviewSession,openUrlInPreview, andopenTerminalLinkInPreviewsenddefaults.appearancewhen they open a server tab.ServerTab.colorSchemestarts asnull, so the firstapplyRenderingalways callsemulateMedia. For System, that call clears Playwright's light override, and the page follows the desktop's theme again.Scope and approval
This is a small fix for an obvious bug, so it has no prior issue. The default browser appearance setting already exists and works for desktop tabs. This change makes server tabs honor the same setting and adds no new setting or behavior. The regression likely came with the server-run browser in #15328, which opens tabs with only
viewportandprofileId. #16701 reports the same gap for the default browser profile.Verification
ServerBrowser.test.tschecks two things. A tab opened withcolorScheme: "dark"getsemulateMedia({ colorScheme: "dark" }). A System tab that the desktop renders getsemulateMedia({ colorScheme: null }). Without the server change the test failed (Tests 1 failed). With the change,ServerBrowser.test.tsandManager.test.tspass (Tests 47 passed (47)).nativeTheme.themeSource = "dark"measuredlightafterconnectOverCDPanddarkafteremulateMedia({ colorScheme: null }).tsc --noEmitpasses forpackages/contracts,apps/server, andapps/web. Lint and format pass on the changed files.before.mp4
CleanShot.2026-10-08.at.7.09.55.AM.mp4
Recorded on macOS in Dark mode, with the app theme and the default browser appearance both set to System.
Two cases are not covered. A headless server tab streamed to a web client still renders light under System. I measured that headless Chromium on a dark Mac reports light even with no override, so the server has no system theme to follow. Tabs that an agent opens with
preview_opendo not get the client's default, because that setting lives on the client. In the desktop app, those tabs now follow the app theme.Model and harness: Claude Opus 5.5 in Claude Code, run through T3 Code.