[backport core/1.40] fix: prevent non-widget inputs on nested subgraphs from appearing as button widgets (#9542)#9581
Conversation
…button widgets (#9542) Fix non-widget inputs on nested subgraphs appearing twice — once as slots and once as unresolved button widgets. - **What**: Add `getTargetWidget()` guard in the `isSubgraphNode()` branch of `resolveSubgraphInputTarget`, matching the existing check for non-subgraph nodes. Non-widget inputs (e.g. AUDIO, IMAGE) now return `undefined` instead of a bogus promotion entry. `resolveSubgraphInputTarget` had an asymmetry: the non-subgraph branch checked `getTargetWidget()` before returning, but the `isSubgraphNode()` branch returned unconditionally for every input. For nested subgraphs where non-widget slots are linked through to inner SubgraphNode inputs, this created `PromotedWidgetView` entries that failed `resolveDeepest()` (falling back to `type: 'button'`), while the inputs also rendered as normal slot circles since `input.widget` was never set by `_resolveInputWidget` (which correctly skipped them). ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9542-fix-prevent-non-widget-inputs-on-nested-subgraphs-from-appearing-as-button-widgets-31c6d73d3650816387c3f97f0385e762) by [Unito](https://www.unito.io) --------- Co-authored-by: Amp <amp@ampcode.com>
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 03/08/2026, 02:31:59 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
|
Playwright: 🕵🏻 0 passed, 0 failed 📊 Browser Reports
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Backport of #9542 to core/1.40.
Conflict: resolveSubgraphInputTarget.ts was modify/delete — kept as new file (the fix).
Original PR: #9542
Pipeline ticket: 15e1f241-efaa-4fe5-88ca-4ccc7bfb3345