fix(adopt): fail clearly when Legacy Desktop adoption can't source ComfyUI#942
Open
Kosinkadink wants to merge 1 commit into
Open
fix(adopt): fail clearly when Legacy Desktop adoption can't source ComfyUI#942Kosinkadink wants to merge 1 commit into
Kosinkadink wants to merge 1 commit into
Conversation
…mfyUI
When in-place adoption of a Legacy Desktop install could not obtain the
ComfyUI source (no pre-swap staged copy and the git clone failed), the
source-missing dialog offered a 'Switch to managed env' button. Choosing
it threw 'source-missing-switch-to-managed', which the migrate dispatcher
mapped to { ok: true, navigate: 'new-install' }. But navigate:'new-install'
is unhandled in the renderer, so the operation reported success while
doing nothing — leaving the user back where they started (detail view on
the dashboard-tile path, or the chooser on the first-time-migration path).
Replace the fake-success escape with a clear failure: drop the
'Switch to managed env' option, keep Retry, and on any non-retry choice
throw a source-missing error that the dispatcher surfaces as
{ ok: false, message } with a user-friendly message suggesting a new
install. This fixes both the dashboard-tile and first-use migration
surfaces at once, since both flow through the same backend + ProgressModal
error banner.
Also fixes a latent bug where an unexpected prompt choice would silently
break the source loop, leaving sourceMode null and adoption continuing
without a source.
Closes #917
Amp-Thread-ID: https://ampcode.com/threads/T-019e96a8-4f9f-709a-920e-b7659a9140a7
Co-authored-by: Amp <amp@ampcode.com>
Member
Author
Manual testing still pendingAutomated checks pass ( What still needs a manual run
Already confirmed by code inspection
A local test environment has been staged (clean fresh‑adopt state, marker cleared, full backup taken); just need to drive the UI. |
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.
Summary
When in-place adoption of a Legacy Desktop install could not obtain the ComfyUI source (no pre-swap staged copy and the git clone failed), the
source-missingdialog offered a "Switch to managed env" button. Choosing it threwsource-missing-switch-to-managed, which the migrate dispatcher mapped to{ ok: true, navigate: 'new-install' }.But
navigate: 'new-install'is unhandled in the renderer (only'list'/'detail'are), so the operation reported success while doing nothing — leaving the user back where they started (the legacy detail view on the dashboard-tile path, or the chooser on the first-time-migration path). The button label was also misleading: it sounded like a lightweight env swap but really pointed at a fresh install that abandons the legacy data and launch args.Fix
Replace the fake-success escape with a clear failure (per #917):
source-missingprompt; keep Retry (transient network/git failures) and Cancel.source-missing:error that the dispatcher surfaces as{ ok: false, message }with a user-friendly message that suggests doing a new install.Also fixes a latent bug: an unexpected prompt choice previously
break-ed the source loop silently, leavingsourceModenull and adoption continuing without a source.Changes
desktopAdopt.ts— drop'switch-to-managed'fromUserChoice; source loop throws a clear error on anything but explicit retry.migrate.ts— remove the "Switch to managed env" button and the fake-success remap; source failures return{ ok: false, message }with a friendly message.locales/en.json— removeadoptPromptSwitchToManaged, clarify the prompt message, addadoptSourceMissingFailed.errorBucket.ts— update stale comment (source_missingbucketing still works).migrate.test.ts— assert fail-clearly behavior.Verification
pnpm typecheck/lint/buildpass.migrate.test.ts,desktopAdopt.test.ts,telemetry.test.tspass.Closes #917