Skip to content

Add custom title bar for Windows#1800

Open
lintowe wants to merge 6 commits intopingdotgg:mainfrom
lintowe:feat/windows-titlebar-context-cleanup
Open

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

Conversation

@lintowe
Copy link
Copy Markdown

@lintowe lintowe commented Apr 6, 2026

Summary

  • Adds the custom Windows title bar and finalizes it's behavior for desktop

What Changed

  • Added/refined the Windows custom title bar behavior across desktop routes
  • Updated chat title bar behavior for the final Windows header UX
  • Kept configurable title-bar context support for non-chat surfaces

Screenshots

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

Testing

  • bun fmt
  • bun lint
  • bun typecheck

Note

Medium Risk
Changes desktop window chrome on Windows to a frameless window and routes minimize/maximize/close through new IPC APIs, which can impact basic window behavior across platforms if miswired. UI updates are mostly conditional to Windows Electron but touch shared layout/header code paths.

Overview
Adds a custom Windows title bar for the Electron desktop app by making Windows windows frameless (frame: false) and introducing DesktopTitleBar/DesktopWindowControls in the web UI.

Exposes new window-control IPC in the desktop main/preload layers (minimize, toggleMaximize, close, plus get/onWindowState) backed by a new DesktopWindowState contract, and wires Windows-only title bar rendering into chat, diff panel, settings, and index routes while keeping existing drag-region headers for non-Windows Electron. Also tweaks desktop sidebar header padding on Windows to account for the new chrome.

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

Note

Add custom title bar with window controls for Windows desktop

  • Adds a frameless window on Windows (frame: false) with a new DesktopTitleBar and DesktopWindowControls component replacing the native title bar
  • Exposes minimize, toggle-maximize, close, and window-state IPC channels in main.ts and preload.ts via new DesktopWindowState contracts
  • Integrates DesktopTitleBar into ChatView, DiffPanelShell, settings, and index routes on Windows Electron; non-Windows Electron retains existing drag-region headers
  • Adjusts sidebar left padding on Windows desktop to account for the removed native controls
  • Behavioral Change: on Windows, the native window frame is removed entirely; all window control interactions now go through IPC

Macroscope summarized 8865c0e.

@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 introduces a new Windows-specific custom title bar feature with new UI components, IPC handlers, and cross-cutting changes to multiple existing components. While well-scoped to Windows platform, it introduces new user-facing capability and new renderer-main process communication patterns that warrant human review.

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

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 2be07d2. Configure here.

}
const fallback = BrowserWindow.getAllWindows().find((entry) => !entry.isDestroyed());
return fallback ?? null;
}
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.

Close handler fallback may close wrong window

Medium Severity

The resolveEventWindow helper, used by window IPC handlers, includes a fallback to mainWindow or any other active window if the event sender's window cannot be resolved. For the CLOSE_WINDOW_CHANNEL handler, this fallback can cause an unrelated window to close, risking unexpected data loss.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2be07d2. Configure here.

@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: 79fa2dce-a7cb-45c2-ae46-d7f772fcefd4

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.

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.

1 participant