[backport core/1.41] fix: prevent non-widget inputs on nested subgraphs from appearing as button widgets (#9542)#9563
Merged
christian-byrne merged 1 commit intocore/1.41from Mar 8, 2026
Conversation
…button widgets (#9542) ## Summary Fix non-widget inputs on nested subgraphs appearing twice — once as slots and once as unresolved button widgets. ## Changes - **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. ## Review Focus `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>
🎭 Playwright: ✅ 554 passed, 0 failed · 3 flaky📊 Browser Reports
|
🎨 Storybook: ✅ Built — View Storybook |
Contributor
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
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 |
⚡ Performance ReportNo baseline found — showing absolute values.
Raw data{
"timestamp": "2026-03-08T02:16:36.565Z",
"gitSha": "18dec31fe9f61250dbff15cdd1373da7ec5837d5",
"branch": "backport-9542-to-core-1.41",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2055.802000000085,
"styleRecalcs": 125,
"styleRecalcDurationMs": 34.212,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 596.234,
"heapDeltaBytes": -3288024
},
{
"name": "canvas-idle",
"durationMs": 2051.806000000056,
"styleRecalcs": 126,
"styleRecalcDurationMs": 34.403,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 645.881,
"heapDeltaBytes": -3888296
},
{
"name": "canvas-idle",
"durationMs": 2069.14299999994,
"styleRecalcs": 125,
"styleRecalcDurationMs": 30.162,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 590.0730000000001,
"heapDeltaBytes": -2957636
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2179.9559999999474,
"styleRecalcs": 194,
"styleRecalcDurationMs": 80.07300000000001,
"layouts": 12,
"layoutDurationMs": 4.489,
"taskDurationMs": 1200.9080000000001,
"heapDeltaBytes": -2979380
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2168.419999999969,
"styleRecalcs": 192,
"styleRecalcDurationMs": 77.666,
"layouts": 12,
"layoutDurationMs": 4.5089999999999995,
"taskDurationMs": 1165.396,
"heapDeltaBytes": -3531940
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2155.509000000052,
"styleRecalcs": 196,
"styleRecalcDurationMs": 83.04299999999999,
"layouts": 13,
"layoutDurationMs": 4.805999999999999,
"taskDurationMs": 1174.6750000000002,
"heapDeltaBytes": -2868660
},
{
"name": "dom-widget-clipping",
"durationMs": 714.8310000000038,
"styleRecalcs": 51,
"styleRecalcDurationMs": 17.383,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 461.45599999999996,
"heapDeltaBytes": 6843260
},
{
"name": "dom-widget-clipping",
"durationMs": 699.1850000000568,
"styleRecalcs": 50,
"styleRecalcDurationMs": 17.203,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 441.414,
"heapDeltaBytes": 7845328
},
{
"name": "dom-widget-clipping",
"durationMs": 735.5079999999816,
"styleRecalcs": 51,
"styleRecalcDurationMs": 18.44,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 453.39300000000003,
"heapDeltaBytes": 7864116
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 763.7159999999312,
"styleRecalcs": 85,
"styleRecalcDurationMs": 24.566000000000003,
"layouts": 1,
"layoutDurationMs": 0.20299999999999996,
"taskDurationMs": 540.0350000000001,
"heapDeltaBytes": -7952036
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 776.1419999999362,
"styleRecalcs": 86,
"styleRecalcDurationMs": 27.412,
"layouts": 1,
"layoutDurationMs": 0.307,
"taskDurationMs": 575.533,
"heapDeltaBytes": -7667028
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 810.2709999999433,
"styleRecalcs": 86,
"styleRecalcDurationMs": 23.203999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 562.3009999999999,
"heapDeltaBytes": -8427216
},
{
"name": "subgraph-idle",
"durationMs": 2015.2669999999944,
"styleRecalcs": 122,
"styleRecalcDurationMs": 30.252,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 550.581,
"heapDeltaBytes": -2819624
},
{
"name": "subgraph-idle",
"durationMs": 2015.0220000000445,
"styleRecalcs": 122,
"styleRecalcDurationMs": 31.375,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 570.8519999999999,
"heapDeltaBytes": -4163844
},
{
"name": "subgraph-idle",
"durationMs": 2047.6820000000089,
"styleRecalcs": 126,
"styleRecalcDurationMs": 37.949,
"layouts": 1,
"layoutDurationMs": 0.29699999999999993,
"taskDurationMs": 599.4159999999999,
"heapDeltaBytes": -2751068
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1905.889000000002,
"styleRecalcs": 169,
"styleRecalcDurationMs": 73.35600000000001,
"layouts": 17,
"layoutDurationMs": 5.686,
"taskDurationMs": 1070.839,
"heapDeltaBytes": -4744552
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 2077.83100000006,
"styleRecalcs": 178,
"styleRecalcDurationMs": 76.099,
"layouts": 16,
"layoutDurationMs": 5.28,
"taskDurationMs": 1273.7359999999999,
"heapDeltaBytes": -5482688
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 2061.6059999999834,
"styleRecalcs": 176,
"styleRecalcDurationMs": 72.02499999999999,
"layouts": 16,
"layoutDurationMs": 4.909,
"taskDurationMs": 1256.6430000000003,
"heapDeltaBytes": -5819972
}
]
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #9542 to core/1.41.
Cherry-pick of merge commit 8a5bcde applied cleanly.
Original PR: #9542
Pipeline ticket: 15e1f241-efaa-4fe5-88ca-4ccc7bfb3345
┆Issue is synchronized with this Notion page by Unito