From 24cbc41832119dac834b8cd311384fade01e3594 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Mon, 23 Jun 2025 02:41:15 -0700 Subject: [PATCH] [Manager] Fix bug: opening modal when last focused tab was 'Installed' always shows empty list (#4252) --- src/composables/nodePack/useInstalledPacks.ts | 7 ++++++- src/stores/comfyManagerStore.ts | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/composables/nodePack/useInstalledPacks.ts b/src/composables/nodePack/useInstalledPacks.ts index 1fa9a28a07..eb51bdf8db 100644 --- a/src/composables/nodePack/useInstalledPacks.ts +++ b/src/composables/nodePack/useInstalledPacks.ts @@ -18,6 +18,11 @@ export const useInstalledPacks = (options: UseNodePacksOptions = {}) => { const filterInstalledPack = (packs: components['schemas']['Node'][]) => packs.filter((pack) => comfyManagerStore.isPackInstalled(pack.id)) + const startFetchInstalled = async () => { + await comfyManagerStore.refreshInstalledList() + await startFetch() + } + onUnmounted(() => { cleanup() }) @@ -27,7 +32,7 @@ export const useInstalledPacks = (options: UseNodePacksOptions = {}) => { isLoading, isReady, installedPacks: nodePacks, - startFetchInstalled: startFetch, + startFetchInstalled, filterInstalledPack } } diff --git a/src/stores/comfyManagerStore.ts b/src/stores/comfyManagerStore.ts index 06f4b40ca5..0568711f77 100644 --- a/src/stores/comfyManagerStore.ts +++ b/src/stores/comfyManagerStore.ts @@ -213,6 +213,7 @@ export const useComfyManagerStore = defineStore('comfyManager', () => { isPackInstalled: isInstalledPackId, isPackEnabled: isEnabledPackId, getInstalledPackVersion, + refreshInstalledList, // Pack actions installPack,