Skip to content

feat(titlebar): Home button in build windows, and the ☰ menu on the right (DESK-293) - #2146

Merged
benceruleanlu merged 1 commit into
mainfrom
bl/hamburger-menu-home-button-50e85e
Nov 16, 2026
Merged

benceruleanlu merged 1 commit into
mainfrom
bl/hamburger-menu-home-button-50e85e

Conversation

@benceruleanlu

Copy link
Copy Markdown
Member

What changes

DESK-293, from the M1+ test feedback (P1, not blocking 1.1.11).

  • Home in build windows. A window that shows a build (local, Cloud or remote) has a Home button at the left of its title bar. Clicking it brings the Desktop window to the front. If no Desktop window is open, it opens one. It never opens a second one.
  • No Home in the Desktop window. The Desktop window keeps an empty left side.
  • ☰ on the right. In every window, the ☰ menu moves to the right end of the title bar, after Downloads. On Windows that puts it just before the window controls. Refresh moves to the right as well, ahead of What's new, so the left of a build window holds only Home.

The problem behind it: once ComfyUI opened in the Desktop window, there was no way back to Desktop (Alexis, 1.1.11 QA thread, Nov 12). Pablo and Alexis agreed on Home in build windows only, with the ☰ on the right "until we remove it completely".

Design

This follows Mar's title bar in the New-Home Figma: Components › Organisms/Title bar and its Title bar · States (node 9:8101), and the M2 · Apps title bars, which put Home on the left and ☰ last on the right.

  • Home matches the frame: house icon at 15px, 8px gap, "Home" at 13px/20px, 28px tall, 8px/10px padding. It has no fill at rest and a grey pill on hover.
  • The ☰ icon goes from 18px to 16px so it matches the icons next to it, as in the frame.
  • The frame has no Refresh. I kept it and placed it with the other build controls on the right.
  • I left out the "Open a build" breadcrumb, the in-bar tabs and the sliders icon. They belong to the tabbed design and are not part of this ticket.

How

  • TitleBarApp.vue renders Home when the window is bound to a build and first-use lockdown is off. Clicking it calls the new bridge method clickHome.
  • comfyTitleBarPreload.ts sends comfy-window:show-home.
  • index.ts accepts that message only from a build window's title bar, and then calls openOrFocusHomeHostWindow().
  • registry.ts adds openOrFocusHomeHostWindow(). It focuses or restores a Desktop window that is not handing off to a build, or else opens a new Desktop window. A Desktop window that has claimed a launch, or is previewing one, is about to become a build window, so Home skips it.

Relation to #2027

Pablo's #2027 shows the intent. It sits on nine unmerged PRs and is 171 commits ahead of main. This redoes only the title bar part on main. #2027 also makes every build open in its own window, which is a wider navigation change. That is not part of this PR.

Tests

  • TitleBarApp.test.ts, a new suite "Home button and the ☰ on the right":
    • Home sits alone on the left of a build window, and a click reaches the bridge.
    • The right side reads refresh, What's new, Feedback, Downloads, ☰, in that order.
    • The Desktop window has no Home button and keeps ☰ last on the right.
    • Home appears when the Desktop window starts a build in place.
    • Home is hidden through the first-use takeover and comes back for loading.
  • registry.test.ts, a new suite "openOrFocusHomeHostWindow":
    • It focuses the open Desktop window.
    • It restores a minimised one.
    • It opens a Desktop window when only build windows are open.
    • It skips a Desktop window that has claimed a launch or is previewing one.
    • It skips a closed window.
  • I ran these two files locally (151 tests pass). CI runs the rest. E2E specs find the ☰ by aria-haspopup="menu", which does not depend on where the button sits.

Screenshots

These come from the real TitleBarApp in headless Chromium, with a stub bridge, at 2×. The macOS traffic lights and the Windows controls are drawn stand-ins for the native ones. "Before" is main at c994b9c.

Title bar before and after: build window and Desktop window on macOS, build window on Windows, an 820px-wide window, and Home on hover

Not tested

  • Clicking Home in the running Electron app. The focus and open logic is covered by the registry tests.
  • Linux, where window controls come from titlebar-area. The ☰ moves into the same right-side cluster that already handles them.

…ight (DESK-293)

A build window's title bar now starts with a Home button. It brings the
Desktop window to the front, or opens one when none is open. The Desktop
window itself has no Home button. The ☰ menu moves to the right end of
the title bar in every window, after Downloads, and refresh moves to the
right with the other build controls.

Why: once a build opened in the Desktop window there was no way back to
Desktop (Alexis, 1.1.11 QA, Nov 12). Pablo and Alexis settled on Home in
build windows only and the ☰ on the right. The layout follows Mar's
title bar in the New-Home Figma (Components > Organisms/Title bar, and
the M2 Apps title bars): house icon and "Home" at 13px, no fill at rest,
a grey pill on hover, ☰ last on the right.

Home skips a Desktop window that is turning into a build window (it has
claimed a launch or is previewing one), so it never brings forward a
window that is about to show ComfyUI.

This redoes the title bar part of #2027 on main.
That PR also opens every build in its own window; that is left for a
separate change.
@benceruleanlu
benceruleanlu requested review from a team as code owners November 16, 2026 18:17
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The title bar adds a Home control and routes clicks through the preload bridge and main-process IPC. The host registry focuses an eligible Desktop window or creates a chooser host. The click now has a route home.

Changes: Home navigation

Layer / File(s) Summary
Select or create a home host
src/main/host/registry.ts, src/main/host/registry.test.ts
The registry selects a chooser host that is not handing off to a build, or creates one if none qualifies. Tests cover focusing and restoring existing hosts, and creating a host when existing windows are ineligible.
Route Home requests
src/preload/comfyTitleBarPreload.ts, src/main/index.ts
The preload bridge sends the Home IPC request. The main process accepts it from install-host title bars and invokes the host registry.
Add and place the Home control
src/renderer/src/comfyTitleBar/TitleBarApp.vue, src/renderer/src/comfyTitleBar/TitleBarApp.test.ts, locales/en.json, locales/zh.json
The title bar displays Home outside install-less and first-use lockdown modes. Refresh and File move to the trailing controls. Tests cover control placement, click routing, and visibility modes; both locales add the Home label.

Sequence Diagram(s)

sequenceDiagram
  participant TitleBarApp
  participant ComfyTitleBarBridge
  participant ShowHomeIPC as comfy-window:show-home
  participant MainProcess
  participant HostRegistry as openOrFocusHomeHostWindow
  TitleBarApp->>ComfyTitleBarBridge: clickHome()
  ComfyTitleBarBridge->>ShowHomeIPC: Send Home request
  ShowHomeIPC->>MainProcess: Deliver IPC request
  MainProcess->>HostRegistry: Open or focus home host
Loading

Possibly related PRs

Suggested reviewers: deepme987, kosinkadink, alexisrolland

Merge Risk: Minimal · up to 71695

This change adds a Home button to build-window title bars and moves the menu and Refresh controls. Nothing concrete blocks merging. Focus behavior in the running app and Linux layout were not manually tested.

Pre-merge checks: Passed 2

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 97f0c284-665d-45d1-9b57-3d7e728ba83a
Commits

Reviewing files that changed from the base of the PR and between c994b9c and 716959e.

Files selected for processing: 8

  • locales/en.json
  • locales/zh.json
  • src/main/host/registry.test.ts
  • src/main/host/registry.ts
  • src/main/index.ts
  • src/preload/comfyTitleBarPreload.ts
  • src/renderer/src/comfyTitleBar/TitleBarApp.test.ts
  • src/renderer/src/comfyTitleBar/TitleBarApp.vue

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@benceruleanlu
benceruleanlu merged commit cb67002 into main Nov 16, 2026
21 checks passed
@benceruleanlu
benceruleanlu deleted the bl/hamburger-menu-home-button-50e85e branch November 16, 2026 19:13
benceruleanlu added a commit that referenced this pull request Nov 16, 2026
…idge-types

One conflict, in src/renderer/src/comfyTitleBar/TitleBarApp.vue. Main
(#2146) added clickHome to the screen's hand-written copy of the title
bar bridge. This branch had deleted that copy: the screen reads the
typed window.__comfyTitleBar. The typed global is kept, and clickHome
reaches the screen through ComfyTitleBarBridge, which main extended in
the preload in the same commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant