Skip to content

fix(webview): respect system color scheme for prefers-color-scheme in web blocks#3413

Open
Jason-Shen2 wants to merge 1 commit into
wavetermdev:mainfrom
Jason-Shen2:fix/webview-prefers-color-scheme
Open

fix(webview): respect system color scheme for prefers-color-scheme in web blocks#3413
Jason-Shen2 wants to merge 1 commit into
wavetermdev:mainfrom
Jason-Shen2:fix/webview-prefers-color-scheme

Conversation

@Jason-Shen2

Copy link
Copy Markdown

Fixes #3318

Changes nativeTheme.themeSource from 'dark' to 'system' so that embedded web content (web blocks) correctly respects the OS color scheme preference. Wave's own UI remains dark-themed via CSS color-scheme: dark and custom scrollbar styling, so this only affects webview/iframe content.

… web blocks

Fixes wavetermdev#3318 by changing nativeTheme.themeSource from dark to system.

Wave's own UI remains dark-themed via CSS color-scheme and custom scrollbar styling.
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9dc4bc75-abcf-4072-893f-2fbafd9a5d24

📥 Commits

Reviewing files that changed from the base of the PR and between c99022c and ab72ccb.

📒 Files selected for processing (1)
  • emain/emain.ts

Walkthrough

This change modifies a single configuration line in the Electron main process file, updating the native theme source setting from a hardcoded "dark" value to "system", causing the application to follow the operating system's theme preference.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Changes

File Change Summary
emain/emain.ts Changed `electron.nativeTheme.themeSource` from `"dark"` to `"system"`

Related issues: None specified.

Related PRs: None specified.

Suggested labels: None

Suggested reviewers: None

Poem
A rabbit hops from dark to light,
No more forced shadows, day or night,
The system now decides the hue,
One line changed, the theme rings true,
Hop, hop, hooray — the OS knows best! 🐇🌗

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the webview color-scheme fix and matches the main change.
Description check ✅ Passed The description directly explains the themeSource change and its effect on embedded web content.
Linked Issues check ✅ Passed The change matches #3318 by switching embedded web content from forced dark to system color scheme.
Out of Scope Changes check ✅ Passed No unrelated changes are introduced; the PR is a single targeted themeSource adjustment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

[Bug]: Web blocks always expose prefers-color-scheme: dark even when macOS is Light

1 participant