Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(settings): der ComfyUI-Abschnitt bleibt offen, solange ein Lauf laeuft

purple0ce7eabb3b65
diff --git a/src/components/models/__tests__/settings-deeplink-comfyui.test.ts b/src/components/models/__tests__/settings-deeplink-comfyui.test.ts
index b0e4cdb7..fe0245c7 100644
--- a/src/components/models/__tests__/settings-deeplink-comfyui.test.ts
+++ b/src/components/models/__tests__/settings-deeplink-comfyui.test.ts
@@ -80,8 +80,10 @@ describe('the hint button walks the whole route', () => {
})
it('and unfolds the ComfyUI section for it', () => {
+ // A15 added a second reason to arrive open (a run in flight), so the focus
+ // is one arm of the condition now rather than the whole of it.
expect(settingsPage).toMatch(
- /<Section title="ComfyUI \(Image & Video\)" defaultOpen=\{entryFocus\?\.section === 'comfyui'\}>/,
+ /<Section title="ComfyUI \(Image & Video\)" defaultOpen=\{entryFocus\?\.section === 'comfyui' \|\|/,
)
})
diff --git a/src/components/settings/SettingsPage.tsx b/src/components/settings/SettingsPage.tsx
index 9616a9eb..2854e110 100644
--- a/src/components/settings/SettingsPage.tsx
+++ b/src/components/settings/SettingsPage.tsx
@@ -53,7 +53,7 @@ import { ProviderSettings } from './ProviderConfig'
import { BuiltinEngineSettings } from './BuiltinEngineSettings'
import { MlxMediaSettings } from './MlxMediaSettings'
import { useProviderStore } from '../../stores/providerStore'
-import { useComfyInstallStore } from '../../stores/comfyInstallStore'
+import { useComfyInstallStore, comfySectionShouldOpen } from '../../stores/comfyInstallStore'
import { PermissionSettings } from './PermissionSettings'
import { MCPServerSettings } from './MCPServerSettings'
import { WorkflowList } from '../agents/WorkflowList'
@@ -1574,7 +1574,12 @@ export function SettingsPage() {
// models" hint: the Start button it names lives in here, so the
// section arrives open instead of costing one more click the hint
// never mentioned.
- <Section title="ComfyUI (Image & Video)" defaultOpen={entryFocus?.section === 'comfyui'}>
+ // A15: and open as well while an install, an update or a repair is
+ // in flight, or while a failure is still on screen. Read without
+ // subscribing, because the value is only ever wanted at the moment
+ // this Section mounts, which is the moment a section switch brings
+ // it back.
+ <Section title="ComfyUI (Image & Video)" defaultOpen={entryFocus?.section === 'comfyui' || comfySectionShouldOpen(useComfyInstallStore.getState().phase)}>
{settings.appMode === 'cloud' && (
<p className="text-[0.55rem] text-gray-500 leading-snug pb-1">
Local mode only. Cloud renders run on lu-labs.ai and never use ComfyUI.
diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.ts
index 1381c992..80adb047 100644
--- a/src/lib/release-notes.ts
+++ b/src/lib/release-notes.ts
@@ -61,6 +61,7 @@ export const RELEASE_NOTES: ReleaseNote[] = [
'The prompt history in Create can be cleared. Every entry has its own remove button, and Clear all at the top of the list wipes the lot after a second click.',
'Settings shows the port the built-in engine really runs on, the Model Storage folder says when it could not be read or was too big to scan, and a ComfyUI install or repair can be cancelled from Settings and keeps showing its progress while you look at other settings.',
'On the Mac, LU stopped searching your whole home folder for a ComfyUI it never runs there. That search touched the Desktop and Music folders, so macOS asked for access to Apple Music and to the Desktop at first launch, and the window sat on LOADING while the search ran. On Windows and Linux the same search moved off the main thread, so a slow disk no longer freezes the window.',
+ 'Error messages from Windows arrive in English, a ComfyUI requirements.txt that cannot be used is named instead of silently skipped, and the LU Engine returns to its default port on every restart.',
],
},
{
diff --git a/src/stores/__tests__/comfy-install-notice.test.ts b/src/stores/__tests__/comfy-install-notice.test.ts
index cdc35bcc..add95b70 100644
--- a/src/stores/__tests__/comfy-install-notice.test.ts
+++ b/src/stores/__tests__/comfy-install-notice.test.ts
@@ -89,3 +89,15 @@ describe('a repair that had to skip the requirements.txt says so at the end', ()
expect(store().notice).toBe('')
})
})
+
+describe('the ComfyUI section opens itself while a run is on screen', () => {
+ it('opens for every phase that is not idle, and stays shut for idle', async () => {
+ const { comfySectionShouldOpen } = await import('../comfyInstallStore')
+ for (const phase of ['checking', 'python', 'comfyui', 'repair', 'error'] as const) {
+ expect(comfySectionShouldOpen(phase)).toBe(true)
+ }
+ // Negative control: a settings page with nothing running must not force the
+ // section open, or the accordion would be no accordion at all.
+ expect(comfySectionShouldOpen('idle')).toBe(false)
+ })
+})
diff --git a/src/stores/__tests__/releaseNotesStore.test.ts b/src/stores/__tests__/releaseNotesStore.test.ts
index 48cb41bf..8e2a0dd3 100644
--- a/src/stores/__tests__/releaseNotesStore.test.ts
+++ b/src/stores/__tests__/releaseNotesStore.test.ts
@@ -67,7 +67,8 @@ describe('the notes table', () => {
// that is finally read, the CivitAI key field, the HIP SDK on Windows with
// its vram_total mix-up, the Linux packages that name libvulkan1, the
// Coding Agent working directory, Document Chat in Cloud mode, the prompt
- // history that clears, and the side panel that folds away. Each anchor
+ // history that clears, the side panel that folds away, and the ComfyUI
+ // requirements.txt that is named when it cannot be used. Each anchor
// below names one of them, so a note that forgets one fails here.
// The house formula for hardware nobody here owns is pinned too: a claim
// we could not run on real hardware says so in those words.
@@ -87,6 +88,7 @@ describe('the notes table', () => {
'repair environment', 'model storage', 'civitai', 'hip sdk',
'vram_total', 'libvulkan1', 'working directory', 'document chat',
'prompt history', 'side panel', 'researched rather than proven', 'apple music', 'too big to scan',
+ 'requirements.txt',
]) {
expect(prose, `${shipping}: nothing about "${anchor}"`).toContain(anchor)
}
diff --git a/src/stores/comfyInstallStore.ts b/src/stores/comfyInstallStore.ts
index 16aaee5f..c57bd5da 100644
--- a/src/stores/comfyInstallStore.ts
+++ b/src/stores/comfyInstallStore.ts
@@ -57,6 +57,18 @@ export const LOST_CONTACT = 'Lost contact with the installer. Check the log and
/** The same for the winget step that runs before it. */
export const LOST_CONTACT_PYTHON = 'Lost contact with the Python installer. Check the log and try again.'
+/** True while the ComfyUI section has something the user must not miss: a run
+ * in flight, or a failure nobody has dismissed yet.
+ *
+ * A15, Windows Nachlauf 02.09.: the section is an ordinary accordion, so a
+ * trip to General and back folded it up again while a twenty minute repair was
+ * still running. The progress itself survives the remount (that is what this
+ * store is for), but it survives behind a closed lid, and a user who does not
+ * think to open it sees an app that looks idle. */
+export function comfySectionShouldOpen(phase: ComfyInstallPhase): boolean {
+ return phase !== 'idle'
+}
+
/** The one poll in flight, module level so it outlives every mount. */
let timer: ReturnType<typeof setInterval> | null = null