Skip to content

feat: smooth ComfyUI in-place update flow (#557)#563

Open
Kosinkadink wants to merge 2 commits into
mainfrom
kosinkadink/smooth-update-flow
Open

feat: smooth ComfyUI in-place update flow (#557)#563
Kosinkadink wants to merge 2 commits into
mainfrom
kosinkadink/smooth-update-flow

Conversation

@Kosinkadink
Copy link
Copy Markdown
Member

Closes #557.

Collapses the multi-step in-place update UX into a single confirm dialog and an auto-launch chain.

Before

  1. Click the title-bar update pill → opens Settings → ComfyUI Settings → Update tab.
  2. Click "Update Now".
  3. Generic "instance is running, would you like to stop it" prompt — does not mention the update.
  4. "Update from X to Y?" confirm dialog.
  5. Update progress modal.
  6. "Done" → back to the Update tab → user must manually click "Start ComfyUI".

After

  1. Click the title-bar update pill → single confirm dialog: "ComfyUI is currently running and will be restarted to apply this update." followed by the existing release-notes / version body.
  2. Confirm → ProgressModal runs stopComfyUIupdate-comfyuilaunch in one continuous view, ending in the new ComfyUI window opening automatically.

When the install was already stopped at confirm time, the restart-notice line and the auto-launch chain are skipped — the flow is just confirm → update → return to Update tab, identical to today.

Changes

  • src/renderer/src/composables/useDeepLinkRouter.ts — when the title-bar pill fires panel-trigger-overlay { kind: 'install-update' }, open the Settings overlay with autoAction: 'update-comfyui' so the embedded DetailModal auto-runs the update action on mount. The Update tab still mounts behind the dialog so a cancel returns the user to the surface that shows release notes / channel info.
  • src/renderer/src/views/DetailModal.vue:
    • Skip the generic actionGuard.checkBeforeAction "instance is running, stop it?" prompt for update-comfyui (mirroring the existing migrate-to-standalone exemption).
    • When the install is running, prepend standalone.updateRestartNotice to the action's existing confirm.message so a single dialog covers both stop + update.
    • In the showProgress branch, when update-comfyui is invoked while running, build an apiCall that chains stopComfyUI → wait-for-stopped → update-comfyuilaunch. Mirrors the existing synthetic restart action's chained apiCall. triggersInstanceStart is set so PanelApp.handleShowProgress installs the chooser-host close-on-instance-started subscription for the post-update launch.
  • locales/en.json — new standalone.updateRestartNotice string.
  • src/renderer/src/panel/PanelApp.test.ts — extend the install-update payload test to assert that DetailModal receives auto-action="update-comfyui". Stub template now exposes autoAction as a data-auto-action attribute.

Verification

  • pnpm run typecheck
  • pnpm run lint
  • pnpm run test ✅ (937 / 937)
  • pnpm run build

Kosinkadink and others added 2 commits May 15, 2026 17:03
Collapse the multi-step in-place update UX into a single confirm and an auto-launch chain:

* Title-bar update pill now drives straight into the update confirm dialog by passing autoAction='update-comfyui' on the deep-link overlay open. The Update tab still mounts behind the dialog so a cancel returns to the surface that shows release notes and channel info.
* DetailModal.runAction skips the generic actionGuard 'instance is running' prompt for update-comfyui (mirroring the migrate-to-standalone exemption); the running-state notice is folded into the action's existing confirm dialog as a leading 'ComfyUI is currently running and will be restarted to apply this update.' line.
* When the install was running at confirm time, the ProgressModal apiCall now chains stopComfyUI -> wait-for-stopped -> update-comfyui -> launch in a single uninterrupted view, mirroring the existing synthetic 'restart' action. triggersInstanceStart is set so PanelApp's chooser-host close-on-instance-started subscription fires for the post-update launch.

Amp-Thread-ID: https://ampcode.com/threads/T-019e2e09-b0c6-753f-9b03-567a1c1fa922
Co-authored-by: Amp <amp@ampcode.com>
…lently

waitForStopped previously returned void after either a successful stop or a 10s deadline expiry. When the deadline expired (slow VRAM teardown, Windows Restart Manager, etc.), the chained restart -> launch and update -> update -> launch calls hit the backend's REQUIRES_STOPPED guard, which returned {ok: false, running: true} and surfaced as a vague 'Operation failed' banner with no message.

Make waitForStopped return a boolean and have both branches short-circuit with a typed ActionResult carrying a new errors.stopTimeout message ('ComfyUI is still shutting down. Please wait a moment and try again.'). Also bump the deadline from 10s to 30s — the cost of a false timeout (confusing error) is higher than the cost of a few extra seconds of waiting.

Amp-Thread-ID: https://ampcode.com/threads/T-019e2e09-b0c6-753f-9b03-567a1c1fa922
Co-authored-by: Amp <amp@ampcode.com>
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.

Make ComfyUI update flow smooth

1 participant