make t3code look cool on windows and linux (custom&overlay title bar)#1929
make t3code look cool on windows and linux (custom&overlay title bar)#1929tarik02 wants to merge 15 commits intopingdotgg:mainfrom
Conversation
|
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 |
ApprovabilityVerdict: Needs human review This PR introduces substantial new functionality (custom title bars for Windows/Linux) with new UI components, IPC channels, and settings. Additionally, there is an unresolved high-severity review comment about window controls being blocked by z-index issues, which would make the feature unusable for many Linux users. 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 9a2bc17. Configure here.
apps/web/src/components/Sidebar.tsx
Outdated
| </div> | ||
| ) : ( | ||
| wordmark | ||
| )} |
There was a problem hiding this comment.
Right-side Linux window controls blocked by z-indexed overlay
High Severity
In the SidebarChromeHeader when usesCustomLinuxWindowControls is active, the LinuxWindowControls are positioned absolute at the default z-index, while the wordmark wrapper sits on top at z-[1] with flex-1 making it span the full header width. This means the wordmark div intercepts all pointer events across its entire width, making any right-side window control buttons (close, minimize, maximize) unclickable — they're rendered beneath the wordmark overlay. Since the default/fallback Linux layout places all controls on the right (left: [], right: ["minimize", "maximize", "close"]), most Linux users in custom title bar mode would be unable to close, minimize, or maximize the window from the sidebar header.
Reviewed by Cursor Bugbot for commit 9a2bc17. Configure here.
…bar-platform-layout # Conflicts: # apps/web/src/routes/__root.tsx
|
Hey I took another approach here (more css driven when possible with tailwind variants etc): #1800 might be good to merge the 2 PRs as i can see some good stuff from both. I don't have a linux machine to test on yet |
|
@juliusmarminge will take a look also made PR to electron to fix WCO order: electron/electron#50978 |


What Changed
This PR adds Linux-only option for native/custom/overlay title bar and contains minor platform detection refactoring:
native,overlay,customhiddenInsettraffic lightsWhy
This change keeps desktop chrome policy in one place, refactors platform detection.
Now t3code looks better on Windows and Linux, feels more integrated just like it is on macOS.
UI Changes
macOS was checked as well, no visual regressions found.
Before (Linux)
After (Linux)
Custom mode:

Overlay mode:

(Electron doesn't support custom window button order currently - this option is better for people using controls on the right)
Settings:

Before (Windows)
After (Windows)
Checklist
Note
Add custom and overlay title bar support for Windows and Linux in the desktop app
getWindowChromeOptionsandgetWindowControlsLayoutin env.ts, covering macOS, Windows (overlay withsymbolColorper theme), and Linux (native/overlay/custom modes).LinuxTitleBarModesetting ('native'|'overlay'|'custom') with persistence, IPC handlers, and a settings UI in SettingsPanels.tsx that prompts restart on change.DesktopChromeOverlaywith clickable minimize/maximize/close buttons for Linux custom mode and applies safe-area CSS variables at the app root viaresolveDesktopChromeRootStyle.getPlatform,getLinuxTitleBarMode,setLinuxTitleBarMode,getWindowControlsLayout,minimizeWindow,toggleMaximizeWindow,closeWindow, andrestartApp.Macroscope summarized 2e59768.
Note
Medium Risk
Medium risk because it changes Electron window creation/chrome options, adds new IPC surface for window control/restart, and persists new desktop settings, which could affect startup/window behavior across platforms (especially Linux).
Overview
Adds a persisted Linux-only
linuxTitleBarModedesktop setting (native|overlay|custom) and applies it during ElectronBrowserWindowcreation via newgetWindowChromeOptionslogic.Introduces centralized desktop
platform/window-controls layout utilities (apps/desktop/src/env.ts) and Linux window button layout detection (KDEkwinrc/ GNOMEgsettings, with fallback).Expands the desktop preload/main IPC bridge with platform/titlebar/layout queries plus window control actions (
minimize,toggleMaximize,close,restart), and updates the web UI headers/sidebar/settings to render overlay-safe draggable chrome and custom Linux window controls when enabled.Reviewed by Cursor Bugbot for commit 9a2bc17. Bugbot is set up for automated code reviews on this repo. Configure here.