Skip to content

fix: subgraph output slot labels not updating in v2 renderer - #9266

Merged
christian-byrne merged 4 commits into
Comfy-Org:mainfrom
artokun:fix/subgraph-output-slot-label
Mar 13, 2026
Merged

christian-byrne merged 4 commits into
Comfy-Org:mainfrom
artokun:fix/subgraph-output-slot-label

Conversation

@artokun

@artokun artokun commented Feb 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Custom names set on subgraph output nodes are ignored in the v2 renderer — it always shows the data type name (e.g. "texts") instead of the user-defined label. Works correctly in v1.

Changes

  • What: Made outputs in extractVueNodeData reactive via shallowReactive + defineProperty (matching the existing inputs pattern). Added a node:slot-label:changed graph trigger that SubgraphNode fires when input/output labels are renamed, so the Vue layer picks up the change.

Review Focus

  • The outputs reactivity mirrors inputs exactly — same shallowReactive + setter pattern. The new trigger event forces shallowReactive to detect the deep property change by re-assigning the array.
  • Also handles input label renames for consistency, even though the current bug report is output-specific.

Screenshots

v1 — output correctly shows custom label "output_text":
Screenshot 2026-02-26 at 4 43 00 PM

v2 before fix — output shows type name "texts" instead of custom label:
Screenshot 2026-02-26 at 4 43 30 PM

v2 after fix — output correctly shows "output_text":
Screenshot 2026-02-26 at 5 14 44 PM

┆Issue is synchronized with this Notion page by Unito

@artokun
artokun requested a review from a team as a code owner February 27, 2026 01:14
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Feb 27, 2026
@coderabbitai

coderabbitai Bot commented Feb 27, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 399d9e9e-2ffd-4d53-ae26-ab90dd52d5af

📥 Commits

Reviewing files that changed from the base of the PR and between 1118595 and d02b4a3.

📒 Files selected for processing (4)
  • src/composables/graph/useGraphNodeManager.test.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.ts
  • src/lib/litegraph/src/types/graphTriggers.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/composables/graph/useGraphNodeManager.test.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/lib/litegraph/src/types/graphTriggers.ts

📝 Walkthrough

Walkthrough

Introduces reactive node outputs (shallowReactive) and a new 'node:slot-label:changed' graph event; SubgraphNode emits the event when slot labels are renamed; useGraphNodeManager handles the trigger to refresh node.outputs; duplicated test added to verify label reactivity.

Changes

Cohort / File(s) Summary
Test Coverage
src/composables/graph/useGraphNodeManager.test.ts
Added "Subgraph output slot label reactivity" test verifying slot label updates via node:slot-label:changed are reflected in reactive outputs; the test block was inserted twice (duplicate).
Core Reactive Outputs Implementation
src/composables/graph/useGraphNodeManager.ts
Introduced reactiveOutputs via shallowReactive, proxied node.outputs with getter/setter to shallow-replace contents, exposed VueNodeData.outputs as the reactive array, and added a trigger handler for node:slot-label:changed to refresh node inputs/outputs.
Event Type System
src/lib/litegraph/src/types/graphTriggers.ts
Added NodeSlotLabelChangedEvent (type: 'node:slot-label:changed', nodeId, slotType?) and included it in the LGraphTriggerEvent union.
Graph Trigger Validation
src/lib/litegraph/src/LGraph.ts
Added 'node:slot-label:changed' to validEventTypes so the graph will accept and route this trigger.
SubgraphNode Event Emission
src/lib/litegraph/src/subgraph/SubgraphNode.ts
After renaming input/output slot labels, emit this.graph?.trigger('node:slot-label:changed', { nodeId: this.id, slotType: ... }) to notify the graph of the change.

Sequence Diagram

sequenceDiagram
    participant User as "User"
    participant SubgraphNode as "SubgraphNode"
    participant LGraph as "LGraph"
    participant Manager as "useGraphNodeManager"
    participant VueReactivity as "VueReactivity"

    User->>SubgraphNode: Rename slot label
    SubgraphNode->>LGraph: trigger('node:slot-label:changed', { nodeId, slotType })
    LGraph->>Manager: onTrigger dispatch
    Manager->>Manager: locate nodeRef, reassign inputs/outputs (shallow replace)
    Manager->>VueReactivity: update reactiveOutputs array (shallowReactive)
    VueReactivity->>User: UI reflects updated slot label
Loading

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I nibbled labels, soft and bright,

A gentle trigger in the night.
Reactive hops woke every node,
Tiny changes, spreading code.
Hooray — the graph now hums in light!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main fix: making subgraph output slot labels update properly in the v2 renderer, which directly aligns with the core problem and solution presented in the PR.
Description check ✅ Passed The description covers all required template sections: a clear summary of the problem, detailed changes explaining the reactivity implementation, review focus highlighting design decisions, and supporting screenshots demonstrating the fix.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

@github-actions

github-actions Bot commented Feb 27, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: loading Building...

@github-actions

github-actions Bot commented Feb 27, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ⏳ Running...

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/lib/litegraph/src/subgraph/SubgraphNode.ts`:
- Around line 222-224: The event 'node:slot-label:changed' emitted from
SubgraphNode (see the trigger call) is fired for both input and output label
renames, but the handler in useGraphNodeManager.ts (the
'node:slot-label:changed' listener around the nodeRef.outputs refresh) only
reassigns nodeRef.outputs; update that listener to also refresh nodeRef.inputs
(e.g., reassign nodeRef.inputs = [...nodeRef.inputs] or otherwise force Vue
reactivity) so input label changes produce the same reactive update as outputs.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 367d967 and 11640ea.

📒 Files selected for processing (5)
  • src/composables/graph/useGraphNodeManager.test.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.ts
  • src/lib/litegraph/src/types/graphTriggers.ts

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Mar 12, 2026

@artokun artokun left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulled/rebased and pushed d02b4a3.

Addressed the scoped nits here: explicit descriptors, input coverage, slotType on the slot-label trigger, and a no-throw guard test. I left the onTrigger switch dedupe note alone for scope.

artokun added 3 commits March 12, 2026 16:22
Custom names set on subgraph output nodes were ignored in the v2
renderer, always showing the data type name instead. The outputs
array was a one-time snapshot that never picked up label changes.

Made outputs reactive (matching inputs) and added a slot-label
trigger so the Vue layer re-renders when labels change.
Addresses CodeRabbit feedback — the handler was only refreshing
outputs but the trigger fires for input renames too.
@artokun
artokun force-pushed the fix/subgraph-output-slot-label branch from d02b4a3 to fedf8a1 Compare March 12, 2026 23:23
@artokun
artokun requested a review from christian-byrne March 12, 2026 23:25

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all feedback addressed cleanly - slotType discriminant, explicit descriptors, and test coverage all look good

@christian-byrne
christian-byrne merged commit 5640eb7 into Comfy-Org:main Mar 13, 2026
33 checks passed
@christian-byrne christian-byrne added cloud/1.41 needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch labels Mar 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Backport to cloud/1.41 failed

Reason: Merge conflicts detected during cherry-pick of 5640eb7

📄 Conflicting files
src/lib/litegraph/src/subgraph/SubgraphNode.ts
🤖 Prompt for AI Agents
Backport PR #9266 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/9266) to cloud/1.41.
Cherry-pick merge commit 5640eb7d927feed42526f0f751b840c752ce37c4 onto new branch
backport-9266-to-cloud-1.41 from origin/cloud/1.41.
Resolve conflicts in: src/lib/litegraph/src/subgraph/SubgraphNode.ts .
For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport cloud/1.41] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @artokun

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Backport to cloud/1.41 failed

Reason: Merge conflicts detected during cherry-pick of 5640eb7

📄 Conflicting files
src/lib/litegraph/src/subgraph/SubgraphNode.ts
🤖 Prompt for AI Agents
Backport PR #9266 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/9266) to cloud/1.41.
Cherry-pick merge commit 5640eb7d927feed42526f0f751b840c752ce37c4 onto new branch
backport-9266-to-cloud-1.41 from origin/cloud/1.41.
Resolve conflicts in: src/lib/litegraph/src/subgraph/SubgraphNode.ts .
For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport cloud/1.41] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @artokun

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Backport to core/1.41 failed

Reason: Merge conflicts detected during cherry-pick of 5640eb7

📄 Conflicting files
src/lib/litegraph/src/subgraph/SubgraphNode.ts
🤖 Prompt for AI Agents
Backport PR #9266 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/9266) to core/1.41.
Cherry-pick merge commit 5640eb7d927feed42526f0f751b840c752ce37c4 onto new branch
backport-9266-to-core-1.41 from origin/core/1.41.
Resolve conflicts in: src/lib/litegraph/src/subgraph/SubgraphNode.ts .
For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport core/1.41] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @artokun

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Backport to cloud/1.41 failed

Reason: Merge conflicts detected during cherry-pick of 5640eb7

📄 Conflicting files
src/lib/litegraph/src/subgraph/SubgraphNode.ts
🤖 Prompt for AI Agents
Backport PR #9266 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/9266) to cloud/1.41.
Cherry-pick merge commit 5640eb7d927feed42526f0f751b840c752ce37c4 onto new branch
backport-9266-to-cloud-1.41 from origin/cloud/1.41.
Resolve conflicts in: src/lib/litegraph/src/subgraph/SubgraphNode.ts .
For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport cloud/1.41] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @artokun

christian-byrne pushed a commit that referenced this pull request Mar 16, 2026
Custom names set on subgraph output nodes are ignored in the v2 renderer
— it always shows the data type name (e.g. "texts") instead of the
user-defined label. Works correctly in v1.

- **What**: Made `outputs` in `extractVueNodeData` reactive via
`shallowReactive` + `defineProperty` (matching the existing `inputs`
pattern). Added a `node:slot-label:changed` graph trigger that
`SubgraphNode` fires when input/output labels are renamed, so the Vue
layer picks up the change.

- The `outputs` reactivity mirrors `inputs` exactly — same
`shallowReactive` + setter pattern. The new trigger event forces
`shallowReactive` to detect the deep property change by re-assigning the
array.
- Also handles input label renames for consistency, even though the
current bug report is output-specific.

**v1 — output correctly shows custom label "output_text":**
<img width="1076" height="628" alt="Screenshot 2026-02-26 at 4 43 00 PM"
src="https://github.com/user-attachments/assets/b4d6ae4c-9970-4d99-a872-4ce1b28522f2"
/>

**v2 before fix — output shows type name "texts" instead of custom
label:**
<img width="808" height="298" alt="Screenshot 2026-02-26 at 4 43 30 PM"
src="https://github.com/user-attachments/assets/cf06aa6c-6d4d-4be9-9bcd-dcc072ed1907"
/>

**v2 after fix — output correctly shows "output_text":**
<img width="1013" height="292" alt="Screenshot 2026-02-26 at 5 14 44 PM"
src="https://github.com/user-attachments/assets/3c43fa9b-0615-4758-bee6-be3481168675"
/>

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-9266-fix-subgraph-output-slot-labels-not-updating-in-v2-renderer-3146d73d365081979327fd775a6ef62b)
by [Unito](https://www.unito.io)
christian-byrne added a commit that referenced this pull request Mar 16, 2026
…n v2 renderer (#9266) (#10053)

Backport of #9266 to cloud/1.41

Co-authored-by: Arthur R Longbottom <art.longbottom.jr@gmail.com>
christian-byrne pushed a commit that referenced this pull request Mar 16, 2026
Custom names set on subgraph output nodes are ignored in the v2 renderer
— it always shows the data type name (e.g. "texts") instead of the
user-defined label. Works correctly in v1.

- **What**: Made `outputs` in `extractVueNodeData` reactive via
`shallowReactive` + `defineProperty` (matching the existing `inputs`
pattern). Added a `node:slot-label:changed` graph trigger that
`SubgraphNode` fires when input/output labels are renamed, so the Vue
layer picks up the change.

- The `outputs` reactivity mirrors `inputs` exactly — same
`shallowReactive` + setter pattern. The new trigger event forces
`shallowReactive` to detect the deep property change by re-assigning the
array.
- Also handles input label renames for consistency, even though the
current bug report is output-specific.

**v1 — output correctly shows custom label "output_text":**
<img width="1076" height="628" alt="Screenshot 2026-02-26 at 4 43 00 PM"
src="https://github.com/user-attachments/assets/b4d6ae4c-9970-4d99-a872-4ce1b28522f2"
/>

**v2 before fix — output shows type name "texts" instead of custom
label:**
<img width="808" height="298" alt="Screenshot 2026-02-26 at 4 43 30 PM"
src="https://github.com/user-attachments/assets/cf06aa6c-6d4d-4be9-9bcd-dcc072ed1907"
/>

**v2 after fix — output correctly shows "output_text":**
<img width="1013" height="292" alt="Screenshot 2026-02-26 at 5 14 44 PM"
src="https://github.com/user-attachments/assets/3c43fa9b-0615-4758-bee6-be3481168675"
/>

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-9266-fix-subgraph-output-slot-labels-not-updating-in-v2-renderer-3146d73d365081979327fd775a6ef62b)
by [Unito](https://www.unito.io)
christian-byrne added a commit that referenced this pull request Mar 16, 2026
… v2 renderer (#9266) (#10059)

Backport of #9266 to core/1.41

Co-authored-by: Arthur R Longbottom <art.longbottom.jr@gmail.com>
@comfy-pr-bot comfy-pr-bot added the released:core PR has been released to core label Mar 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Backport to core/1.41 failed

Reason: Merge conflicts detected during cherry-pick of 5640eb7

📄 Conflicting files
src/composables/graph/useGraphNodeManager.ts
src/lib/litegraph/src/subgraph/SubgraphNode.ts
🤖 Prompt for AI Agents
Backport PR #9266 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/9266) to core/1.41.
Cherry-pick merge commit 5640eb7d927feed42526f0f751b840c752ce37c4 onto new branch
backport-9266-to-core-1.41 from origin/core/1.41.
Resolve conflicts in: src/composables/graph/useGraphNodeManager.ts src/lib/litegraph/src/subgraph/SubgraphNode.ts .
For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport core/1.41] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @artokun

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Backport to cloud/1.41 failed

Reason: Merge conflicts detected during cherry-pick of 5640eb7

📄 Conflicting files
src/composables/graph/useGraphNodeManager.ts
src/lib/litegraph/src/subgraph/SubgraphNode.ts
🤖 Prompt for AI Agents
Backport PR #9266 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/9266) to cloud/1.41.
Cherry-pick merge commit 5640eb7d927feed42526f0f751b840c752ce37c4 onto new branch
backport-9266-to-cloud-1.41 from origin/cloud/1.41.
Resolve conflicts in: src/composables/graph/useGraphNodeManager.ts src/lib/litegraph/src/subgraph/SubgraphNode.ts .
For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport cloud/1.41] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @artokun

@comfy-pr-bot comfy-pr-bot added the released:cloud PR has been released to cloud label Mar 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Backport to core/1.41 failed

Reason: Merge conflicts detected during cherry-pick of 5640eb7

📄 Conflicting files
src/composables/graph/useGraphNodeManager.ts
src/lib/litegraph/src/subgraph/SubgraphNode.ts
🤖 Prompt for AI Agents
Backport PR #9266 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/9266) to core/1.41.
Cherry-pick merge commit 5640eb7d927feed42526f0f751b840c752ce37c4 onto new branch
backport-9266-to-core-1.41 from origin/core/1.41.
Resolve conflicts in: src/composables/graph/useGraphNodeManager.ts src/lib/litegraph/src/subgraph/SubgraphNode.ts .
For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport core/1.41] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @artokun

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Backport to cloud/1.41 failed

Reason: Merge conflicts detected during cherry-pick of 5640eb7

📄 Conflicting files
src/composables/graph/useGraphNodeManager.ts
src/lib/litegraph/src/subgraph/SubgraphNode.ts
🤖 Prompt for AI Agents
Backport PR #9266 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/9266) to cloud/1.41.
Cherry-pick merge commit 5640eb7d927feed42526f0f751b840c752ce37c4 onto new branch
backport-9266-to-cloud-1.41 from origin/cloud/1.41.
Resolve conflicts in: src/composables/graph/useGraphNodeManager.ts src/lib/litegraph/src/subgraph/SubgraphNode.ts .
For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport cloud/1.41] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @artokun

artokun added a commit to artokun/ComfyUI_frontend that referenced this pull request Mar 30, 2026
…rg#9266)

Custom names set on subgraph output nodes are ignored in the v2 renderer
— it always shows the data type name (e.g. "texts") instead of the
user-defined label. Works correctly in v1.

- **What**: Made `outputs` in `extractVueNodeData` reactive via
`shallowReactive` + `defineProperty` (matching the existing `inputs`
pattern). Added a `node:slot-label:changed` graph trigger that
`SubgraphNode` fires when input/output labels are renamed, so the Vue
layer picks up the change.

- The `outputs` reactivity mirrors `inputs` exactly — same
`shallowReactive` + setter pattern. The new trigger event forces
`shallowReactive` to detect the deep property change by re-assigning the
array.
- Also handles input label renames for consistency, even though the
current bug report is output-specific.

**v1 — output correctly shows custom label "output_text":**
<img width="1076" height="628" alt="Screenshot 2026-02-26 at 4 43 00 PM"
src="https://github.com/user-attachments/assets/b4d6ae4c-9970-4d99-a872-4ce1b28522f2"
/>

**v2 before fix — output shows type name "texts" instead of custom
label:**
<img width="808" height="298" alt="Screenshot 2026-02-26 at 4 43 30 PM"
src="https://github.com/user-attachments/assets/cf06aa6c-6d4d-4be9-9bcd-dcc072ed1907"
/>

**v2 after fix — output correctly shows "output_text":**
<img width="1013" height="292" alt="Screenshot 2026-02-26 at 5 14 44 PM"
src="https://github.com/user-attachments/assets/3c43fa9b-0615-4758-bee6-be3481168675"
/>

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-9266-fix-subgraph-output-slot-labels-not-updating-in-v2-renderer-3146d73d365081979327fd775a6ef62b)
by [Unito](https://www.unito.io)
artokun added a commit to artokun/ComfyUI_frontend that referenced this pull request Mar 30, 2026
…rg#9266)

Custom names set on subgraph output nodes are ignored in the v2 renderer
— it always shows the data type name (e.g. "texts") instead of the
user-defined label. Works correctly in v1.

- **What**: Made `outputs` in `extractVueNodeData` reactive via
`shallowReactive` + `defineProperty` (matching the existing `inputs`
pattern). Added a `node:slot-label:changed` graph trigger that
`SubgraphNode` fires when input/output labels are renamed, so the Vue
layer picks up the change.

- The `outputs` reactivity mirrors `inputs` exactly — same
`shallowReactive` + setter pattern. The new trigger event forces
`shallowReactive` to detect the deep property change by re-assigning the
array.
- Also handles input label renames for consistency, even though the
current bug report is output-specific.

**v1 — output correctly shows custom label "output_text":**
<img width="1076" height="628" alt="Screenshot 2026-02-26 at 4 43 00 PM"
src="https://github.com/user-attachments/assets/b4d6ae4c-9970-4d99-a872-4ce1b28522f2"
/>

**v2 before fix — output shows type name "texts" instead of custom
label:**
<img width="808" height="298" alt="Screenshot 2026-02-26 at 4 43 30 PM"
src="https://github.com/user-attachments/assets/cf06aa6c-6d4d-4be9-9bcd-dcc072ed1907"
/>

**v2 after fix — output correctly shows "output_text":**
<img width="1013" height="292" alt="Screenshot 2026-02-26 at 5 14 44 PM"
src="https://github.com/user-attachments/assets/3c43fa9b-0615-4758-bee6-be3481168675"
/>

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-9266-fix-subgraph-output-slot-labels-not-updating-in-v2-renderer-3146d73d365081979327fd775a6ef62b)
by [Unito](https://www.unito.io)
@artokun

artokun commented Mar 30, 2026

Copy link
Copy Markdown
Contributor Author

@DrJKL Backport PRs ready for review:

Both typecheck clean and affected tests pass. Conflicts resolved by keeping target branch versions of extractVueNodeData and _invalidatePromotedViewsCache.

DrJKL pushed a commit that referenced this pull request Mar 30, 2026
… v2 renderer (#10727)

Backport of #9266 to core/1.41.

Cherry-pick of merge commit 5640eb7 with conflict resolution in:
- `useGraphNodeManager.ts` — kept target's `extractVueNodeData` re-call
- `SubgraphNode.ts` — kept target's comment and
`_invalidatePromotedViewsCache`

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-10727-backport-core-1-41-fix-subgraph-output-slot-labels-not-updating-in-v2-renderer-3336d73d3650819494f1f51b89aa2017)
by [Unito](https://www.unito.io)
DrJKL pushed a commit that referenced this pull request Mar 31, 2026
…n v2 renderer (#10728)

Backport of #9266 to cloud/1.41.

Cherry-pick of merge commit 5640eb7 with conflict resolution in:
- `useGraphNodeManager.ts` — kept target's `extractVueNodeData` re-call
- `SubgraphNode.ts` — kept target's comment and
`_invalidatePromotedViewsCache`

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-10728-backport-cloud-1-41-fix-subgraph-output-slot-labels-not-updating-in-v2-renderer-3336d73d365081e587bff11b35972f91)
by [Unito](https://www.unito.io)
dante01yoon pushed a commit that referenced this pull request Jul 27, 2026
## Summary

Custom names set on subgraph output nodes are ignored in the v2 renderer
— it always shows the data type name (e.g. "texts") instead of the
user-defined label. Works correctly in v1.

## Changes

- **What**: Made `outputs` in `extractVueNodeData` reactive via
`shallowReactive` + `defineProperty` (matching the existing `inputs`
pattern). Added a `node:slot-label:changed` graph trigger that
`SubgraphNode` fires when input/output labels are renamed, so the Vue
layer picks up the change.

## Review Focus

- The `outputs` reactivity mirrors `inputs` exactly — same
`shallowReactive` + setter pattern. The new trigger event forces
`shallowReactive` to detect the deep property change by re-assigning the
array.
- Also handles input label renames for consistency, even though the
current bug report is output-specific.

## Screenshots

**v1 — output correctly shows custom label "output_text":**
<img width="1076" height="628" alt="Screenshot 2026-02-26 at 4 43 00 PM"
src="https://github.com/user-attachments/assets/b4d6ae4c-9970-4d99-a872-4ce1b28522f2"
/>

**v2 before fix — output shows type name "texts" instead of custom
label:**
<img width="808" height="298" alt="Screenshot 2026-02-26 at 4 43 30 PM"
src="https://github.com/user-attachments/assets/cf06aa6c-6d4d-4be9-9bcd-dcc072ed1907"
/>

**v2 after fix — output correctly shows "output_text":**
<img width="1013" height="292" alt="Screenshot 2026-02-26 at 5 14 44 PM"
src="https://github.com/user-attachments/assets/3c43fa9b-0615-4758-bee6-be3481168675"
/>

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-9266-fix-subgraph-output-slot-labels-not-updating-in-v2-renderer-3146d73d365081979327fd775a6ef62b)
by [Unito](https://www.unito.io)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch released:cloud PR has been released to cloud released:core PR has been released to core size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants