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
Contributor

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
Fixeswavetermdev#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

coderabbitaiBot 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

FileChange Summary
emain/emain.tsChanged `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 nameStatusExplanation
Title check✅ PassedThe title clearly describes the webview color-scheme fix and matches the main change.
Description check✅ PassedThe description directly explains the themeSource change and its effect on embedded web content.
Linked Issues check✅ PassedThe change matches #3318 by switching embedded web content from forced dark to system color scheme.
Out of Scope Changes check✅ PassedNo unrelated changes are introduced; the PR is a single targeted themeSource adjustment.
Docstring Coverage✅ PassedNo 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 freeto 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

@Jason-Shen2