Skip to content

[backport cloud/1.54] fix: resolve real LGraphNode for insert_workflow node ids in locator/callback path (#18616) - #18618

Merged
christian-byrne merged 1 commit into
cloud/1.54from
backport-18616-to-cloud-1.54
Sep 23, 2026
Merged

christian-byrne merged 1 commit into
cloud/1.54from
backport-18616-to-cloud-1.54

Conversation

@claude

@claude claude Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Requested by Christian Byrne · Slack thread

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

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.ai/code/session_01UqyourCBfi97xzpBx2W7oY


Generated by Claude Code

…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
@claude
claude Bot requested a review from a team as a code owner September 23, 2026 17:38
@vercel

vercel Bot commented Sep 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
billing-web Ignored Ignored Sep 23, 2026 5:38pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (2)
  • [release]
  • [backport

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 3113d437-2e3f-411c-847a-0705a811e013

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/23/2026, 05:40:46 PM UTC

Links

🎭 Playwright: ✅ 1941 passed, 0 failed · 2 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1920 / ❌ 0 / ⚠️ 2 / ⏭️ 13)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

@christian-byrne
christian-byrne merged commit 0ec045e into cloud/1.54 Sep 23, 2026
83 checks passed
@christian-byrne
christian-byrne deleted the backport-18616-to-cloud-1.54 branch September 23, 2026 17:43
@github-actions github-actions Bot added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Sep 23, 2026
@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

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           
Flag Coverage Δ
unit 78.71% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...vueNodes/composables/processedWidgetRenderModel.ts 93.12% <100.00%> (ø)
src/types/nodeIdentification.ts 100.00% <100.00%> (ø)
src/utils/graphTraversalUtil.ts 97.94% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

CodeJuggernaut pushed a commit that referenced this pull request Sep 23, 2026
…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)
@DrJKL DrJKL added agent Comfy Agent product, integration, tests or product documentation agent-backport Agent changes targeting a stable cloud/core release branch agent-crdt Agent document synchronization, graph projection or CRDT operations agent-test-unit Touches Agent-related unit/component tests or their support labels Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Comfy Agent product, integration, tests or product documentation agent-backport Agent changes targeting a stable cloud/core release branch agent-crdt Agent document synchronization, graph projection or CRDT operations agent-test-unit Touches Agent-related unit/component tests or their support risk:xhigh PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants