mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 00:50:01 +00:00
fix: resolve bookmark lookup for subgraph blueprints (#9057)
## Summary Bookmarked subgraph blueprint nodes were not appearing in the favorites tree because `buildBookmarkTree` looked up nodes only in `nodeDefsByName`, which excludes subgraph blueprints. ## Changes - **What**: Added `allNodeDefsByName` computed in `nodeDefStore` that includes both regular nodes and subgraph blueprints. Updated `nodeBookmarkStore.buildBookmarkTree` to use it for bookmark resolution. ## Review Focus - `allNodeDefsByName` iterates over `nodeDefs` (which merges `subgraphBlueprints` + `nodeDefsByName`). Confirm this doesn't introduce performance concerns for large node sets. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9057-fix-resolve-bookmark-lookup-for-subgraph-blueprints-30e6d73d365081259bcae9d0c197de43) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -371,6 +371,14 @@ export const useNodeDefStore = defineStore('nodeDef', () => {
|
||||
}
|
||||
return types
|
||||
})
|
||||
const allNodeDefsByName = computed(() => {
|
||||
const map: Record<string, ComfyNodeDefImpl> = {}
|
||||
for (const nodeDef of nodeDefs.value) {
|
||||
map[nodeDef.name] = nodeDef
|
||||
}
|
||||
return map
|
||||
})
|
||||
|
||||
const visibleNodeDefs = computed(() => {
|
||||
return nodeDefs.value.filter((nodeDef) =>
|
||||
nodeDefFilters.value.every((filter) => filter.predicate(nodeDef))
|
||||
@@ -496,6 +504,7 @@ export const useNodeDefStore = defineStore('nodeDef', () => {
|
||||
return {
|
||||
nodeDefsByName,
|
||||
nodeDefsByDisplayName,
|
||||
allNodeDefsByName,
|
||||
showDeprecated,
|
||||
showExperimental,
|
||||
showDevOnly,
|
||||
|
||||
Reference in New Issue
Block a user