fix(adopt): restore Legacy Desktop settings from workspace#1281
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughStartup now awaits IPC registration and maintenance. Desktop adoption reads legacy settings from the legacy workspace, preserves CPU selection, versions adopted settings, and reconciles eligible installation records without overwriting user-edited launch arguments. ChangesAdopted settings lifecycle
Sequence Diagram(s)sequenceDiagram
participant MainStartup
participant IPCRegister
participant AdoptedSettings
participant Installations
MainStartup->>IPCRegister: await register()
IPCRegister->>IPCRegister: migrateDefaults()
IPCRegister->>AdoptedSettings: reconcileAdoptedSettings()
AdoptedSettings->>Installations: update adopted records
IPCRegister-->>MainStartup: startup maintenance complete
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/main/lib/desktopAdopt.ts`:
- Around line 957-972: Update the adoption logic around the
launchArgs/inputDir/outputDir patching so eligible default inputDir and
outputDir values are repaired independently of the existing.launchArgs ===
generatedDefaultArgs check. Keep launchArgs replacement restricted to generated
defaults, while allowing each path override to apply when its corresponding
existing path still matches the basePath default.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: aa8824fe-9db2-4704-95cf-3b55e1a0d60c
📒 Files selected for processing (4)
src/main/index.tssrc/main/lib/desktopAdopt.test.tssrc/main/lib/desktopAdopt.tssrc/main/lib/ipc/index.ts
|
Follow-up from the affected user's supplied configuration files: NVIDIA was selected and |
Summary
comfy.settings.jsonfrom the canonical<basePath>/user/defaultworkspace path and back up that same file--cpufrom the persistedselectedDevicewhen the settings entry is absentRoot cause
Legacy Desktop stores frontend and launch settings under its ComfyUI workspace. The adoption flow instead looked for
comfy.settings.jsonin the Electron config directory, so it silently migrated an empty settings object. For CPU installations this dropped--cpu, then launched a CPU-only Torch environment through the CUDA path.Safety
cpu: falseis preservedValidation
pnpm run typecheckpnpm run lintpnpm run buildpnpm run test(188 files, 2812 tests)