fix: stop converting defaultInput to forceInput on migration#12279
fix: stop converting defaultInput to forceInput on migration#12279christian-byrne wants to merge 4 commits into
Conversation
The _migrateDefaultInput method set forceInput = true for every optional input with defaultInput, preventing the widget from being created. When users toggled a defaultInput socket back to a widget and saved, the next reload re-applied forceInput, reverting it to a socket-only input. Since frontend 1.16+, widgets and sockets co-exist on every input, so defaultInput no longer needs conversion to forceInput. Remove the assignment while keeping the deprecation warning. Fixes Comfy-Org/ComfyUI#1500
Address CodeRabbit review: - Update defaultInput deprecation message to not recommend forceInput - Add test verifying deprecation warning emission
🎨 Storybook: ✅ Built — View Storybook |
🎭 Playwright: ✅ 1608 passed, 0 failed📊 Browser Reports
|
|
/update-playwright |
|
Updating Playwright Expectations |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRemoved migration behavior that converted ChangesdefaultInput migration behavior
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (6 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
📦 Bundle: 5.35 MB gzip 🔴 +475 BDetailsSummary
Category Glance App Entry Points — 32 kB (baseline 32 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.24 MB (baseline 1.24 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 82.6 kB (baseline 82.6 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed / 2 unchanged Panels & Settings — 526 kB (baseline 526 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 14 unchanged User & Accounts — 17.7 kB (baseline 17.7 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed / 2 unchanged Editors & Dialogs — 112 kB (baseline 112 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 4 added / 4 removed UI Components — 57.9 kB (baseline 57.9 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed / 8 unchanged Data & Services — 3.16 MB (baseline 3.16 MB) • 🔴 +463 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 4 unchanged Utilities & Hooks — 369 kB (baseline 369 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 13 added / 13 removed / 19 unchanged Vendor & Third-Party — 9.94 MB (baseline 9.94 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 9.14 MB (baseline 9.14 MB) • ⚪ 0 BBundles that do not match a named category
Status: 57 added / 57 removed / 85 unchanged ⚡ Performance Report
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-05-14T22:34:23.698Z",
"gitSha": "0de302b5d918b23bd35e9f5687806046aa4dde09",
"branch": "fix/default-input-widget-reload-v2",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2032.2630000000004,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.486999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 465.28700000000003,
"heapDeltaBytes": 20258008,
"heapUsedBytes": 69337140,
"domNodes": -263,
"jsHeapTotalBytes": 19525632,
"scriptDurationMs": 20.330000000000002,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2062.579000000028,
"styleRecalcs": 12,
"styleRecalcDurationMs": 11.908,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 488.78000000000003,
"heapDeltaBytes": 19757900,
"heapUsedBytes": 69578036,
"domNodes": -259,
"jsHeapTotalBytes": 16732160,
"scriptDurationMs": 30.144,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1980.2549999999997,
"styleRecalcs": 76,
"styleRecalcDurationMs": 41.931000000000004,
"layouts": 12,
"layoutDurationMs": 3.5580000000000003,
"taskDurationMs": 924.559,
"heapDeltaBytes": 6836584,
"heapUsedBytes": 55199580,
"domNodes": -267,
"jsHeapTotalBytes": 14807040,
"scriptDurationMs": 137.319,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1934.0640000000349,
"styleRecalcs": 77,
"styleRecalcDurationMs": 42.525,
"layouts": 12,
"layoutDurationMs": 3.606,
"taskDurationMs": 902.8680000000002,
"heapDeltaBytes": -1060188,
"heapUsedBytes": 67750216,
"domNodes": -261,
"jsHeapTotalBytes": 20926464,
"scriptDurationMs": 140.082,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1713.9460000000213,
"styleRecalcs": 31,
"styleRecalcDurationMs": 18.938,
"layouts": 6,
"layoutDurationMs": 0.6230000000000001,
"taskDurationMs": 355.26,
"heapDeltaBytes": 23070332,
"heapUsedBytes": 73149344,
"domNodes": 76,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 22.362999999999996,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1732.5879999999643,
"styleRecalcs": 33,
"styleRecalcDurationMs": 18.938,
"layouts": 6,
"layoutDurationMs": 0.6690000000000002,
"taskDurationMs": 411.71500000000003,
"heapDeltaBytes": -3529316,
"heapUsedBytes": 44870196,
"domNodes": -210,
"jsHeapTotalBytes": 19001344,
"scriptDurationMs": 30.133,
"eventListeners": -120,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 645.2869999999962,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.601,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 390.359,
"heapDeltaBytes": 9142440,
"heapUsedBytes": 57256928,
"domNodes": 16,
"jsHeapTotalBytes": 14417920,
"scriptDurationMs": 65.996,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 577.3550000000114,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.476999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 362.027,
"heapDeltaBytes": -10133028,
"heapUsedBytes": 58015792,
"domNodes": 20,
"jsHeapTotalBytes": 19660800,
"scriptDurationMs": 66.462,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 2031.2739999999962,
"styleRecalcs": 9,
"styleRecalcDurationMs": 10.344,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 693.3319999999999,
"heapDeltaBytes": 42854672,
"heapUsedBytes": 101566384,
"domNodes": -266,
"jsHeapTotalBytes": 32006144,
"scriptDurationMs": 113.64500000000001,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2037.238000000002,
"styleRecalcs": 8,
"styleRecalcDurationMs": 9.146,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 647.9910000000001,
"heapDeltaBytes": 9838484,
"heapUsedBytes": 68233312,
"domNodes": -262,
"jsHeapTotalBytes": 548864,
"scriptDurationMs": 117.20299999999999,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2139.967000000013,
"styleRecalcs": 68,
"styleRecalcDurationMs": 17.979,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1133.0809999999997,
"heapDeltaBytes": -1103476,
"heapUsedBytes": 58407440,
"domNodes": -265,
"jsHeapTotalBytes": 1015808,
"scriptDurationMs": 402.495,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2297.154999999975,
"styleRecalcs": 70,
"styleRecalcDurationMs": 20.862,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1289.1730000000002,
"heapDeltaBytes": 42079192,
"heapUsedBytes": 103427900,
"domNodes": -263,
"jsHeapTotalBytes": 38006784,
"scriptDurationMs": 430.601,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3295.4460000000267,
"styleRecalcs": 65,
"styleRecalcDurationMs": 19.874,
"layouts": 60,
"layoutDurationMs": 8.138,
"taskDurationMs": 1494.54,
"heapDeltaBytes": 38906680,
"heapUsedBytes": 106704584,
"domNodes": 12,
"jsHeapTotalBytes": 59387904,
"scriptDurationMs": 538.242,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3164.22799999998,
"styleRecalcs": 62,
"styleRecalcDurationMs": 16.243000000000006,
"layouts": 60,
"layoutDurationMs": 7.678000000000001,
"taskDurationMs": 1374.3780000000002,
"heapDeltaBytes": -1650608,
"heapUsedBytes": 59607784,
"domNodes": -271,
"jsHeapTotalBytes": 5005312,
"scriptDurationMs": 502.47799999999995,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2091.1199999999894,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.862000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 727.376,
"heapDeltaBytes": 41137764,
"heapUsedBytes": 101948084,
"domNodes": -262,
"jsHeapTotalBytes": 33841152,
"scriptDurationMs": 123.33300000000001,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2027.1839999999202,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.873000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 646.662,
"heapDeltaBytes": 1449852,
"heapUsedBytes": 63016756,
"domNodes": -265,
"jsHeapTotalBytes": 2965504,
"scriptDurationMs": 115.09400000000002,
"eventListeners": -129,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 594.5830000000001,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.860999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 390.10299999999995,
"heapDeltaBytes": -4008212,
"heapUsedBytes": 62514568,
"domNodes": 20,
"jsHeapTotalBytes": 22634496,
"scriptDurationMs": 126.287,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 537.9149999999981,
"styleRecalcs": 47,
"styleRecalcDurationMs": 12.01,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 364.459,
"heapDeltaBytes": 9086328,
"heapUsedBytes": 58158820,
"domNodes": 20,
"jsHeapTotalBytes": 16252928,
"scriptDurationMs": 122.45,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2056.56799999997,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.702,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 521.0380000000001,
"heapDeltaBytes": 177824,
"heapUsedBytes": 66492784,
"domNodes": -259,
"jsHeapTotalBytes": 22499328,
"scriptDurationMs": 26.329000000000004,
"eventListeners": -161,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2023.5430000000179,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.408999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 536.3530000000001,
"heapDeltaBytes": 20149720,
"heapUsedBytes": 69313688,
"domNodes": -260,
"jsHeapTotalBytes": 18739200,
"scriptDurationMs": 23.514,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1959.4400000000292,
"styleRecalcs": 82,
"styleRecalcDurationMs": 55.24,
"layouts": 16,
"layoutDurationMs": 4.763,
"taskDurationMs": 956.7370000000001,
"heapDeltaBytes": 1082572,
"heapUsedBytes": 50019424,
"domNodes": -260,
"jsHeapTotalBytes": 14807040,
"scriptDurationMs": 102.348,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1771.178999999961,
"styleRecalcs": 78,
"styleRecalcDurationMs": 41.207,
"layouts": 16,
"layoutDurationMs": 4.805000000000001,
"taskDurationMs": 819.3820000000001,
"heapDeltaBytes": -8696800,
"heapUsedBytes": 59912424,
"domNodes": -256,
"jsHeapTotalBytes": 26955776,
"scriptDurationMs": 109.922,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1230.6460000000925,
"styleRecalcs": 14,
"styleRecalcDurationMs": 29.71399999999999,
"layouts": 4,
"layoutDurationMs": 14.041000000000002,
"taskDurationMs": 957.9450000000003,
"heapDeltaBytes": -22987512,
"heapUsedBytes": 137928108,
"domNodes": 12475,
"jsHeapTotalBytes": -14163968,
"scriptDurationMs": 41.156,
"eventListeners": 1288,
"totalBlockingTimeMs": 163,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8210.513000000048,
"styleRecalcs": 250,
"styleRecalcDurationMs": 54.681999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3975.2950000000005,
"heapDeltaBytes": 12756688,
"heapUsedBytes": 71309076,
"domNodes": -261,
"jsHeapTotalBytes": 7307264,
"scriptDurationMs": 1307.482,
"eventListeners": -113,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8105.199999999968,
"styleRecalcs": 249,
"styleRecalcDurationMs": 53.582,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3957.074,
"heapDeltaBytes": 17422092,
"heapUsedBytes": 83628248,
"domNodes": 16,
"jsHeapTotalBytes": 18145280,
"scriptDurationMs": 1321.5499999999997,
"eventListeners": 20,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 12792.705000000013,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12764.043,
"heapDeltaBytes": -44670076,
"heapUsedBytes": 172971388,
"domNodes": -8365,
"jsHeapTotalBytes": 27062272,
"scriptDurationMs": 646.95,
"eventListeners": -16464,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 12683.657999999923,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12672.002,
"heapDeltaBytes": -57454232,
"heapUsedBytes": 159568316,
"domNodes": -8331,
"jsHeapTotalBytes": 26275840,
"scriptDurationMs": 631.005,
"eventListeners": -16464,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 14923.129000000017,
"styleRecalcs": 68,
"styleRecalcDurationMs": 18.015000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14897.381000000001,
"heapDeltaBytes": -41111956,
"heapUsedBytes": 174731200,
"domNodes": -8331,
"jsHeapTotalBytes": -24576,
"scriptDurationMs": 929.4500000000002,
"eventListeners": -16490,
"totalBlockingTimeMs": 99,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 17786.201000000005,
"styleRecalcs": 114,
"styleRecalcDurationMs": 21.19199999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17757.121000000003,
"heapDeltaBytes": 14079748,
"heapUsedBytes": 292056084,
"domNodes": -8329,
"jsHeapTotalBytes": 30994432,
"scriptDurationMs": 1155.429,
"eventListeners": -16486,
"totalBlockingTimeMs": 18,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 461.6049999999632,
"styleRecalcs": 17,
"styleRecalcDurationMs": 22.973999999999997,
"layouts": 5,
"layoutDurationMs": 1.3560000000000003,
"taskDurationMs": 126.13000000000002,
"heapDeltaBytes": 5429520,
"heapUsedBytes": 57164716,
"domNodes": 168,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 28.537,
"eventListeners": 69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 134.08000000003995,
"styleRecalcs": 12,
"styleRecalcDurationMs": 19.130000000000003,
"layouts": 4,
"layoutDurationMs": 1.4569999999999999,
"taskDurationMs": 96.01799999999996,
"heapDeltaBytes": 3470896,
"heapUsedBytes": 53725440,
"domNodes": 144,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 24.718,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
}
]
} |
|
/update-playwright |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #12279 +/- ##
===========================================
- Coverage 74.27% 59.52% -14.76%
===========================================
Files 1521 1411 -110
Lines 90478 71866 -18612
Branches 25722 19019 -6703
===========================================
- Hits 67204 42777 -24427
- Misses 22426 28615 +6189
+ Partials 848 474 -374
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1004 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
/update-playwright |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/schemas/nodeDef/migration.test.ts`:
- Around line 635-660: The test creates a console.warn spy (warnSpy) but
restores it unconditionally after the assertion, which can be skipped if
expect() throws; wrap the assertion and any code that might throw inside a
try/finally so warnSpy.mockRestore() always runs. Locate the test case that
constructs new ComfyNodeDefImpl({...}) and the
expect(warnSpy).toHaveBeenCalledWith(...) call, and refactor it so the spy is
created, the body (construction and expect) runs inside try, and
warnSpy.mockRestore() is executed in the finally block to guarantee cleanup.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5f7aa35b-a538-429d-b96a-e907bbe4dd89
📒 Files selected for processing (2)
src/schemas/nodeDef/migration.test.tssrc/stores/nodeDefStore.ts
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/schemas/nodeDef/migration.test.ts (1)
635-660:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winMake
console.warnspy cleanup failure-safe.If this test throws before cleanup,
console.warnstays mocked and can leak into later tests. Wrap the body intry/finallyso restore always runs.Proposed patch
it('should emit deprecation warning for optional input with defaultInput', () => { const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - - new ComfyNodeDefImpl({ - name: 'TestNode', - display_name: 'Test Node', - category: 'Test', - python_module: 'test_module', - description: 'A test node', - input: { - optional: { - seed: ['INT', { defaultInput: true }] - } - }, - output: [], - output_is_list: [], - output_name: [], - output_node: false - } as ComfyNodeDefV1) - - expect(warnSpy).toHaveBeenCalledWith( - 'Use of defaultInput on optional input test_module:TestNode:seed is deprecated and ignored. Remove defaultInput. Use forceInput only if you intentionally want a socket-only input.' - ) - - warnSpy.mockRestore() + try { + new ComfyNodeDefImpl({ + name: 'TestNode', + display_name: 'Test Node', + category: 'Test', + python_module: 'test_module', + description: 'A test node', + input: { + optional: { + seed: ['INT', { defaultInput: true }] + } + }, + output: [], + output_is_list: [], + output_name: [], + output_node: false + } as ComfyNodeDefV1) + + expect(warnSpy).toHaveBeenCalledWith( + 'Use of defaultInput on optional input test_module:TestNode:seed is deprecated and ignored. Remove defaultInput. Use forceInput only if you intentionally want a socket-only input.' + ) + } finally { + warnSpy.mockRestore() + } })🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/schemas/nodeDef/migration.test.ts` around lines 635 - 660, The test currently spies on console.warn using vi.spyOn and calls warnSpy.mockRestore() at the end, but if the test body throws the spy may not be restored; update the 'should emit deprecation warning for optional input with defaultInput' test to wrap the creation of ComfyNodeDefImpl and the expect assertion in a try/finally block and call warnSpy.mockRestore() inside finally so the console.warn spy is always restored even on failure; reference the existing warnSpy, console.warn, and ComfyNodeDefImpl symbols when making the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@src/schemas/nodeDef/migration.test.ts`:
- Around line 635-660: The test currently spies on console.warn using vi.spyOn
and calls warnSpy.mockRestore() at the end, but if the test body throws the spy
may not be restored; update the 'should emit deprecation warning for optional
input with defaultInput' test to wrap the creation of ComfyNodeDefImpl and the
expect assertion in a try/finally block and call warnSpy.mockRestore() inside
finally so the console.warn spy is always restored even on failure; reference
the existing warnSpy, console.warn, and ComfyNodeDefImpl symbols when making the
change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 44411b41-5acf-4435-aa00-8614d02efe3a
⛔ Files ignored due to path filters (2)
browser_tests/tests/interaction.spec.ts-snapshots/dragged-node1-chromium-linux.pngis excluded by!**/*.pngbrowser_tests/tests/nodeDisplay.spec.ts-snapshots/default-input-chromium-linux.pngis excluded by!**/*.png
📒 Files selected for processing (2)
src/schemas/nodeDef/migration.test.tssrc/stores/nodeDefStore.ts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
cc @Lidang-Jiang - This PR supersedes your #10706. All CI passing, just needs CodeRabbit approval (or dismissal of old review). The try/finally fix addresses their feedback. |
|
/assign @Lidang-Jiang |
Summary
Widgets with
defaultInput: truethat are toggled back to widget mode revert to socket-only inputs on reload. The_migrateDefaultInputmethod was settingforceInput = truefor all optional inputs withdefaultInput, which prevented widgets from being created and overrode user preferences on every load.Since frontend 1.16+, widgets and sockets co-exist on every input, so this conversion is no longer needed. This PR removes the
forceInput = trueassignment while keeping the deprecation warning.Changes
inputOptions.forceInput = truefrom_migrateDefaultInputfor optional inputsReview Focus
defaultInputis preserved — only theforceInput = trueassignment is removedforceInput)forceInput: trueare unaffected (their value comes from the node definition, not from migration)Fixes Comfy-Org/ComfyUI#1500
Supersedes #10706 (fork PR had workflow permission issues)
Co-authored-by: Lidang-Jiang lidangjiang@gmail.com
Test plan
nodeDisplay.spec.tsDefault input test┆Issue is synchronized with this Notion page by Unito