From 957e2c65703b0d5b1ea83fac949fc17fcef3692d Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Tue, 18 Nov 2025 02:08:59 -0800 Subject: [PATCH 1/4] Handle install dir validation edge cases --- .../src/components/install/InstallLocationPicker.vue | 4 ++++ src/locales/en/main.json | 2 ++ 2 files changed, 6 insertions(+) diff --git a/apps/desktop-ui/src/components/install/InstallLocationPicker.vue b/apps/desktop-ui/src/components/install/InstallLocationPicker.vue index 6b139c1e9e..e66a49d571 100644 --- a/apps/desktop-ui/src/components/install/InstallLocationPicker.vue +++ b/apps/desktop-ui/src/components/install/InstallLocationPicker.vue @@ -229,6 +229,10 @@ const validatePath = async (path: string | undefined) => { } if (validation.parentMissing) errors.push(t('install.parentMissing')) if (validation.isOneDrive) errors.push(t('install.isOneDrive')) + if (validation.isInsideAppInstallDir) + errors.push(t('install.insideAppInstallDir')) + if (validation.isInsideUpdaterCache) + errors.push(t('install.insideUpdaterCache')) if (validation.error) errors.push(`${t('install.unhandledError')}: ${validation.error}`) diff --git a/src/locales/en/main.json b/src/locales/en/main.json index c38473a3c6..b6ab055241 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -496,6 +496,8 @@ "cannotWrite": "Unable to write to the selected path", "insufficientFreeSpace": "Insufficient space - minimum free space", "isOneDrive": "OneDrive is not supported. Please install ComfyUI in another location.", + "insideAppInstallDir": "This folder is inside the ComfyUI Desktop application bundle and will be deleted during updates. Choose a directory outside the install folder, such as Documents/ComfyUI.", + "insideUpdaterCache": "This folder is inside the ComfyUI updater cache, which is cleared on every update. Select a different location for your data.", "nonDefaultDrive": "Please install ComfyUI on your system drive (eg. C:\\). Drives with different file systems may cause unpredicable issues. Models and other files can be stored on other drives after installation.", "parentMissing": "Path does not exist - create the containing directory first", "unhandledError": "Unknown error", From de8d29ecc9cae8163befe9e9e500bcd7c486a185 Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Tue, 18 Nov 2025 22:22:47 -0800 Subject: [PATCH 2/4] Update npm package --- package.json | 2 +- pnpm-lock.yaml | 50 +++++++++++++++++++++++++++++++++++++-------- pnpm-workspace.yaml | 1 + 3 files changed, 43 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 5b9f4133d7..4b6b89262e 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "dependencies": { "@alloc/quick-lru": "catalog:", "@atlaskit/pragmatic-drag-and-drop": "^1.3.1", - "@comfyorg/comfyui-electron-types": "0.4.73-0", + "@comfyorg/comfyui-electron-types": "catalog:", "@comfyorg/design-system": "workspace:*", "@comfyorg/registry-types": "workspace:*", "@comfyorg/shared-frontend-utils": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d65a29266a..d75b51537f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,6 +9,9 @@ catalogs: '@alloc/quick-lru': specifier: ^5.2.0 version: 5.2.0 + '@comfyorg/comfyui-electron-types': + specifier: 0.5.5 + version: 0.5.5 '@eslint/js': specifier: ^9.35.0 version: 9.35.0 @@ -318,8 +321,8 @@ importers: specifier: ^1.3.1 version: 1.3.1 '@comfyorg/comfyui-electron-types': - specifier: 0.4.73-0 - version: 0.4.73-0 + specifier: 'catalog:' + version: 0.5.5 '@comfyorg/design-system': specifier: workspace:* version: link:packages/design-system @@ -1456,6 +1459,9 @@ packages: '@comfyorg/comfyui-electron-types@0.4.73-0': resolution: {integrity: sha512-WlItGJQx9ZWShNG9wypx3kq+19pSig/U+s5sD2SAeEcMph4u8A/TS+lnRgdKhT58VT1uD7cMcj2SJpfdBPNWvw==} + '@comfyorg/comfyui-electron-types@0.5.5': + resolution: {integrity: sha512-f3XOXpMsALIwHakz7FekVPm4/Fh2pvJPEi8tRe8jYGBt8edsd4Mkkq31Yjs2Weem3BP7yNwbdNuSiQdP/pxJyg==} + '@csstools/color-helpers@5.1.0': resolution: {integrity: sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==} engines: {node: '>=18'} @@ -4413,6 +4419,9 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + data-urls@5.0.0: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} engines: {node: '>=18'} @@ -7000,6 +7009,11 @@ packages: engines: {node: '>= 0.4'} hasBin: true + resolve@1.22.11: + resolution: {integrity: sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==} + engines: {node: '>= 0.4'} + hasBin: true + restore-cursor@3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} @@ -7095,6 +7109,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.7.3: + resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==} + engines: {node: '>=10'} + hasBin: true + set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -7815,8 +7834,8 @@ packages: vue-component-type-helpers@3.1.1: resolution: {integrity: sha512-B0kHv7qX6E7+kdc5nsaqjdGZ1KwNKSUQDWGy7XkTYT7wFsOpkEyaJ1Vq79TjwrrtuLRgizrTV7PPuC4rRQo+vw==} - vue-component-type-helpers@3.1.3: - resolution: {integrity: sha512-V1dOD8XYfstOKCnXbWyEJIrhTBMwSyNjv271L1Jlx9ExpNlCSuqOs3OdWrGJ0V544zXufKbcYabi/o+gK8lyfQ==} + vue-component-type-helpers@3.1.4: + resolution: {integrity: sha512-Uws7Ew1OzTTqHW8ZVl/qLl/HB+jf08M0NdFONbVWAx0N4gMLK8yfZDgeB77hDnBmaigWWEn5qP8T9BG59jIeyQ==} vue-demi@0.14.10: resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==} @@ -8994,6 +9013,8 @@ snapshots: '@comfyorg/comfyui-electron-types@0.4.73-0': {} + '@comfyorg/comfyui-electron-types@0.5.5': {} + '@csstools/color-helpers@5.1.0': {} '@csstools/css-calc@2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': @@ -10617,7 +10638,7 @@ snapshots: storybook: 9.1.6(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@5.4.19(@types/node@20.14.10)(lightningcss@1.30.1)(terser@5.39.2)) type-fest: 2.19.0 vue: 3.5.13(typescript@5.9.2) - vue-component-type-helpers: 3.1.3 + vue-component-type-helpers: 3.1.4 '@swc/helpers@0.5.17': dependencies: @@ -10989,7 +11010,7 @@ snapshots: '@types/react@19.1.9': dependencies: - csstype: 3.1.3 + csstype: 3.2.3 '@types/semver@7.7.0': {} @@ -12168,6 +12189,8 @@ snapshots: csstype@3.1.3: {} + csstype@3.2.3: {} + data-urls@5.0.0: dependencies: whatwg-mimetype: 4.0.0 @@ -12594,7 +12617,7 @@ snapshots: dependencies: debug: 3.2.7 is-core-module: 2.16.1 - resolve: 1.22.10 + resolve: 1.22.11 transitivePeerDependencies: - supports-color optional: true @@ -13740,7 +13763,7 @@ snapshots: acorn: 8.15.0 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - semver: 7.7.2 + semver: 7.7.3 jsonc-parser@3.2.0: {} @@ -15345,6 +15368,13 @@ snapshots: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + resolve@1.22.11: + dependencies: + is-core-module: 2.16.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + optional: true + restore-cursor@3.1.0: dependencies: onetime: 5.1.2 @@ -15449,6 +15479,8 @@ snapshots: semver@7.7.2: {} + semver@7.7.3: {} + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -16343,7 +16375,7 @@ snapshots: vue-component-type-helpers@3.1.1: {} - vue-component-type-helpers@3.1.3: {} + vue-component-type-helpers@3.1.4: {} vue-demi@0.14.10(vue@3.5.13(typescript@5.9.2)): dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index d2d081e891..9da20a48a0 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -4,6 +4,7 @@ packages: catalog: '@alloc/quick-lru': ^5.2.0 + '@comfyorg/comfyui-electron-types': 0.5.5 '@eslint/js': ^9.35.0 '@iconify-json/lucide': ^1.1.178 '@iconify/json': ^2.2.380 From a2e62b4e15120f53bd71de8cb697913b33fd025b Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Tue, 18 Nov 2025 22:29:27 -0800 Subject: [PATCH 3/4] catalog the desktop-ui --- apps/desktop-ui/package.json | 2 +- pnpm-lock.yaml | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/apps/desktop-ui/package.json b/apps/desktop-ui/package.json index 0aa47e320b..48a1348728 100644 --- a/apps/desktop-ui/package.json +++ b/apps/desktop-ui/package.json @@ -91,7 +91,7 @@ "build-storybook": "storybook build -o dist/storybook" }, "dependencies": { - "@comfyorg/comfyui-electron-types": "0.4.73-0", + "@comfyorg/comfyui-electron-types": "catalog:", "@comfyorg/shared-frontend-utils": "workspace:*", "@primevue/core": "catalog:", "@primevue/themes": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d75b51537f..87d1264de0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -712,8 +712,8 @@ importers: apps/desktop-ui: dependencies: '@comfyorg/comfyui-electron-types': - specifier: 0.4.73-0 - version: 0.4.73-0 + specifier: 'catalog:' + version: 0.5.5 '@comfyorg/shared-frontend-utils': specifier: workspace:* version: link:../../packages/shared-frontend-utils @@ -1456,9 +1456,6 @@ packages: '@cacheable/utils@2.0.3': resolution: {integrity: sha512-m7Rce68cMHlAUjvWBy9Ru1Nmw5gU0SjGGtQDdhpe6E0xnbcvrIY0Epy//JU1VYYBUTzrG9jvgmTauULGKzOkWA==} - '@comfyorg/comfyui-electron-types@0.4.73-0': - resolution: {integrity: sha512-WlItGJQx9ZWShNG9wypx3kq+19pSig/U+s5sD2SAeEcMph4u8A/TS+lnRgdKhT58VT1uD7cMcj2SJpfdBPNWvw==} - '@comfyorg/comfyui-electron-types@0.5.5': resolution: {integrity: sha512-f3XOXpMsALIwHakz7FekVPm4/Fh2pvJPEi8tRe8jYGBt8edsd4Mkkq31Yjs2Weem3BP7yNwbdNuSiQdP/pxJyg==} @@ -9011,8 +9008,6 @@ snapshots: '@cacheable/utils@2.0.3': {} - '@comfyorg/comfyui-electron-types@0.4.73-0': {} - '@comfyorg/comfyui-electron-types@0.5.5': {} '@csstools/color-helpers@5.1.0': {} From f9a556c0d68ce8c2c7b7e05430761f5c8bd1c49c Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Tue, 18 Nov 2025 22:39:59 -0800 Subject: [PATCH 4/4] ESLint --- .../components/install/InstallLocationPicker.vue | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/apps/desktop-ui/src/components/install/InstallLocationPicker.vue b/apps/desktop-ui/src/components/install/InstallLocationPicker.vue index e66a49d571..2122a136e4 100644 --- a/apps/desktop-ui/src/components/install/InstallLocationPicker.vue +++ b/apps/desktop-ui/src/components/install/InstallLocationPicker.vue @@ -115,19 +115,18 @@ import Button from 'primevue/button' import Divider from 'primevue/divider' import InputText from 'primevue/inputtext' import Message from 'primevue/message' -import { type ModelRef, computed, onMounted, ref } from 'vue' +import { computed, onMounted, ref } from 'vue' +import type { ModelRef } from 'vue' import { useI18n } from 'vue-i18n' -import MigrationPicker from '@/components/install/MigrationPicker.vue' -import MirrorItem from '@/components/install/mirror/MirrorItem.vue' -import { - PYPI_MIRROR, - PYTHON_MIRROR, - type UVMirror -} from '@/constants/uvMirrors' +import { PYPI_MIRROR, PYTHON_MIRROR } from '@/constants/uvMirrors' +import type { UVMirror } from '@/constants/uvMirrors' import { electronAPI } from '@/utils/envUtil' import { ValidationState } from '@/utils/validationUtil' +import MigrationPicker from './MigrationPicker.vue' +import MirrorItem from './mirror/MirrorItem.vue' + const { t } = useI18n() const installPath = defineModel('installPath', { required: true })