Skip to content

Add desktop window decoration modes#1449

Open
smalitobules wants to merge 15 commits intopingdotgg:mainfrom
smalitobules:feat/window-decoration-fullscreen-topbar
Open

Add desktop window decoration modes#1449
smalitobules wants to merge 15 commits intopingdotgg:mainfrom
smalitobules:feat/window-decoration-fullscreen-topbar

Conversation

@smalitobules
Copy link

@smalitobules smalitobules commented Mar 26, 2026

Summary

  • add a desktop window decoration mode switch between T3 Code and the system decoration
  • add the shared T3 Code top bar, including fullscreen reveal behavior
  • rebuild only the window when switching decoration modes so active chats can keep running
  • route drag regions and headers through the active decoration mode across desktop platforms

Validation

  • bun run fmt
  • bun run lint
  • bun run typecheck

Note

Medium Risk
Medium risk because it changes Electron window creation and introduces window rebuild + new IPC/state syncing paths; failures could impact window lifecycle/state or user settings persistence.

Overview
Adds a new desktop “window decoration” setting (DesktopTitleBarMode: t3code vs system) that is persisted to disk and exposed via IPC, with the Electron main process rebuilding the BrowserWindow when the mode changes (preserving bounds/URL and reverting persistence on failure).

Introduces DesktopWindowState + window actions/zoom handling across the bridge, and updates the web UI to render a custom DesktopWindowTopBar (with fullscreen reveal behavior) and to drive drag-region/header behavior via a new useDesktopWindowState/useWindowDecorationMode hook instead of isElectron checks.

Updates Settings to let desktop users switch decoration modes at runtime, and adjusts desktop menu zoom controls to emit window-state updates.

Written by Cursor Bugbot for commit 257467c. This will update automatically on new commits. Configure here.

Note

Add switchable desktop window decoration modes with a custom frameless title bar

  • Adds a DesktopTitleBarMode setting ('t3code' | 'system') that controls whether the app uses a custom frameless window or the native OS frame; defaults to 't3code'.
  • Implements a custom DesktopWindowTopBar React component with minimize, maximize/restore, and close controls, including fullscreen reveal animation and zoom-aware scaling.
  • Switching modes rebuilds the main BrowserWindow at runtime via rebuildMainWindow, preserving window geometry and the active page URL.
  • Exposes setTitleBarMode, getWindowState, performWindowAction, and onWindowState over the Electron IPC bridge so the renderer can control and observe window state.
  • Adds a Window Decoration selector in Settings, with the selection persisted to disk via an atomic write and restored on next launch.
  • Drag regions in ChatView, Sidebar, DiffPanelShell, and route layouts are now conditioned on the active mode and platform instead of a plain isElectron check.
  • Risk: mode changes trigger a full window rebuild; if the rebuild fails, the previous mode is restored but a transient blank window may be visible.

Macroscope summarized 257467c.

@coderabbitai
Copy link

coderabbitai bot commented Mar 26, 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: c8d15858-d08f-4f64-87eb-7afd860bf626

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.

@github-actions github-actions bot added size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 26, 2026
Copy link
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.

@juliusmarminge
Copy link
Member

images pls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ 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