Repository navigation
[backport cloud/1.54] fix: resolve real LGraphNode for insert_workflow node ids in locator/callback path (#18616) - #18618
Conversation
…callback path Follow-up to #18604, which fixed the *execution-id* path (createNodeExecutionId/executionIdFromState) for comfy-multi-player's insert_workflow remapped node ids (insert:<opId>:root:node:<originalId>, PM-1580), but left the *locator-id* path unfixed: - createNodeLocatorId/locatorIdFromState rejected any colon in a root-level local id, so getHostNode (processedWidgetRenderModel.ts) resolved no live LGraphNode for these nodes. resolveLiveWidgetContext then returned no `live` context, so createWidgetUpdateHandler still updated the stored widget value but silently skipped widget.callback. - getNodeByLocatorId's parse side had the same rejection, so even a correctly-encoded leaf locator id could not be resolved back to a node. Added createLeafNodeLocatorId, mirroring createLeafNodeExecutionId: for a root-level id (no real subgraph nesting) it keeps a colon-bearing id whole instead of rejecting it, while a genuinely subgraph-nested id still goes through the strict, delimiter-aware path unchanged. Wired it into locatorIdFromState and widgetNodeLocatorId (the promoted-widget preview locator), and gave getNodeByLocatorId a matching leaf-tolerant fallback so the encode and decode sides agree. Test plan: - createLeafNodeLocatorId unit tests in nodeIdentification.test.ts (ordinary id, colon-bearing root id, still-strict subgraph-nested id, empty id) - locatorIdFromState regression tests in graphTraversalUtil.test.ts (root id, subgraph id, colon-bearing root id, no regression for a real subgraph-owned colon-bearing id) - Widget-callback regression test in useProcessedWidgets.test.ts asserting the live widget.callback actually fires (not just that the stored value updates) for a colon-bearing node id - Confirmed every new assertion fails on the pre-fix code and passes with the fix (git stash red/green check) - `pnpm vitest run` on all touched/related suites: nodeIdentification, graphTraversalUtil, all of vueNodes, all of workbench/extensions/agent/crdt (161 files, 2218 passed) - `vue-tsc --noEmit` clean - `eslint` and `oxfmt --check` clean on touched files
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1941 passed, 0 failed · 2 flaky📊 Browser Reports
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## cloud/1.54 #18618 +/- ##
=============================================
Coverage ? 78.71%
=============================================
Files ? 2015
Lines ? 111654
Branches ? 31610
=============================================
Hits ? 87893
Misses ? 23581
Partials ? 180
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…w node ids in locator/callback path (#18616) (#18618) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1790058330774449)_ Backport of #18616 to `cloud/1.54`. Manual cherry-pick, same approach as #18608: `cloud/1.54` now has #18604's execution-id fix (via #18608), and #18616 is the follow-up that fixes the *sibling* locator-id path (`createNodeLocatorId`/`locatorIdFromState`/`getNodeByLocatorId`), used to resolve the live `LGraphNode` for widget callback dispatch and navigation, for the same colon-bearing `insert_workflow` node ids. ## Before Moving a widget on an `insert_workflow`-materialized node (comfy-multi-player, PM-1580) updates the widget's stored value, but the underlying node's `widget.callback` — which drives dependent UI, control-after-generate, dynamic input wiring, etc. — never fires, because `createNodeLocatorId` rejected the colon-bearing id and `getHostNode` resolved no live `LGraphNode`. The same path also silently broke "Enter Subgraph" navigation and promoted-widget preview locator ids for these nodes. ## After `createLeafNodeLocatorId` (mirroring `createLeafNodeExecutionId` from #18604) keeps a root-level colon-bearing id whole instead of rejecting it, while a genuinely subgraph-nested id still goes through the strict, delimiter-aware path unchanged. `locatorIdFromState`, `getNodeByLocatorId`, and the promoted-widget preview locator (`widgetNodeLocatorId`) now agree on this leaf-tolerant encoding/decoding, so `getHostNode` resolves the real `LGraphNode` and `live.widget.callback` fires normally. ## Cherry-pick details - Source commit: 5d85b04 (single self-contained commit from #18616, `claude/fix-node-locator-id-colon-rejection`) - `git cherry-pick -m 1` applied cleanly onto `cloud/1.54` (post-#18608) — no conflicts, since `nodeIdentification.ts`, `graphTraversalUtil.ts`, and `processedWidgetRenderModel.ts` already had #18604/#18608's sibling execution-id fix in place. - Committer identity normalized to `claude[bot]` (author was already `claude[bot]`; no AI co-author trailer was present in the original commit body, so none needed stripping). ## Testing - `pnpm vitest run` on `nodeIdentification.test.ts`, `graphTraversalUtil.test.ts`, and `useProcessedWidgets.test.ts` (which exercises `processedWidgetRenderModel.ts`'s `getHostNode`) against `cloud/1.54`'s actual code — 186 tests passed. - `vue-tsc --noEmit` — clean. - `eslint` and `oxfmt --check` on all 6 touched files — clean. Ref: #18616 (source PR, still open on `main` at cherry-pick time but CI-green and single-commit) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01UqyourCBfi97xzpBx2W7oY --- _Generated by [Claude Code](https://claude.ai/code/session_01UqyourCBfi97xzpBx2W7oY)_ (cherry picked from commit 0ec045e)
Requested by Christian Byrne · Slack thread
Backport of #18616 to
cloud/1.54.Manual cherry-pick, same approach as #18608:
cloud/1.54now has #18604's execution-id fix (via #18608), and #18616 is the follow-up that fixes the sibling locator-id path (createNodeLocatorId/locatorIdFromState/getNodeByLocatorId), used to resolve the liveLGraphNodefor widget callback dispatch and navigation, for the same colon-bearinginsert_workflownode ids.Before
Moving a widget on an
insert_workflow-materialized node (comfy-multi-player, PM-1580) updates the widget's stored value, but the underlying node'swidget.callback— which drives dependent UI, control-after-generate, dynamic input wiring, etc. — never fires, becausecreateNodeLocatorIdrejected the colon-bearing id andgetHostNoderesolved no liveLGraphNode. The same path also silently broke "Enter Subgraph" navigation and promoted-widget preview locator ids for these nodes.After
createLeafNodeLocatorId(mirroringcreateLeafNodeExecutionIdfrom #18604) keeps a root-level colon-bearing id whole instead of rejecting it, while a genuinely subgraph-nested id still goes through the strict, delimiter-aware path unchanged.locatorIdFromState,getNodeByLocatorId, and the promoted-widget preview locator (widgetNodeLocatorId) now agree on this leaf-tolerant encoding/decoding, sogetHostNoderesolves the realLGraphNodeandlive.widget.callbackfires normally.Cherry-pick details
claude/fix-node-locator-id-colon-rejection)git cherry-pick -m 1applied cleanly ontocloud/1.54(post-[backport cloud/1.54] fix: insert_workflow nodes still render no widgets when execId derivation fails (PM-1580 follow-up) #18608) — no conflicts, sincenodeIdentification.ts,graphTraversalUtil.ts, andprocessedWidgetRenderModel.tsalready had fix: insert_workflow nodes still render no widgets when execId derivation fails (PM-1580 follow-up) #18604/[backport cloud/1.54] fix: insert_workflow nodes still render no widgets when execId derivation fails (PM-1580 follow-up) #18608's sibling execution-id fix in place.claude[bot](author was alreadyclaude[bot]; no AI co-author trailer was present in the original commit body, so none needed stripping).Testing
pnpm vitest runonnodeIdentification.test.ts,graphTraversalUtil.test.ts, anduseProcessedWidgets.test.ts(which exercisesprocessedWidgetRenderModel.ts'sgetHostNode) againstcloud/1.54's actual code — 186 tests passed.vue-tsc --noEmit— clean.eslintandoxfmt --checkon all 6 touched files — clean.Ref: #18616 (source PR, still open on
mainat cherry-pick time but CI-green and single-commit)🤖 Generated with Claude Code
https://claude.ai/code/session_01UqyourCBfi97xzpBx2W7oY
Generated by Claude Code