mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 00:50:01 +00:00
fix: display Blueprint badge instead of UUID for global subgraph blueprints (#9048)
## Problem The node search box badge displays long UUID strings (e.g., `comfyui-ltx-video-0fbc55c6-...`) for global/core blueprints, while user-created subgraphs correctly show "Blueprint" as the badge.  ## Root Cause In `loadGlobalBlueprint`, global blueprints set `python_module: v.info.node_pack` which contains UUID-like strings. The `getNodeSource()` function processes `python_module` to determine badge text, but UUID strings don't match any known pattern, resulting in ugly badge text. ## Solution - Change global blueprints to use `python_module: 'blueprint'` so they display "Blueprint" badge like user blueprints - Add `isGlobal` boolean flag to `ComfyNodeDef` schema to distinguish global from user blueprints - Update `isGlobalBlueprint()` to check the new `isGlobal` flag instead of `python_module !== 'blueprint'` ## Changes | File | Change | |------|--------| | `src/schemas/nodeDefSchema.ts` | Add optional `isGlobal?: boolean` field | | `src/stores/nodeDefStore.ts` | Add `isGlobal` field to `ComfyNodeDefImpl` class | | `src/stores/subgraphStore.ts` | Use `python_module: 'blueprint'` + `isGlobal: true` for global blueprints; update `isGlobalBlueprint()` check | ## Testing - [x] Existing unit tests pass - [x] TypeScript compiles without errors - [x] Lint passes Fixes COM-15168 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9048-fix-display-Blueprint-badge-instead-of-UUID-for-global-subgraph-blueprints-30e6d73d3650813cac27e02f8f2088df) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -89,6 +89,8 @@ export class ComfyNodeDefImpl
|
||||
readonly search_aliases?: string[]
|
||||
/** Category for the Essentials tab. If set, the node appears in Essentials. */
|
||||
readonly essentials_category?: string
|
||||
/** Whether the blueprint is a global/installed blueprint (not user-created). */
|
||||
readonly isGlobal?: boolean
|
||||
|
||||
// V2 fields
|
||||
readonly inputs: Record<string, InputSpecV2>
|
||||
@@ -165,6 +167,7 @@ export class ComfyNodeDefImpl
|
||||
obj.name,
|
||||
obj.essentials_category
|
||||
)
|
||||
this.isGlobal = obj.isGlobal
|
||||
|
||||
// Initialize V2 fields
|
||||
const defV2 = transformNodeDefV1ToV2(obj)
|
||||
|
||||
Reference in New Issue
Block a user