Files
ComfyUI_frontend/docs/extensions/node-id-migration.md
Alexander Brown b4ae6344d7 Brand local node IDs (#13085)
## Summary

Adds a branded local `NodeId` helper and starts separating local node
identity from serialized workflow IDs.

## Changes

- **What**: Adds central `NodeId` parsing/branding helpers, migrates
nearby widget identity types, keeps queue results at the serialized
boundary, and removes misleading workflow `NodeId` usage from execution
error maps.

## Review Focus

Check that the first migration slice keeps serialized/API IDs as raw
`number | string` while local UI/store IDs use the branded string type.

## Caveat

`SUBGRAPH_INPUT_ID` and `SUBGRAPH_OUTPUT_ID` are now branded local
`NodeId` string values internally instead of numeric sentinels.
Reviewers should double-check extension compatibility for callers that
import `Constants` and compare those values numerically.

## Screenshots (if applicable)

N/A

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: AustinMroz <austin@comfy.org>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 22:54:04 +00:00

16 lines
648 B
Markdown

# Node ID Migration Notes
ComfyUI frontend now normalizes local node IDs to the branded `NodeId` string
type at internal boundaries. Serialized workflows and API payloads may still
contain numeric IDs, but litegraph node and link fields should be treated as
strings after they enter the frontend.
Extension authors should avoid numeric comparisons against node IDs. In
particular, subgraph boundary sentinels are exposed as branded string IDs:
- `SUBGRAPH_INPUT_ID` serializes from `-10`
- `SUBGRAPH_OUTPUT_ID` serializes from `-20`
Use the exported constants where available, or normalize both sides to strings
before comparing legacy values.