Add desktop title bar mode settings#2159
Conversation
- Persist native/custom title bar preference - Expose IPC bridge and settings UI control - Cover the new preference in tests
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
Adds a persisted desktop preference for choosing between the app’s custom title bar and the OS-native window chrome, wiring it through the Electron IPC bridge into the web settings UI with accompanying tests.
Changes:
- Extend the
DesktopBridgeIPC contract withgetTitleBarMode/setTitleBarMode. - Persist
titleBarModein desktop settings and apply it to Electron window creation (with relaunch on change). - Add a Settings UI control for “Window titlebar” and cover it with tests/stubs.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/contracts/src/ipc.ts | Adds DesktopTitleBarMode and new DesktopBridge IPC methods. |
| apps/web/src/localApi.test.ts | Updates desktop bridge test stub to satisfy the expanded DesktopBridge contract. |
| apps/web/src/components/settings/SettingsPanels.tsx | Adds UI + client logic to read/update title bar mode via window.desktopBridge. |
| apps/web/src/components/settings/SettingsPanels.browser.tsx | Extends bridge stub + adds an interaction test for changing title bar mode after confirmation. |
| apps/desktop/src/preload.ts | Exposes new IPC channels/methods on desktopBridge in the renderer. |
| apps/desktop/src/main.ts | Registers IPC handlers for title bar mode, persists changes, triggers app relaunch, and applies mode in window options. |
| apps/desktop/src/desktopSettings.ts | Adds titleBarMode to persisted settings with default + migration parsing. |
| apps/desktop/src/desktopSettings.test.ts | Adds coverage for defaulting and persisting titleBarMode. |
| .codex | Empty file included in the PR. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ApprovabilityVerdict: Needs human review This PR adds a new user-facing feature (title bar mode preference) with runtime behavior changes including app relaunch. While the implementation follows existing patterns and is well-tested, new features introducing new capabilities warrant human review. You can customize Macroscope's approvability policy. Learn more. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit db1a78e. Configure here.
Return a runtime getter for isElectron so tests can control whether the simple AboutVersionTitle or the full AboutVersionSection (which calls useQueryClient) is rendered by toggling window.desktopBridge or window.nativeApi
|
Please! It's not only ugly but I can't use the scrollbar since the custom decorations were introduced. Using custom windows decoration is horrible UX anyway |

What Changed
Why
Some users don't like apps overriding system theming (cough cough Linux users) (me)
UI Changes
Checklist
Note
Medium Risk
Moderate risk because it introduces a new persisted desktop setting and new IPC handlers that trigger app relaunch and change
BrowserWindowtitlebar configuration, which can affect window behavior across platforms.Overview
Adds a new persisted desktop preference
titleBarMode(custom/native) with defaultcustom, including safe parsing/fallback when readingdesktop-settings.json.Exposes the preference over the desktop IPC bridge via
getTitleBarMode/setTitleBarMode; setting a new value persists it and relaunches the app, andmain.tsnow skips customtitleBarOverlayoptions whentitleBarModeisnative.Updates the web-based General settings panel (Electron-only) to load the current mode from the bridge, show a select control with confirmation + restart messaging, and adds/updates tests and stubs to cover the new setting end-to-end.
Reviewed by Cursor Bugbot for commit e133fd2. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add title bar mode settings to the desktop app's General Settings panel
titleBarModefield ('custom'|'native') toDesktopSettings, defaulting to'custom', with read/write support viareadDesktopSettingsandsetDesktopTitleBarModePreference.getTitleBarModeandsetTitleBarModeIPC endpoints in main.ts and preload.ts so the renderer can query and update the mode.GeneralSettingsPanel; changing the mode prompts the user to confirm a restart, then calls the desktop bridge and relaunches the app.titleBarModeis'native',getWindowTitleBarOptionsreturns an empty object, causing Electron windows to use the OS native titlebar instead of the custom one.Macroscope summarized e133fd2.