From b61029b9da815991c883c78b4c614a5b97028805 Mon Sep 17 00:00:00 2001 From: Jin Yi Date: Thu, 12 Mar 2026 13:40:29 +0900 Subject: [PATCH] fix: show correct empty state on Missing tab instead of misleading registry error (#9640) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Show tab-specific empty state messages instead of a misleading registry connection error on tabs that don't depend on the Manager API. ## Changes - **What**: Scoped `comfyManagerStore.error` to only affect tabs that actually use the Manager API (AllInstalled, UpdateAvailable, Conflicting). Missing and Workflow tabs use the registry directly, so the Manager API error is irrelevant to them. Previously, any prior Manager API failure would cause `"Error connecting to the Comfy Node Registry"` to appear on the Missing tab even when there are simply no missing nodes. ## Review Focus The `isManagerErrorRelevant` computed only shows the error for Manager API-dependent tabs. Verify that AllInstalled/UpdateAvailable/Conflicting still correctly show the error when Manager API fails. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9640-fix-show-correct-empty-state-on-Missing-tab-instead-of-misleading-registry-error-31e6d73d365081868da1d226a9bb5fdc) by [Unito](https://www.unito.io) --- .../components/manager/ManagerDialog.vue | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/workbench/extensions/manager/components/manager/ManagerDialog.vue b/src/workbench/extensions/manager/components/manager/ManagerDialog.vue index 1dbc604509..ef5b5928d9 100644 --- a/src/workbench/extensions/manager/components/manager/ManagerDialog.vue +++ b/src/workbench/extensions/manager/components/manager/ManagerDialog.vue @@ -402,7 +402,7 @@ const isUnresolvedTab = computed( ) // Map of tab IDs to their empty state i18n key suffixes -const tabEmptyStateKeys: Partial> = { +const tabEmptyStateKeys: Record = { [ManagerTab.AllInstalled]: 'allInstalled', [ManagerTab.UpdateAvailable]: 'updateAvailable', [ManagerTab.Conflicting]: 'conflicting', @@ -410,12 +410,27 @@ const tabEmptyStateKeys: Partial> = { [ManagerTab.Missing]: 'missing' } +const managerApiDependentTabs = new Set([ + ManagerTab.AllInstalled, + ManagerTab.UpdateAvailable, + ManagerTab.Conflicting, + ManagerTab.NotInstalled, + ManagerTab.Missing +]) + +const isManagerErrorRelevant = computed(() => { + const tabId = selectedTab.value?.id + return ( + !!comfyManagerStore.error && !!tabId && managerApiDependentTabs.has(tabId) + ) +}) + // Empty state messages based on current tab and search state const emptyStateTitle = computed(() => { - if (comfyManagerStore.error) return t('manager.errorConnecting') + if (isManagerErrorRelevant.value) return t('manager.errorConnecting') if (searchQuery.value) return t('manager.noResultsFound') - const tabId = selectedTab.value?.id as ManagerTab | undefined + const tabId = selectedTab.value?.id const emptyStateKey = tabId ? tabEmptyStateKeys[tabId] : undefined return emptyStateKey @@ -424,7 +439,7 @@ const emptyStateTitle = computed(() => { }) const emptyStateMessage = computed(() => { - if (comfyManagerStore.error) return t('manager.tryAgainLater') + if (isManagerErrorRelevant.value) return t('manager.tryAgainLater') if (searchQuery.value) { const baseMessage = t('manager.tryDifferentSearch') if (isLegacyManagerSearch.value) { @@ -433,7 +448,7 @@ const emptyStateMessage = computed(() => { return baseMessage } - const tabId = selectedTab.value?.id as ManagerTab | undefined + const tabId = selectedTab.value?.id const emptyStateKey = tabId ? tabEmptyStateKeys[tabId] : undefined return emptyStateKey