Skip to content

Add custom title bar for Windows#1800

Closed
lintowe wants to merge 11 commits into
pingdotgg:mainfrom
lintowe:feat/windows-titlebar-context-cleanup
Closed

Add custom title bar for Windows#1800
lintowe wants to merge 11 commits into
pingdotgg:mainfrom
lintowe:feat/windows-titlebar-context-cleanup

Conversation

@lintowe
Copy link
Copy Markdown

@lintowe lintowe commented Apr 6, 2026

Screenshots

  • Before (without custom title bar)
image
  • After (with custom Windows title bar)
image

Testing

  • bun fmt
  • bun lint
  • bun typecheck

Note

Medium Risk
Switches Windows Electron windows to a frameless configuration with a native title bar overlay and adds platform-specific header/layout logic; regressions could affect window controls, drag regions, and header spacing on Windows.

Overview
Adds a Windows-specific custom title bar for the Electron desktop app by making Windows windows frameless and configuring titleBarOverlay (theme-aware colors/height), keeping macOS/Linux on the existing inset title bar.

Introduces a reusable DesktopTitleBar component and updates chat, settings, sidebar, and diff panel headers to use Windows-aware layouts (including reserving space for native window controls overlay and avoiding drag regions where appropriate). Also adds OS/electron CSS variants and boot-time platform classes plus windowControlsOverlay-driven --desktop-titlebar-height syncing, and throttles desktop theme syncing via requestAnimationFrame.

Reviewed by Cursor Bugbot for commit 8c340d0. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add custom title bar for Windows in the desktop app

  • Adds a frameless window with a native title bar overlay on Windows, styled to match the app theme, while retaining the existing hiddenInset style on macOS/Linux.
  • Introduces a new DesktopTitleBar component used across chat, settings, and empty-state views on Windows, replacing the previous draggable header bars.
  • Adds isWindowsElectron env flag and CSS custom variants (electron, desktop-windows, etc.) so styles and components can branch per platform.
  • Syncs overlay color with the active theme via syncAllWindowsTitleBarOverlays(), called on theme change and OS theme updates.
  • Extracts ChatHeaderActions from ChatHeader so action controls can be embedded in the new title bar on Windows.
  • Behavioral Change: On Windows, windows are now frameless with a native overlay; the sidebar, diff panel, and chat headers reserve space for the 138px native window controls area.

Macroscope summarized 8c340d0.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Apr 6, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 7, 2026

Approvability

Verdict: Needs human review

This PR adds a new Windows-specific custom title bar feature, introducing a new DesktopTitleBar component and platform-specific styling across multiple views. As a new user-facing feature with new UI components, it warrants human review despite being well-scoped to Windows platform support.

You can customize Macroscope's approvability policy. Learn more.

Comment thread apps/desktop/src/main.ts Outdated
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 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: c5106ffe-7ae6-4662-ad66-f5174c78ba71

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

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.

lintowe and others added 2 commits April 8, 2026 03:23
- Add native Windows title bar overlay sync
- Rework desktop headers, diff panel, and window controls
- Split chat header actions into a reusable component
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Apr 12, 2026
Comment thread apps/desktop/src/main.ts Outdated
- Drop desktop IPC and bridge APIs for minimize/maximize/close state
- Simplify the Windows title bar to reserve native control space only
- Remove obsolete window controls component and tests
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). labels Apr 12, 2026
- Reuse `DesktopTitleBar` for Electron chat and settings screens
- Add subtle tone styling for non-Windows title bars
- Extract settings restore button for shared use
- Remove workspace/context chips from Electron title bars
- Make the shared title bar layout uniform across chat and settings
Comment thread apps/web/src/index.css Outdated
- Derive the desktop title bar surface from the app background
- Sync Windows overlays for all windows on theme changes
- Defer theme sync to the next animation frame
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8c340d0. Configure here.

className={cn(
"@container/header-actions flex shrink-0 items-center justify-end gap-2 @3xl/header-actions:gap-3",
className,
)}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Container query self-reference prevents responsive gap

Low Severity

The @container/header-actions declaration and the @3xl/header-actions:gap-3 query are now on the same element in ChatHeaderActions. Per the CSS Container Queries spec, an element cannot query its own container context — only ancestor containers are eligible. Previously, @container/header-actions was on the outer ChatHeader wrapper div, and the @3xl/header-actions:gap-3 was on the inner actions div (a child). After the refactor, both live on the same div, so the gap-3 at the @3xl breakpoint will never activate. Child component queries (e.g. in GitActionsControl and ProjectScriptsControl) still work correctly since they remain descendants of the container.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8c340d0. Configure here.

@lintowe lintowe deleted the feat/windows-titlebar-context-cleanup branch April 13, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants