Repository navigation
fix(vscode): match Integrated Browser theme to IDE theme - #14898
Merged
Merged
Conversation
Set the Playwright color scheme from the active VS Code theme so pages that honor prefers-color-scheme render dark or light to match the editor, and re-apply it when the IDE theme changes.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Reviewed by deepseek-v4.1-flash · Input: 59K · Output: 6K · Cached: 327.3K Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
October 7, 2026 14:00
WebReflection
approved these changes
Oct 7, 2026
This was referenced Oct 7, 2026
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The Integrated Browser rendered every page with
prefers-color-scheme: light, even in a dark IDE. Sites that honor the color scheme, for example GitHub, stayed bright against the editor theme.Why This Change Was Made
The Playwright context was created without a
colorScheme, so it used Playwright's light default. The broker now takes athemecallback from the extension, setscolorSchemeon new contexts fromvscode.window.activeColorTheme, and exposesretheme()to re-apply the scheme to live pages when the IDE theme changes. High-contrast-light maps to light.User Impact
Pages in the Integrated Browser follow the IDE theme, so
prefers-color-schemematches dark or light. Switching the IDE theme while the browser is open updates the page without reopening.Evidence
bun run typecheck,bun run lint, andbun test tests/unit/browser-broker.test.ts(56 pass).DARKwith a dark theme and switched toLIGHTafterretheme().