Skip to content

Sync desktop native theme with web theme setting#800

Merged
juliusmarminge merged 1 commit intopingdotgg:mainfrom
Noojuno:feature/desktop-theme-sync
Mar 10, 2026
Merged

Sync desktop native theme with web theme setting#800
juliusmarminge merged 1 commit intopingdotgg:mainfrom
Noojuno:feature/desktop-theme-sync

Conversation

@Noojuno
Copy link
Contributor

@Noojuno Noojuno commented Mar 10, 2026

What Changed

Updated the window theme to match the app theme configured in the settings page.

Why

Currently, the window title bar follows the system theme rather than the app theme. This is problematic on Windows as we use the default title bar.

UI Changes

Not sure what the deal is with the bitrate, will have to figure that out at not 12am.

Before:

You can see that the window title bar always follows the system colour, regardless of the theme setting.

explorer_av2gXFabJ6.mp4

After:

We now respect the theme setting.

explorer_NsRBucWdL4.mp4

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Sync Electron's native theme with the web app's theme setting

  • Adds a setTheme method to window.desktopBridge (via preload.ts) that sends the active theme over the desktop:set-theme IPC channel.
  • Registers an IPC handler in main.ts that validates the theme value ('light' | 'dark' | 'system') and sets nativeTheme.themeSource accordingly.
  • Extends useTheme.ts to call the bridge after each applyTheme invocation, with deduplication to avoid redundant IPC calls and retry logic on failure.

Macroscope summarized cab2240.

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5dd2932a-99b3-4b52-8fbc-8e5bf4bded60

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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 and usage tips.

@github-actions github-actions bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Mar 10, 2026
- add `desktop:set-theme` IPC channel and bridge method
- validate theme values in Electron main process
- propagate web theme changes to Electron `nativeTheme` with deduped sync
@Noojuno Noojuno force-pushed the feature/desktop-theme-sync branch from beca909 to cab2240 Compare March 10, 2026 11:07
@juliusmarminge juliusmarminge merged commit 1e9bac7 into pingdotgg:main Mar 10, 2026
6 checks passed
mcking-07 pushed a commit to mcking-07/t3code that referenced this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants