Repository navigation
feat(ui): show the Home tab in the title bar when no build is running - #2048
PabloWiedemann wants to merge 5 commits into
Conversation
The dashboard window used a different component in the title bar: a "Comfy Desktop" pill. It now uses the same tabs as a build window. Home is selected, and a "Choose a build" tab opens the same full picker that the pill opened. First-use lockdown keeps its pill. Follows #2027.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
With no build, the title bar no longer shows a "Choose a build" tab. The dashboard window keeps the Home tab alone. The dashboard still opens the picker on its own. The title bar now measures its left cluster to decide when to collapse buttons, so it no longer needs the build tab to be there.
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @PabloWiedemann.
Found 10 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 5 |
| 🟢 Low | 4 |
Panel: 8/8 reviewers contributed findings.
src/renderer/src/comfyTitleBar/TitleBarApp.vue:412 — 🟠 High — On an install-less host every dashboard sub-page (Builds, Apps, Assets, Home) maps to the same host panel comfy, so activePanel.value !== 'comfy' is false whenever the dashboard is on a non-Home sub-page and clicking the Home tab does nothing despite the tab rendering as an enabled button. Returning home needs something that resets the dashboard sub-page (e.g. navigatePanel('home')), since setPanel('comfy') cannot and main early-returns on an unchanged panel. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case).
src/renderer/src/comfyTitleBar/TitleBarApp.test.ts:409 — 🟡 Medium — This assertion pins the Home-tab no-op as expected behavior while only covering activePanel === 'comfy', which is exactly the state the dashboard sits in for its Builds/Apps/Assets sub-pages, so it masks the dead-button case instead of catching it. Add a case where the dashboard is on a non-Home sub-page while the host panel is still comfy. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
src/renderer/src/comfyTitleBar/TitleBarApp.vue:603 — 🟡 Medium — isInstallLess now inserts/removes the build tab inside the measured .title-cluster, but fit recalculation only observes the fixed-size header and the title label, never isInstallLess or the cluster itself. If the label doesn't change across the transition (e.g. a build literally named Comfy Desktop), collapseMode stays stale and trailing controls can overlap or stay collapsed until the window is resized; add a ResizeObserver on the cluster or a watcher on isInstallLess that triggers the fit pass. Raised by 2 of 8 reviewers (gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case).
src/renderer/src/comfyTitleBar/TitleBarApp.vue:623 — 🟡 Medium — Detaching an installation while the pill coachmark is up removes the installPill element but nothing tears down the popup: the [isInstallLess, isFirstUseLockdown, isLoadingLockdown] watcher calls bridge?.hideCoachmark() only when betaNotice.isShowing is true. The coachmark stays anchored to a removed element and coachmark.isShowing remains true, which keeps suppressing the beta-activation notice via isSuppressed. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max edge-case).
e2e/support/chooserHelpers.ts:115 — 🟡 Medium — The readiness gate weakened: title-home-tab renders as soon as the title bar mounts with isFirstUseLockdown false, independent of whether main has pushed the installation id, whereas the old BUILD_TAB || INSTALL_PILL poll implied installation state had arrived — so window.api.openInstancePicker() can now fire before the host window settles. The helper also no longer clicks any title-bar element, so despite its name it gives zero coverage of the user-reachable picker entry point. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, claude-opus-5-thinking-max adversarial).
src/renderer/src/comfyTitleBar/TitleBarApp.vue:419 — 🟡 Medium — The build-tab click path keys off homeTabActive, which is now false for every non-home panel (new-install, track, load-snapshot, quick-install), not just when the build panel is already showing — so clicking the build tab from those takeover panels opens the instance picker instead of returning to comfy. Guard on activePanel.value !== 'comfy' instead. Raised by 1 of 8 reviewers (kimi-k2.7-code edge-case).
src/renderer/src/comfyTitleBar/TitleBarApp.vue:262 — 🟢 Low — Math.max(...Array.from(cluster.children).map(...)) returns -Infinity for an empty child list, making gap Infinity, which evaluateFit discards and silently freezes collapseMode. The old code seeded Math.max with pill.getBoundingClientRect().right so it could never degenerate; add an explicit length guard that returns the { gap: Infinity, trailingWidth: NaN } bail-out. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
src/renderer/src/comfyTitleBar/TitleBarApp.vue:388 — 🟢 Low — isInstallLess.value || short-circuits the panel check, so on an install-less host the Home tab always renders aria-current="page" and the selected bg-accent style even while a takeover panel outside HOME_PANELS is displayed (new-install, track, load-snapshot, quick-install, announcement, feedback). The tab claims to be the current page in states where clicking it navigates elsewhere. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
e2e/beta-activation-notice-lockdown.test.ts:59 — 🟢 Low — lockdownEngaged now probes two elements gated by the identical !isFirstUseLockdown condition (the bell and the Home tab), so the second check is redundant and the helper effectively only asserts "the bell is hidden". The previous build-tab/interactive-pill selector was an independent signal that the build and picker affordances were suppressed during lockdown. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
src/renderer/src/comfyTitleBar/TitleBarApp.vue:608 — 🟢 Low — The tab nav is now gated only on !isFirstUseLockdown, which excludes loading-lockdown, so first-run install-less windows render a clickable Home tab during loading lockdown where no panel-switching control existed before. Main's comfy-window:set-panel handler only validates the key against VALID_PANELS and performs no lockdown check, so the renderer is the sole gate. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
(Inline comments could not be anchored to the diff; listed above instead.)
TL;DR: With no build running, the title bar shows the Home tab, selected, in the same tab style as a build window. It no longer shows the "Comfy Desktop" pill.
Why: The two window states showed two different components in the same place. The title bar should look the same with or without a build.
Can affect: only the left side of the title bar (tabs and the collapse measurement) in
TitleBarApp.vue. It does not touch the main process, the picker popup, locales or the right-side buttons.Part of the title bar build tabs work in #2027. Stacked on #2045.
Changes
window.api.openInstancePicker.measureFitnow measures the left cluster, because the build tab may not exist.openPickerViaTitlePillhas 23 callers, and its name no longer fits.titlePopup.ts, the'full'layout branch forclick-install-pillcan no longer be reached from the title bar.Screens
No-build state: before, a "Comfy Desktop" pill with a logo and a chevron. After, only the Home tab, selected. The build state is unchanged. Screenshots were taken in a dev app and shared with Pablo.
Testing
pnpm test: 345 files, 7,955 passed, 12 skipped.pnpm run typecheck,pnpm run lintandpnpm run format:checkpass.e2e/chooser.test.ts,lifecycle-cloud.test.tsandbeta-activation-notice-lockdown.test.ts, andsupport/chooserHelpers.ts, were updated but not run. Also not tested: the light theme, and Windows or Linux.