Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
005b42f
fix(home): keep a starting build's name and status readable, and drop…
mariana953 Nov 14, 2026
dd40691
Merge main into the Home build tile fix
mariana953 Nov 14, 2026
8424924
Merge remote-tracking branch 'origin/main' into mar/home-build-tile-t…
mariana953 Nov 15, 2026
eb43ac3
feat(home): stack build tiles when narrow, one build menu for Home an…
mariana953 Nov 15, 2026
33baffd
feat(home): icons on every build menu row, no right-click menu on sid…
mariana953 Nov 15, 2026
f732c7b
fix(home): more room between the build name and the ⋯ button
mariana953 Nov 15, 2026
6c02fd8
fix(home): build menu keeps uninstall safe, returns focus, hides new …
mariana953 Nov 15, 2026
b4ad1f6
Merge remote-tracking branch 'origin/main' into mar/home-build-tile-t…
mariana953 Nov 15, 2026
afa1c29
feat(home): set Auto start from the build menu, show it on the card
mariana953 Nov 15, 2026
4011352
test(tooltip): wait for the bubble to close after Escape
mariana953 Nov 15, 2026
1cd61ac
feat(home): call it Auto start in the build menu and on the card
mariana953 Nov 15, 2026
605fe3c
fix(home): build menu Launch starts a crashed build; sidebar menu ret…
mariana953 Nov 15, 2026
cfc5f8d
Merge remote-tracking branch 'origin/main' into mar/auto-start-in-bui…
mariana953 Nov 16, 2026
39eb70a
Merge origin/main into the Home build tile fix
mariana953 Nov 16, 2026
b2ba213
Merge branch 'mar/home-build-tile-text' of https://github.com/mariana…
mariana953 Nov 16, 2026
4622ca3
feat(auto-start): turn it on for a first build, drop the Settings dro…
benceruleanlu Nov 16, 2026
822a491
Merge remote-tracking branch 'origin/main' into mar/auto-start-in-bui…
benceruleanlu Nov 16, 2026
d0de405
fix(home): drop Open in new window from the build menu
benceruleanlu Nov 16, 2026
2031980
feat(auto-start): a new build's first start decides whether Auto star…
benceruleanlu Nov 16, 2026
a9a1081
fix(auto-start): leave the setting alone when the snapshot restore fa…
mariana953 Nov 16, 2026
b087157
fix(auto-start): close the gaps around a first build's Auto start
benceruleanlu Nov 16, 2026
a8cbfe4
Merge remote-tracking branch 'mariana953/mar/auto-start-in-build-menu…
benceruleanlu Nov 16, 2026
56c3565
fix(auto-start): offer Auto start only on installed local builds
benceruleanlu Nov 16, 2026
a885904
Merge remote-tracking branch 'origin/main' into bl/review-pr-2128-41c3e4
benceruleanlu Nov 16, 2026
fd76ff2
fix(auto-start): close the build menu from ⋯, follow the live build, …
benceruleanlu Nov 17, 2026
3bcd1b9
Merge remote-tracking branch 'origin/main' into pr-2128
benceruleanlu Nov 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions e2e/home-auto-start.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import os from 'node:os'
import path from 'node:path'
import { mkdtemp, rm, writeFile } from 'node:fs/promises'
import { test, expect } from '@playwright/test'
import { launchApp, type AppContext } from './launchApp'

const MARKER_FILENAME = '.comfyui-desktop-2'
const BUILD = { id: 'inst-home-auto-start', name: 'Studio GPU' }
const TILE = `[data-testid="home-build"][data-build-id="${BUILD.id}"]`
const TILE_STATUS = `${TILE} [data-testid="home-build-status"]`
const MORE = `${TILE} [data-testid="home-build-more"]`
const AUTO_START_LINE = '[data-testid="build-menu-auto-start"]'

let ctx: AppContext
let installPath = ''

test.beforeAll(async () => {
installPath = await mkdtemp(path.join(os.tmpdir(), 'comfyui-launcher-home-auto-start-e2e-'))
await writeFile(path.join(installPath, MARKER_FILENAME), BUILD.id)
ctx = await launchApp(
{
settings: { firstUseCompleted: true, telemetryEnabled: false },
installations: [{ ...BUILD, installPath, sourceId: 'standalone', status: 'installed' }]
},
{ stayOnHome: true }
)
})

test.afterAll(async () => {
await ctx?.cleanup()
if (installPath) await rm(installPath, { recursive: true, force: true })
})

function savedAutoStart(): Promise<unknown> {
return ctx.panel.evaluate("window.api.getSetting('autoLaunchOnStartup')")
}

async function pickAutoStartLine(expected: string): Promise<void> {
expect(await ctx.panel.click(MORE), 'build menu opened from the tile ⋯').toBe(true)
await ctx.panel.waitForVisible(AUTO_START_LINE)
expect(await ctx.panel.textOf(AUTO_START_LINE)).toBe(expected)
expect(await ctx.panel.click(AUTO_START_LINE), `${expected} picked`).toBe(true)
}

test('Auto start picked in a Home build menu saves that build and shows on its tile, and Turn off sets None @windows @macos @linux', async () => {
await ctx.panel.waitForVisible(TILE)
expect(await ctx.panel.textOf(TILE_STATUS)).toBe('Ready')

await pickAutoStartLine('Auto start')

await expect.poll(savedAutoStart).toBe(BUILD.id)
await expect.poll(() => ctx.panel.textOf(TILE_STATUS)).toBe('Auto start')
await expect
.poll(() => ctx.panel.exists(`${TILE} [data-testid="home-build-starts-with-desktop"]`))
.toBe(true)

await pickAutoStartLine('Turn off Auto start')

await expect.poll(savedAutoStart).toBe('none')
await expect.poll(() => ctx.panel.textOf(TILE_STATUS)).toBe('Ready')
})
20 changes: 0 additions & 20 deletions e2e/home.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,3 @@ test('Home in the sidebar returns to Home @windows @macos @linux', async () => {
await ctx.panel.waitForVisible(HOME_VIEW)
expect(await ctx.panel.isVisible('.chooser-view')).toBe(false)
})

test('Auto start on a Home card saves that build for the next start, and unticking sets None @windows @macos @linux', async () => {
const box = '[data-testid="home-build-auto-start"] [role="checkbox"]'
const saved = () => ctx.panel.evaluate("window.api.getSetting('autoLaunchOnStartup')")
const boxState = () =>
ctx.panel.evaluate(`document.querySelector('${box}')?.getAttribute('aria-checked')`)
await ctx.panel.waitForVisible(box)
const buildId = await ctx.panel.evaluate<string>(
`document.querySelector('[data-testid="home-build-auto-start"]').dataset.buildId`
)

expect(await ctx.panel.click(box)).toBe(true)
await expect.poll(saved).toBe(buildId)
await expect.poll(boxState).toBe('true')
expect(await ctx.panel.isVisible(HOME_VIEW)).toBe(true)

expect(await ctx.panel.click(box)).toBe(true)
await expect.poll(saved).toBe('none')
await expect.poll(boxState).toBe('false')
})
18 changes: 6 additions & 12 deletions e2e/shared-controls-input.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { isPopupVisible } from './support/cdpPages'

test('the WebContents facade drives shared selects and tabs with native input @windows @macos @linux', async () => {
const ctx = await launchApp({
settings: { firstUseCompleted: true, language: 'en', autoLaunchOnStartup: 'none' }
settings: { firstUseCompleted: true, language: 'en' }
})
try {
const popup = await openDesktopSettings(ctx.app, ctx.panel)

const trigger = '[data-field-id="autoLaunchOnStartup"] [role="combobox"]'
const trigger = '[data-field-id="language"] [role="combobox"]'
await popup.waitForVisible(trigger)
await popup.evaluate(`(() => {
window.__inputEvents = []
Expand All @@ -31,12 +31,8 @@ test('the WebContents facade drives shared selects and tabs with native input @w
{ type: 'mouseup', trusted: true },
{ type: 'click', trusted: true }
])
expect(await popup.clickByText('[role="listbox"] [role="option"]', 'Last used build')).toBe(
true
)
await expect
.poll(() => ctx.panel.evaluate("window.api.getSetting('autoLaunchOnStartup')"))
.toBe('last')
expect(await popup.clickByText('[role="listbox"] [role="option"]', '简体中文')).toBe(true)
await expect.poll(() => ctx.panel.evaluate("window.api.getSetting('language')")).toBe('zh')

await expect
.poll(() =>
Expand All @@ -50,10 +46,8 @@ test('the WebContents facade drives shared selects and tabs with native input @w
await popup.pressKey('Escape')
await expect.poll(() => popup.exists('[role="listbox"]')).toBe(false)
expect(await isPopupVisible(ctx.app, 'comfyTitlePopup.html')).toBe(true)
await popup.selectOption(trigger, 'None (show dashboard)')
await expect
.poll(() => ctx.panel.evaluate("window.api.getSetting('autoLaunchOnStartup')"))
.toBe('none')
await popup.selectOption(trigger, 'English')
await expect.poll(() => ctx.panel.evaluate("window.api.getSetting('language')")).toBe('en')

expect(await popup.clickNth('[role="tab"]', 2)).toBe(true)
await expect.poll(() => popup.textOf('[role="tab"][aria-selected="true"]')).toBe('Storage')
Expand Down
9 changes: 3 additions & 6 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@
"openComfyUIIn": "Open ComfyUI in {name}",
"opensIn": "Opens in {name}",
"allBuilds": "All builds",
"autoStart": "Auto start",
"autoStartHint": "Start this build when Comfy Desktop opens",
"turnOnAutoStart": "Auto start",
"turnOffAutoStart": "Turn off Auto start",
"autoStartOn": "Auto start",
"buildRunning": "Running",
"buildStarting": "Starting",
"buildReady": "Ready",
Expand Down Expand Up @@ -754,10 +755,6 @@
"autoUpdate": "Check for updates on startup",
"autoInstallUpdates": "Automatically install Desktop updates",
"appBehavior": "App Behavior",
"autoLaunchOnStartup": "Auto-launch on startup",
"autoLaunchOnStartupDescription": "Pick a build to launch automatically when Comfy Desktop opens. Defaults to None.",
"autoLaunchOnStartupNone": "None (show dashboard)",
"autoLaunchOnStartupLast": "Last used build",
"confirmBeforeClosingWindow": "Confirm before closing a window",
"confirmBeforeClosingWindowDescription": "Ask for confirmation before closing a window that's running a local install.",
"warnBeforeRunningMultipleInstances": "Warn before running multiple builds",
Expand Down
9 changes: 3 additions & 6 deletions locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@
"openComfyUIIn": "在 {name} 中打开 ComfyUI",
"opensIn": "在 {name} 中打开",
"allBuilds": "全部构建",
"autoStart": "自动启动",
"autoStartHint": "Comfy Desktop 打开时启动此构建",
"turnOnAutoStart": "自动启动",
"turnOffAutoStart": "关闭自动启动",
"autoStartOn": "自动启动",
"buildRunning": "运行中",
"buildStarting": "启动中",
"buildReady": "就绪",
Expand Down Expand Up @@ -754,10 +755,6 @@
"autoUpdate": "启动时检查更新",
"autoInstallUpdates": "自动安装桌面端更新",
"appBehavior": "应用行为",
"autoLaunchOnStartup": "启动时自动打开",
"autoLaunchOnStartupDescription": "选择 Comfy Desktop 打开时自动启动的构建。默认为“无”。",
"autoLaunchOnStartupNone": "无(显示主面板)",
"autoLaunchOnStartupLast": "上次使用的构建",
"confirmBeforeClosingWindow": "关闭窗口前确认",
"confirmBeforeClosingWindowDescription": "关闭正在运行本地安装的窗口前请求确认。",
"warnBeforeRunningMultipleInstances": "运行多个构建前发出警告",
Expand Down
17 changes: 7 additions & 10 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ import {
} from './lib/ipc/shared'
import { enrichInstallationsForRenderer } from './lib/ipc/registerInstallationHandlers'
import { getSnapshotListData } from './lib/snapshots'
import { update as updateInstallation, resolveAutoLaunchInstall } from './installations'
import { AUTO_LAUNCH_NONE } from './settings'
import { update as updateInstallation } from './installations'
import { pinAutoStartToALocalBuild } from './lib/firstBuildAutoStart'
import { lookupInstallUpdateOverride, recordIpcInvocation } from './lib/e2eOverrides'
import * as mainTelemetry from './lib/telemetry'
import {
Expand Down Expand Up @@ -271,14 +271,11 @@ function revealStartupRestoreDashboard(windowKey: number): void {
}

async function openStartupSurface(): Promise<void> {
const firstUseDone = settings.get('firstUseCompleted') === true
const autoLaunchValue = firstUseDone
? (settings.get('autoLaunchOnStartup') as string | undefined)
: undefined
const explicitInst =
autoLaunchValue && autoLaunchValue !== AUTO_LAUNCH_NONE
? await resolveAutoLaunchInstall(autoLaunchValue)
: null
const autoStartBuild = await pinAutoStartToALocalBuild().catch((err: unknown) => {
console.warn('[auto-start] could not read the Auto start build:', err)
return null
})
const explicitInst = settings.get('firstUseCompleted') === true ? autoStartBuild : null

const chooserWindow = explicitInst
? openChooserHostWindow('comfy', { deferColdStartReveal: true })
Expand Down
45 changes: 0 additions & 45 deletions src/main/installations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,51 +312,6 @@ describe('installations.getRecent', () => {
})
})

describe('installations.resolveAutoLaunchInstall', () => {
it('returns null for null / undefined / empty / "none"', async () => {
const installations = await loadInstallations()
expect(await installations.resolveAutoLaunchInstall(null)).toBeNull()
expect(await installations.resolveAutoLaunchInstall(undefined)).toBeNull()
expect(await installations.resolveAutoLaunchInstall('')).toBeNull()
expect(await installations.resolveAutoLaunchInstall('none')).toBeNull()
})

it('"last" resolves via getRecent and returns null when nothing has launched', async () => {
const installations = await loadInstallations()
expect(await installations.resolveAutoLaunchInstall('last')).toBeNull()

await installations.add({
name: 'older',
installPath: path.join(tmpRoot, 'older'),
sourceId: 'standalone',
status: 'installed',
lastLaunchedAt: 100
})
const newer = await installations.add({
name: 'newer',
installPath: path.join(tmpRoot, 'newer'),
sourceId: 'standalone',
status: 'installed',
lastLaunchedAt: 500
})
const recent = await installations.resolveAutoLaunchInstall('last')
expect(recent!.id).toBe(newer.id)
})

it('an installation id resolves the matching install, or null when stale', async () => {
const installations = await loadInstallations()
const a = await installations.add({
name: 'a',
installPath: path.join(tmpRoot, 'a'),
sourceId: 'standalone',
status: 'installed'
})
const found = await installations.resolveAutoLaunchInstall(a.id)
expect(found!.id).toBe(a.id)
expect(await installations.resolveAutoLaunchInstall('inst-does-not-exist')).toBeNull()
})
})

describe('installations.load (legacy shared-storage flag migrations)', () => {
function writeRawInstallations(records: Record<string, unknown>[]): string {
fs.mkdirSync(userDataPath, { recursive: true })
Expand Down
12 changes: 0 additions & 12 deletions src/main/installations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,18 +397,6 @@ export async function getRecentByCategory(
return best && bestTs > -Infinity ? best : null
}

export async function resolveAutoLaunchInstall(
autoLaunchValue: string | undefined | null
): Promise<InstallationRecord | null> {
if (autoLaunchValue == null || autoLaunchValue === '' || autoLaunchValue === 'none') {
return null
}
if (autoLaunchValue === 'last') {
return getRecent()
}
return get(autoLaunchValue)
}

export async function seedDefaults(defaults: Record<string, unknown>[]): Promise<void> {
const seeded = await enqueue(async () => {
const installations = await loadForWrite()
Expand Down
Loading
Loading