Commit e2dfb87
feat: detect ComfyUI Desktop installs and add desktop source plugin (#84)
* feat: detect ComfyUI Desktop installs and add desktop source plugin
- Add desktopDetect.ts: reads Desktop's config.json from platform-specific
userData path, validates basePath, locates executable
- Add desktop source plugin: hidden, skipInstall, Win/Mac only. Supports
probing Desktop basePaths, launching via shell.openPath, opening data folder
- Add detect-desktop-install IPC handler for renderer integration
- Extend findComfyUIDir to recognize Desktop basePath layout (models/ +
user/ + custom_nodes/ directly in path) for migration compatibility
- Add 15 tests covering detection, executable lookup, and probe heuristics
Amp-Thread-ID: https://ampcode.com/threads/T-019cadf9-1231-738c-8421-ba4c41cef4e7
Co-authored-by: Amp <amp@ampcode.com>
* feat: auto-track Desktop install on Launcher startup
Call detectDesktopInstall() during startup and ensureExists() to
automatically surface the Desktop installation in the installs list.
Uses sourceId 'desktop' as a singleton key so it's only created once.
Amp-Thread-ID: https://ampcode.com/threads/T-019cadf9-1231-738c-8421-ba4c41cef4e7
Co-authored-by: Amp <amp@ampcode.com>
* feat: sync shared model paths into Desktop's extra_models_config.yaml
- Add syncSharedModelPaths() to inject Launcher's shared model directories
into Desktop's extra_models_config.yaml, preserving Desktop's own sections
- Call sync on startup when Desktop is detected and on modelsDirs setting change
- Remove dead code: detect-desktop-install IPC handler, autoDetectDesktop export
- Add 5 tests for syncSharedModelPaths
Amp-Thread-ID: https://ampcode.com/threads/T-019caee3-d546-775c-89f1-ed6ef60e10c2
Co-authored-by: Amp <amp@ampcode.com>
* refactor: remove redundant platform guards around detectDesktopInstall calls
Amp-Thread-ID: https://ampcode.com/threads/T-019caee3-d546-775c-89f1-ed6ef60e10c2
Co-authored-by: Amp <amp@ampcode.com>
* feat: Desktop-to-Standalone migration with snapshot preview
Add migrate-to-standalone action to the desktop source plugin that:
- Captures a snapshot of the Desktop installation (custom nodes, pip packages)
- Shows a rich preview in the confirmation dialog (version grid, collapsible
node list with status indicators, pip packages)
- Creates a new Standalone installation and restores the snapshot
- Copies workflows, settings, input/output to shared directories
- Adds Desktop models directory to shared model paths
Implementation details:
- Add snapshotPreview field to modal confirm() for rich data previews
- Add preview-desktop-migration IPC handler with temp file lifecycle management
- Add captureDesktopSnapshot() with pip freeze and custom node scanning
- Add sp-* CSS classes and modal-box-wide for snapshot preview styling
- Add unit tests for captureDesktopSnapshot and modal messageDetails
Amp-Thread-ID: https://ampcode.com/threads/T-019cb430-c12a-7607-aa34-1311497cf320
Co-authored-by: Amp <amp@ampcode.com>
* feat: launch Desktop as child process with skipPipSync, skipPortWait, and Show Window support
- Add skipPipSync flag to Snapshot: when set, pip packages are not force-synced
during restore (node deps still installed via requirements.txt/install.py)
- Desktop migration sets skipPipSync since environments differ
- Launch Desktop as tracked child process instead of detached shell.openPath
- Add skipPortWait to LaunchCommand: spawns and immediately registers session
without port conflict detection or readiness waiting
- Add showWindow to LaunchCommand: disables windowsHide so Desktop's Electron
window appears
- Add focusExternalProcessWindow for Show Window support on Desktop
(wscript AppActivate on Windows, osascript on macOS)
- Clean exit (code 0) from skipPortWait processes is not treated as crash
- Skip launch progress modal for Desktop (instant spawn)
- Fix i18n: actions.openFolder -> actions.openDirectory
- Remove ellipsis from desktop.migrating progress title
Amp-Thread-ID: https://ampcode.com/threads/T-019cbf7c-f57d-71b9-b8a3-57afcec04628
Co-authored-by: Amp <amp@ampcode.com>
* fix: resolve relative basePath in desktop config and normalize modelsDirs for dedup
Amp-Thread-ID: https://ampcode.com/threads/T-019cc06b-c6d9-72d0-b2a8-dcf89888256c
Co-authored-by: Amp <amp@ampcode.com>
* fix: remove no-explicit-any lint warning in desktopDetect test
Amp-Thread-ID: https://ampcode.com/threads/T-019cc06b-c6d9-72d0-b2a8-dcf89888256c
Co-authored-by: Amp <amp@ampcode.com>
* fix: use path.resolve for basePath to fix CI test on Linux
Amp-Thread-ID: https://ampcode.com/threads/T-019cc06b-c6d9-72d0-b2a8-dcf89888256c
Co-authored-by: Amp <amp@ampcode.com>
* fix: use path.resolve in test expectations to match impl on all platforms
Amp-Thread-ID: https://ampcode.com/threads/T-019cc06b-c6d9-72d0-b2a8-dcf89888256c
Co-authored-by: Amp <amp@ampcode.com>
---------
Co-authored-by: Amp <amp@ampcode.com>1 parent 772246f commit e2dfb87
19 files changed
Lines changed: 1264 additions & 14 deletions
File tree
- locales
- src
- main
- lib
- sources
- types
- preload
- renderer/src
- assets
- components
- composables
- views
- types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
403 | 427 | | |
404 | 428 | | |
405 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
142 | 159 | | |
143 | 160 | | |
144 | 161 | | |
| |||
410 | 427 | | |
411 | 428 | | |
412 | 429 | | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
| 430 | + | |
419 | 431 | | |
420 | 432 | | |
421 | 433 | | |
| |||
552 | 564 | | |
553 | 565 | | |
554 | 566 | | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
555 | 575 | | |
556 | 576 | | |
557 | 577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
0 commit comments