fix: load API format workflows with missing node types#9694
Conversation
🎭 Playwright: ✅ 558 passed, 0 failed · 1 flaky📊 Browser Reports
|
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
🎨 Storybook: ✅ Built — View Storybook |
📦 Bundle: 4.57 MB gzip 🟢 -153 BDetailsSummary
Category Glance App Entry Points — 28.9 kB (baseline 28.9 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 967 kB (baseline 967 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 72.4 kB (baseline 72.4 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed Panels & Settings — 436 kB (baseline 436 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed User & Accounts — 16.1 kB (baseline 16.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed Editors & Dialogs — 77.5 kB (baseline 77.5 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 56.5 kB (baseline 56.5 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed Data & Services — 2.77 MB (baseline 2.77 MB) • 🟢 -20 BStores, services, APIs, and repositories
Status: 14 added / 14 removed Utilities & Hooks — 56.8 kB (baseline 56.8 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 11 added / 11 removed Vendor & Third-Party — 8.88 MB (baseline 8.88 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 8.04 MB (baseline 8.04 MB) • ⚪ 0 BBundles that do not match a named category
Status: 50 added / 50 removed |
⚡ Performance Report
Raw data{
"timestamp": "2026-03-10T03:22:13.975Z",
"gitSha": "3750b4b0b58f5aee8d4de3ded4e12696843abbba",
"branch": "fix/load-api-json-missing-nodes",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2036.3140000000044,
"styleRecalcs": 124,
"styleRecalcDurationMs": 29.732000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 510.5230000000001,
"heapDeltaBytes": -3469144
},
{
"name": "canvas-idle",
"durationMs": 2008.972999999969,
"styleRecalcs": 123,
"styleRecalcDurationMs": 22.738999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 401.112,
"heapDeltaBytes": -3412700
},
{
"name": "canvas-idle",
"durationMs": 2028.3249999999953,
"styleRecalcs": 124,
"styleRecalcDurationMs": 24.664000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 432.193,
"heapDeltaBytes": -3378352
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1812.2170000000324,
"styleRecalcs": 165,
"styleRecalcDurationMs": 49.111999999999995,
"layouts": 12,
"layoutDurationMs": 3.603,
"taskDurationMs": 813.7289999999999,
"heapDeltaBytes": -3446004
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1866.5829999999914,
"styleRecalcs": 171,
"styleRecalcDurationMs": 49.02,
"layouts": 12,
"layoutDurationMs": 3.386,
"taskDurationMs": 829.344,
"heapDeltaBytes": -3676376
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1875.50200000004,
"styleRecalcs": 172,
"styleRecalcDurationMs": 51.184000000000005,
"layouts": 12,
"layoutDurationMs": 3.895,
"taskDurationMs": 853.534,
"heapDeltaBytes": -3153244
},
{
"name": "dom-widget-clipping",
"durationMs": 576.6929999999775,
"styleRecalcs": 42,
"styleRecalcDurationMs": 12.736999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 368.499,
"heapDeltaBytes": 7735132
},
{
"name": "dom-widget-clipping",
"durationMs": 562.4979999999482,
"styleRecalcs": 42,
"styleRecalcDurationMs": 11.652,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 349.522,
"heapDeltaBytes": 7885628
},
{
"name": "dom-widget-clipping",
"durationMs": 593.2920000000195,
"styleRecalcs": 43,
"styleRecalcDurationMs": 12.822,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 361.496,
"heapDeltaBytes": 7738220
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 589.4000000000119,
"styleRecalcs": 75,
"styleRecalcDurationMs": 19.595000000000002,
"layouts": 1,
"layoutDurationMs": 0.21500000000000002,
"taskDurationMs": 425.956,
"heapDeltaBytes": 15815348
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 640.5149999999935,
"styleRecalcs": 76,
"styleRecalcDurationMs": 16.366,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 458.42900000000003,
"heapDeltaBytes": -8464472
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 603.1639999999925,
"styleRecalcs": 73,
"styleRecalcDurationMs": 16.09,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 411.62700000000007,
"heapDeltaBytes": 15656716
},
{
"name": "subgraph-idle",
"durationMs": 2004.7220000000152,
"styleRecalcs": 121,
"styleRecalcDurationMs": 22.98,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 405.053,
"heapDeltaBytes": -4137168
},
{
"name": "subgraph-idle",
"durationMs": 2010.8519999999999,
"styleRecalcs": 122,
"styleRecalcDurationMs": 24.798,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 415.416,
"heapDeltaBytes": -3452964
},
{
"name": "subgraph-idle",
"durationMs": 2012.6620000000344,
"styleRecalcs": 122,
"styleRecalcDurationMs": 23.919000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 412.33500000000004,
"heapDeltaBytes": -3471732
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1739.8680000000013,
"styleRecalcs": 157,
"styleRecalcDurationMs": 47.427,
"layouts": 16,
"layoutDurationMs": 4.677,
"taskDurationMs": 766.4929999999999,
"heapDeltaBytes": -6744564
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1736.0419999999976,
"styleRecalcs": 159,
"styleRecalcDurationMs": 52.736,
"layouts": 17,
"layoutDurationMs": 4.921,
"taskDurationMs": 775.486,
"heapDeltaBytes": -5283972
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1699.008000000049,
"styleRecalcs": 155,
"styleRecalcDurationMs": 46.394999999999996,
"layouts": 16,
"layoutDurationMs": 4.428,
"taskDurationMs": 741.223,
"heapDeltaBytes": -6154628
}
]
} |
|
@coderabbitai Could you create an issue regarding the removal of the legacy MissingNodeDialog and assign it to me? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 57
The issue includes:
🧠 Learnings used |
## Summary `loadApiJson` early-returns when missing node types are detected, preventing the entire API-format workflow from loading onto the canvas. ## Changes - **What**: Remove early `return` in `loadApiJson` so missing nodes are skipped while the rest of the workflow loads normally, consistent with how `loadGraphData` handles missing nodes in standard workflow format. ## Review Focus The existing code already handles missing nodes gracefully: - `LiteGraph.createNode()` returns `null` for unregistered types - `if (!node) continue` skips missing nodes during graph construction - `if (!fromNode) continue` skips connections to missing nodes - `if (!node) return` skips input processing for missing nodes The early `return` was unnecessarily preventing the entire load. The warning modal is still shown via `showMissingNodesError`. ## Test workflow & screen recording [04wan2.2smoothmix图生视频 (3).json](https://github.com/user-attachments/files/25858354/04wan2.2smoothmix.3.json) [screen-capture.webm](https://github.com/user-attachments/assets/9c396f80-fff1-4d17-882c-35ada86542c1)
|
@viva-jinyi Successfully backported to #10037 |
## Summary `loadApiJson` early-returns when missing node types are detected, preventing the entire API-format workflow from loading onto the canvas. ## Changes - **What**: Remove early `return` in `loadApiJson` so missing nodes are skipped while the rest of the workflow loads normally, consistent with how `loadGraphData` handles missing nodes in standard workflow format. ## Review Focus The existing code already handles missing nodes gracefully: - `LiteGraph.createNode()` returns `null` for unregistered types - `if (!node) continue` skips missing nodes during graph construction - `if (!fromNode) continue` skips connections to missing nodes - `if (!node) return` skips input processing for missing nodes The early `return` was unnecessarily preventing the entire load. The warning modal is still shown via `showMissingNodesError`. ## Test workflow & screen recording [04wan2.2smoothmix图生视频 (3).json](https://github.com/user-attachments/files/25858354/04wan2.2smoothmix.3.json) [screen-capture.webm](https://github.com/user-attachments/assets/9c396f80-fff1-4d17-882c-35ada86542c1)
|
@viva-jinyi Successfully backported to #10041 |
…e types (#10037) Backport of #9694 to `cloud/1.41` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10037-backport-cloud-1-41-fix-load-API-format-workflows-with-missing-node-types-3256d73d3650811782fad8b489bcf253) by [Unito](https://www.unito.io) Co-authored-by: Jin Yi <jin12cc@gmail.com>
… types (#10041) Backport of #9694 to `core/1.41` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10041-backport-core-1-41-fix-load-API-format-workflows-with-missing-node-types-3256d73d365081e3ae5ce2b74e1cf83e) by [Unito](https://www.unito.io) Co-authored-by: Jin Yi <jin12cc@gmail.com>
Summary
loadApiJsonearly-returns when missing node types are detected, preventing the entire API-format workflow from loading onto the canvas.Changes
returninloadApiJsonso missing nodes are skipped while the rest of the workflow loads normally, consistent with howloadGraphDatahandles missing nodes in standard workflow format.Review Focus
The existing code already handles missing nodes gracefully:
LiteGraph.createNode()returnsnullfor unregistered typesif (!node) continueskips missing nodes during graph constructionif (!fromNode) continueskips connections to missing nodesif (!node) returnskips input processing for missing nodesThe early
returnwas unnecessarily preventing the entire load. The warning modal is still shown viashowMissingNodesError.Test workflow & screen recording
04wan2.2smoothmix图生视频 (3).json
screen-capture.webm