feat: smooth ComfyUI in-place update flow (#557)#563
Open
Kosinkadink wants to merge 2 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #557.
Collapses the multi-step in-place update UX into a single confirm dialog and an auto-launch chain.
Before
After
stopComfyUI→update-comfyui→launchin 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 firespanel-trigger-overlay { kind: 'install-update' }, open the Settings overlay withautoAction: 'update-comfyui'so the embeddedDetailModalauto-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:actionGuard.checkBeforeAction"instance is running, stop it?" prompt forupdate-comfyui(mirroring the existingmigrate-to-standaloneexemption).standalone.updateRestartNoticeto the action's existingconfirm.messageso a single dialog covers both stop + update.showProgressbranch, whenupdate-comfyuiis invoked while running, build anapiCallthat chainsstopComfyUI→ wait-for-stopped →update-comfyui→launch. Mirrors the existing syntheticrestartaction's chainedapiCall.triggersInstanceStartis set soPanelApp.handleShowProgressinstalls the chooser-host close-on-instance-started subscription for the post-update launch.locales/en.json— newstandalone.updateRestartNoticestring.src/renderer/src/panel/PanelApp.test.ts— extend theinstall-updatepayload test to assert thatDetailModalreceivesauto-action="update-comfyui". Stub template now exposesautoActionas adata-auto-actionattribute.Verification
pnpm run typecheck✅pnpm run lint✅pnpm run test✅ (937 / 937)pnpm run build✅