[backport cloud/1.38] [bugfix] Fix manager missing node tab with shared composable (#8411)

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 <jin12cc@gmail.com>
This commit is contained in:
Comfy Org PR Bot
2026-01-29 17:05:20 +09:00
committed by GitHub
parent 3060423e27
commit 0466f16b89

View File

@@ -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)