mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-12 00:42:03 +00:00
## Summary Replace `app.rootGraph.getNodeById()` with `resolveNode()` so node lookups search subgraphs, fixing broken image copy/paste and display for nodes inside subgraphs. ## Changes - **What**: Updated 7 call sites across 5 files to use `resolveNode()` from `litegraphUtil.ts` instead of `app.rootGraph.getNodeById()`. The `resolveNode` function already existed and searches both the root graph and all subgraphs. Added a unit test verifying subgraph node resolution in `nodeOutputStore`. ## Review Focus The fix is mechanical — each call site simply swaps `app.rootGraph?.getNodeById(id)` for `resolveNode(id)`. The `resolveNode` utility iterates `graph.subgraphs` if the node is not found in the root graph. Fixes #9993 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10009-fix-resolve-nodes-in-subgraphs-for-image-copy-paste-and-display-3256d73d3650814f9467c53999f5d755) by [Unito](https://www.unito.io)