From 0466f16b896bb4c25ec1e47dc5e824791e47f268 Mon Sep 17 00:00:00 2001 From: Comfy Org PR Bot Date: Thu, 29 Jan 2026 17:05:20 +0900 Subject: [PATCH] [backport cloud/1.38] [bugfix] Fix manager missing node tab with shared composable (#8411) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport of #8409 to `cloud/1.38` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8411-backport-cloud-1-38-bugfix-Fix-manager-missing-node-tab-with-shared-composable-2f76d73d365081b584b8f6134e624d38) by [Unito](https://www.unito.io) Co-authored-by: Jin Yi --- .../manager/composables/nodePack/useWorkflowPacks.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/workbench/extensions/manager/composables/nodePack/useWorkflowPacks.ts b/src/workbench/extensions/manager/composables/nodePack/useWorkflowPacks.ts index e2580ee8de..a56c908ef0 100644 --- a/src/workbench/extensions/manager/composables/nodePack/useWorkflowPacks.ts +++ b/src/workbench/extensions/manager/composables/nodePack/useWorkflowPacks.ts @@ -1,3 +1,4 @@ +import { createSharedComposable } from '@vueuse/core' import { computed, onUnmounted, ref } from 'vue' import type { LGraphNode } from '@/lib/litegraph/src/litegraph' @@ -9,7 +10,6 @@ import { useSystemStatsStore } from '@/stores/systemStatsStore' import type { components } from '@/types/comfyRegistryTypes' import { mapAllNodes } from '@/utils/graphTraversalUtil' import { useNodePacks } from '@/workbench/extensions/manager/composables/nodePack/useNodePacks' -import type { UseNodePacksOptions } from '@/workbench/extensions/manager/types/comfyManagerTypes' type WorkflowPack = { id: @@ -22,9 +22,10 @@ const CORE_NODES_PACK_NAME = 'comfy-core' /** * Handles parsing node pack metadata from nodes on the graph and fetching the - * associated node packs from the registry + * associated node packs from the registry. + * This is a shared singleton composable - all components use the same instance. */ -export const useWorkflowPacks = (options: UseNodePacksOptions = {}) => { +const _useWorkflowPacks = () => { const nodeDefStore = useNodeDefStore() const systemStatsStore = useSystemStatsStore() const { inferPackFromNodeName } = useComfyRegistryStore() @@ -129,7 +130,7 @@ export const useWorkflowPacks = (options: UseNodePacksOptions = {}) => { ) const { startFetch, cleanup, error, isLoading, nodePacks, isReady } = - useNodePacks(workflowPacksIds, options) + useNodePacks(workflowPacksIds) const isIdInWorkflow = (packId: string) => workflowPacksIds.value.includes(packId) @@ -153,3 +154,5 @@ export const useWorkflowPacks = (options: UseNodePacksOptions = {}) => { filterWorkflowPack } } + +export const useWorkflowPacks = createSharedComposable(_useWorkflowPacks)