From 6fc0ac2547075363902319e63f8f23141f791ba5 Mon Sep 17 00:00:00 2001 From: Johnpaul Date: Wed, 17 Dec 2025 02:01:58 +0100 Subject: [PATCH 1/7] feat(manager): add updateComfyUI service method Add updateComfyUI() to comfyManagerService for calling the /v2/manager/queue/update_comfyui endpoint. This enables updating ComfyUI core from the frontend in non-desktop environments. --- .../manager/services/comfyManagerService.ts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/workbench/extensions/manager/services/comfyManagerService.ts b/src/workbench/extensions/manager/services/comfyManagerService.ts index 9358f29188a..4b0f25ae5fd 100644 --- a/src/workbench/extensions/manager/services/comfyManagerService.ts +++ b/src/workbench/extensions/manager/services/comfyManagerService.ts @@ -12,6 +12,7 @@ type ManagerQueueStatus = components['schemas']['QueueStatus'] type InstallPackParams = components['schemas']['InstallPackParams'] type InstalledPacksResponse = components['schemas']['InstalledPacksResponse'] type UpdateAllPacksParams = components['schemas']['UpdateAllPacksParams'] +type UpdateComfyUIParams = components['schemas']['UpdateComfyUIParams'] type ManagerTaskHistory = components['schemas']['HistoryResponse'] type QueueTaskItem = components['schemas']['QueueTaskItem'] @@ -26,6 +27,7 @@ enum ManagerRoute { RESET_QUEUE = 'manager/queue/reset', QUEUE_STATUS = 'manager/queue/status', UPDATE_ALL = 'manager/queue/update_all', + UPDATE_COMFYUI = 'manager/queue/update_comfyui', LIST_INSTALLED = 'customnode/installed', GET_NODES = 'customnode/getmappings', IMPORT_FAIL_INFO = 'customnode/import_fail_info', @@ -271,6 +273,33 @@ export const useComfyManagerService = () => { ) } + const updateComfyUI = async ( + params: UpdateComfyUIParams = { is_stable: true }, + ui_id?: string, + signal?: AbortSignal + ) => { + const errorContext = 'Updating ComfyUI' + const routeSpecificErrors = { + 400: 'Bad Request: Missing required parameters', + 403: 'Forbidden: To use this action, a security_level of `middle or below` is required' + } + + const queryParams = { + client_id: api.clientId ?? api.initialClientId ?? 'unknown', + ui_id: ui_id || uuidv4(), + ...params + } + + return executeRequest( + () => + managerApiClient.get(ManagerRoute.UPDATE_COMFYUI, { + params: queryParams, + signal + }), + { errorContext, routeSpecificErrors, isQueueOperation: true } + ) + } + const rebootComfyUI = async (signal?: AbortSignal) => { const errorContext = 'Rebooting ComfyUI' const routeSpecificErrors = { @@ -335,6 +364,7 @@ export const useComfyManagerService = () => { updateAllPacks, // System operations + updateComfyUI, rebootComfyUI, isLegacyManagerUI } From 5317393444b6089fa0f15ef8d523582a4a6b12e4 Mon Sep 17 00:00:00 2001 From: Johnpaul Date: Wed, 17 Dec 2025 02:02:58 +0100 Subject: [PATCH 2/7] feat(help-center): add Update ComfyUI menu item Add "Update ComfyUI" option to the Help Center menu for non-desktop, non-cloud environments (portable/localhost). Uses a download icon and triggers the manager's updateComfyUI endpoint followed by reboot. - Fixes #issue-number --- .../helpcenter/HelpCenterMenuContent.vue | 20 +++++++++++++++++++ src/locales/en/main.json | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/components/helpcenter/HelpCenterMenuContent.vue b/src/components/helpcenter/HelpCenterMenuContent.vue index 7465429c2fe..18947c7975b 100644 --- a/src/components/helpcenter/HelpCenterMenuContent.vue +++ b/src/components/helpcenter/HelpCenterMenuContent.vue @@ -168,6 +168,7 @@ import { electronAPI, isElectron } from '@/utils/envUtil' import { formatVersionAnchor } from '@/utils/formatUtil' import { useConflictAcknowledgment } from '@/workbench/extensions/manager/composables/useConflictAcknowledgment' import { useManagerState } from '@/workbench/extensions/manager/composables/useManagerState' +import { useComfyManagerService } from '@/workbench/extensions/manager/services/comfyManagerService' import { ManagerTab } from '@/workbench/extensions/manager/types/comfyManagerTypes' // Types @@ -369,6 +370,18 @@ const menuItems = computed(() => { } }) } + if (!isElectron() && !isCloud) { + items.push({ + key: 'update-comfyui', + type: 'item', + icon: 'icon-[lucide--download]', + label: t('helpCenter.updateComfyUI'), + action: () => { + onUpdateComfyUI() + emit('close') + } + }) + } items.push({ key: 'more', @@ -545,6 +558,13 @@ const onReinstall = (): void => { } } +const onUpdateComfyUI = (): void => { + const { updateComfyUI, rebootComfyUI } = useComfyManagerService() + void updateComfyUI({ is_stable: true }).then(() => { + void rebootComfyUI() + }) +} + const onReleaseClick = (release: ReleaseNote): void => { trackResourceClick('release_notes', true) void releaseStore.handleShowChangelog(release.version) diff --git a/src/locales/en/main.json b/src/locales/en/main.json index 2bcff2e648b..e3d7e21027c 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -773,7 +773,8 @@ "updateAvailable": "Update", "desktopUserGuide": "Desktop User Guide", "openDevTools": "Open Dev Tools", - "reinstall": "Re-Install" + "reinstall": "Re-Install", + "updateComfyUI": "Update ComfyUI" }, "releaseToast": { "newVersionAvailable": "New update is out!", From d259b2b7e8ea1f68dfa3960715ff1526bde46842 Mon Sep 17 00:00:00 2001 From: Johnpaul Date: Wed, 17 Dec 2025 02:03:33 +0100 Subject: [PATCH 3/7] test: add updateComfyUI mock to manager store tests Update mock to include the new updateComfyUI method. --- tests-ui/tests/store/comfyManagerStore.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tests-ui/tests/store/comfyManagerStore.test.ts b/tests-ui/tests/store/comfyManagerStore.test.ts index b2db9713dd8..d131a0fc9df 100644 --- a/tests-ui/tests/store/comfyManagerStore.test.ts +++ b/tests-ui/tests/store/comfyManagerStore.test.ts @@ -95,6 +95,7 @@ describe('useComfyManagerStore', () => { disablePack: vi.fn().mockResolvedValue(null), updatePack: vi.fn().mockResolvedValue(null), updateAllPacks: vi.fn().mockResolvedValue(null), + updateComfyUI: vi.fn().mockResolvedValue(null), rebootComfyUI: vi.fn().mockResolvedValue(null), isLegacyManagerUI: vi.fn().mockResolvedValue(false) } From 2b786dc50dbcb6af0536ab6d45d2e56ca46ccf91 Mon Sep 17 00:00:00 2001 From: Johnpaul Date: Wed, 17 Dec 2025 02:24:39 +0100 Subject: [PATCH 4/7] feat(help-center): add toast notifications for ComfyUI update Show toast notifications when: - Update has started (info) - Update completed successfully (success) - Update failed (error with details) --- .../helpcenter/HelpCenterMenuContent.vue | 35 ++++++++++++++++--- src/locales/en/main.json | 6 +++- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/src/components/helpcenter/HelpCenterMenuContent.vue b/src/components/helpcenter/HelpCenterMenuContent.vue index 18947c7975b..cd09abe27b2 100644 --- a/src/components/helpcenter/HelpCenterMenuContent.vue +++ b/src/components/helpcenter/HelpCenterMenuContent.vue @@ -152,6 +152,7 @@