Comfy-Org / Comfy-Org/Comfy-Desktop
feat(launcher): hide OS title bar on cloud-login popups (follow-up to #502)
- Dominant language
- TypeScript
- Stars
- 458
- Forks
- 59
- Avg merge
- 22h 18m
- Merged PRs (30d)
- 45
Description
## Background
Follow-up to #502 / #503. After globally stripping Electron's default menu via `installAppMenu()`, the OAuth / cloud-login popups spawned via `comfyContents.setWindowOpenHandler` no longer expose destructive items like *Close All Windows*. However, on Windows the popup still has the standard OS-provided title bar with the app-icon click target, which surfaces the **Windows OS system menu** (Restore / Move / Size / Minimize / Maximize / Close).
These items are harmless (Close routes through the normal `close` event our handlers already manage), but for visual consistency with our host windows — and to match the original issue intent of "no menu at the top-left of the window" — we should drop the OS title bar entirely.
## Proposal
In [`src/main/index.ts`'s `comfyContents.setWindowOpenHandler`](https://github.com/Comfy-Org/ComfyUI-Desktop-2.0-Beta/blob/feat/unified-window-titlebar-panels/src/main/index.ts#L1435), extend the existing `overrideBrowserWindowOptions` to add:
```ts
{
webPreferences: { preload: undefined },
titleBarStyle: 'hidden',
...(process.platform !== 'darwin' ? { titleBarOverlay: comfyTitleBarOverlay(...) } : {}),
}
```
This mirrors what `createHostWindow()` does for our own host windows (see [line 1162-1165](https://github.com/Comfy-Org/ComfyUI-Desktop-2.0-Beta/blob/feat/unified-window-titlebar-panels/src/main/index.ts#L1162-L1165)) — hides the OS title bar so there's no icon to click, but keeps min/max/close as a CSS overlay in the corner.
## Trade-offs / open questions
- **No visible window title:** OAuth pages set `` (e.g. "Sign in - Google Accounts"); users won't see it in OS chrome anymore. Most providers render their own header inside the page so this is usually fine, but worth checking on real Google / GitHub / Firebase flows.
- **Drag region:** with `titleBarStyle: 'hidden'`, the user can no longer drag the window by an OS-provided title bar. We'd either need an in-page draggable region (the OAuth page won't have one) or accept that popups can't be dragged. Acceptable for short-lived auth popups, but worth confirming.
- **macOS:** popups would also lose the title bar; the traffic lights would float in the top-left. Probably fine, but verify.
- **Default title bar overlay color/height:** should match the OAuth page's expected styling — may need a sensible default since we can't ask the third-party page about its theme.
## Acceptance
- Open a Google / Firebase / GitHub OAuth popup on Windows. The top-left corner is unclickable; no system menu appears.
- Window controls (min / max / close) still work.
- macOS popups still close cleanly via traffic lights.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.