Repository navigation
[backport core/1.57] fix: pick up new node types when ComfyUI reconnects after any restart (#22138) - #22360
Conversation
…#22138) If ComfyUI restarts while the agent panel is closed (or through `comfy launch`/`comfy stop`, or a Desktop server restart), the open tab keeps the old node definitions, and nodes from a pack installed before the restart stay missing until the page is reloaded. **Refresh Node Definitions** alone does not help, because it updates definitions but leaves nodes that already loaded as missing. Now, on every ComfyUI `/ws` reconnect (local and Desktop; cloud is skipped), the page reads `/object_info` once. If it lists node types the page has not registered, it runs **Refresh Node Definitions**. If the open workflow still holds a missing node whose type is now registered, it reloads that workflow from its current state once the user is not mid-edit, so the node is rebuilt from its definition. Unsaved edits stay in the graph and stay marked unsaved. A reconnect with no new types changes nothing. It also fixes a bug every `reloadCurrentWorkflow` caller had (Manager apply changes, the agent restart refresh, late custom nodes, the canvas): the reload reset the workflow's saved baseline to the unsaved state, so a later undo could mark a modified workflow as saved. Fixes FE-3483. Follow-up to #20903 and #21644, which cover only restarts the agent panel sees. <details><summary>Design notes</summary> - Lives next to the queue refresh in `GraphView.vue`'s `reconnected` handler (`src/platform/customNodes/useReconnectNodeDefinitionRefresh.ts`, with the shared `useUserBusy` check), not in the agent extension, so it runs whether or not the agent panel was ever opened. - Detection is "new type names", checked against both `nodeDefStore` and `LiteGraph.registered_node_types`. Only the refresh depends on new types; the rebuild depends on the canvas (a placeholder node with `last_serialization` whose type is now registered, root graph or subgraph). So a refresh that registered types but then failed in an extension callback is recovered on the next reconnect, and a workflow another restart path already rebuilt is not reloaded twice. - **Saved baseline at the load boundary.** `openWorkflow` takes `keepSavedBaseline`. For a workflow that was modified before the reload, it reads the saved baseline inside the load queue right before the graph load (so a save made while the reload waited is kept), puts it back after the load finishes or throws, and derives the modified flag from content (so an edit made during post-load asset scans stays modified). If the workflow was saved during the load itself (judged by `originalContent`, which changes only after a successful write), the save wins. A clean workflow accepts the reloaded state as its baseline, as before, so a locale change or a rebuilt placeholder does not mark it modified. `reloadCurrentWorkflow` always passes it. The late custom nodes wrapper in `lateCustomNodes/lateLoading.ts` is **not** made redundant by that: it snapshots the baseline and the dirty flag before the service call, i.e. before the load queue, and restores both unconditionally afterwards, so a save that completes while the reload waits is still overwritten there. That overwrite predates this PR and is unchanged by it; `keepSavedBaseline` is what avoids it inside the service, and ADR-EXTENSION-LOADING-0048 gives the late-loading path its own clean-baseline contract, so the wrapper is left alone rather than deleted. - **Readiness at the load boundary.** The rebuild waits (polling, up to 30s) until there is no open change transaction (`changeCount`), no undo/redo restore (`_restoringState`), no held pointer (resize, drag or link gestures, which do not all open a transaction) and no focused text field. The same check runs as `isCurrent` inside the queued load, immediately before capture, so a gesture that starts while the reload waits behind another load defers it; a deferred reload retries, a reload that fails for another reason does not. Remaining gap, same as before this PR: a load that calls `app.loadGraphData` directly (file drop, paste, template) can still be ahead in the app's own graph-load queue. Tracked in https://linear.app/comfyorg/issue/FRONT-3720. - Cost: one `/object_info` read per local reconnect. Fetching only when the canvas has missing nodes would be cheaper, but then a pack installed outside the panel would not show up in node search or the library until a manual refresh. Reconnects during a check coalesce into one more check. - Known limits, tracked in https://linear.app/comfyorg/issue/FRONT-3668: (1) a restart that only changes the inputs of existing node types (an updated pack) is not detected and still needs **Refresh Node Definitions**; (2) the Manager and agent restart paths still run their own refresh on the same reconnect, so the refresh can run twice (redundant, not harmful). (3) If `/object_info` is still failing after the API client's own retries, that reconnect does nothing until the next one. </details> - The reconnect catalog read now goes through `app.fetchNodeDefs()` instead of casting the raw `/object_info` body to `Record<string, ComfyNodeDef>`. A 200 response that is not an object of definitions used to yield fabricated type names (`"unavailable"` → types `0`..`10`), so every reconnect ran a full **Refresh Node Definitions**; `toNodeDefs` filters the container and its entries, and this file no longer imports `api` directly. One behavioural consequence worth naming: that boundary also refreshes backend node display text from the response, the same way the bootstrap and refresh paths do. - Reconnect work is now cancelled with the effect scope that started it. The idle-wait loop outlived its scope and could reload a workflow after `GraphView` had gone away, using the stale busy state of listeners VueUse had already removed; disposal is checked while polling and again at queued admission. - Unit: `src/platform/customNodes/useReconnectNodeDefinitionRefresh.test.ts` covers new type on the canvas (refresh, then rebuild with the saved baseline kept), new type not on the canvas, known types in the Vue store or LiteGraph only, subgraphs, an already-rebuilt workflow, cloud, a refused `/object_info`, a failing refresh and recovery on the next reconnect, reconnect bursts, waiting for an edit, an undo, a held pointer or a focused text field, an edit that starts while the reload is queued (retried), and a failed load (not retried). `workflowService.test.ts` covers `keepSavedBaseline`: unsaved edits stay unsaved after a reload, the baseline survives a load that throws after resetting the tracker, a save made while the reload waited or while it loaded is kept, a save whose write fails is not, and a clean workflow stays clean. - Browser: `browser_tests/tests/graph/reconnectNodeDefinitionRefresh.spec.ts` (chromium, real ComfyUI backend) loads a workflow whose node type the server lacks, closes ComfyUI's socket, serves the new type after the reconnect, and expects the node rebuilt with its widgets and saved values. Run against a local ComfyUI master: fails on `main`, passes on this branch (rerun at the current head). - New unit cases, each proven red on the code before its fix and green after: a catalog response that is not a map of definitions changes nothing (no refresh, no reload), and a rebuild waiting for an edit is dropped when the scope that started it stops. Each handler is now constructed in a disposable test scope so its real pointer listeners do not survive into later cases. - The workflow-service persistence cases assert which state became the baseline rather than only that the reference changed, and the preservation case now runs the real activation path (`afterLoadNewGraph`) with seeded undo history. Measured there, and worth recording because it reads like a regression and is not: `openWorkflow`'s pre-load `prepareForSave` captures the canvas, which appends one undo entry and clears the redo queue whenever the canvas holds uncaptured edits. That is base behaviour of every reload, so the case asserts the seeded history survives rather than that the queues are untouched. - `pnpm typecheck`, `pnpm typecheck:browser`, `fallow audit` (no new findings), `deps:audit`, `knip`, and lint-staged pass. Workflow service, late custom nodes, Manager, agent store and graph canvas unit suites pass. --------- Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: mrseek-reviews[bot] <337131926+mrseek-reviews[bot]@users.noreply.github.com>
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords: 2
Please check the settings in the CodeRabbit UI or the
|
📦 Bundle Size
⚡ Performance Report
Scenario timings
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-10-30T06:43:18.942Z",
"gitSha": "059d9b138f10d7feb96d20cfabb140787ecec92f",
"branch": "backport-22138-to-core-1.57",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2013.3550000000469,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.6770000000000005,
"layouts": 8,
"layoutDurationMs": 2.698,
"taskDurationMs": 596.614,
"heapDeltaBytes": 22180932,
"heapUsedBytes": 88006728,
"domNodes": 0,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 14.726000000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2021.4959999999564,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.1790000000000003,
"layouts": 9,
"layoutDurationMs": 2.922,
"taskDurationMs": 616.684,
"heapDeltaBytes": -948376,
"heapUsedBytes": 74638692,
"domNodes": 0,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 14.175999999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1807.2690000000193,
"styleRecalcs": 76,
"styleRecalcDurationMs": 16.209999999999997,
"layouts": 10,
"layoutDurationMs": 3.283,
"taskDurationMs": 972.532,
"heapDeltaBytes": -8126944,
"heapUsedBytes": 67321996,
"domNodes": 0,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 177.428,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665740740740738,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1837.5740000000178,
"styleRecalcs": 76,
"styleRecalcDurationMs": 15.337,
"layouts": 8,
"layoutDurationMs": 2.478,
"taskDurationMs": 940.4179999999999,
"heapDeltaBytes": -7307516,
"heapUsedBytes": 68882468,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 174.185,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666363636363638,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1722.7890000000343,
"styleRecalcs": 19,
"styleRecalcDurationMs": 6.348000000000001,
"layouts": 11,
"layoutDurationMs": 3.746,
"taskDurationMs": 494.71,
"heapDeltaBytes": -4965320,
"heapUsedBytes": 70538624,
"domNodes": 47,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 16.976000000000003,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66601941747573,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1725.516999999968,
"styleRecalcs": 18,
"styleRecalcDurationMs": 6.2059999999999995,
"layouts": 11,
"layoutDurationMs": 3.193,
"taskDurationMs": 356.25399999999996,
"heapDeltaBytes": 18732220,
"heapUsedBytes": 84739076,
"domNodes": 47,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 17.230999999999998,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384614,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 660.3350000000319,
"styleRecalcs": 12,
"styleRecalcDurationMs": 2.6069999999999998,
"layouts": 8,
"layoutDurationMs": 2.2609999999999997,
"taskDurationMs": 475.615,
"heapDeltaBytes": -610256,
"heapUsedBytes": 66129448,
"domNodes": 0,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 180.853,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664102564102567,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 643.1819999999107,
"styleRecalcs": 14,
"styleRecalcDurationMs": 3.174000000000001,
"layouts": 9,
"layoutDurationMs": 2.785,
"taskDurationMs": 466.495,
"heapDeltaBytes": 25238332,
"heapUsedBytes": 91186944,
"domNodes": 0,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 179.73999999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664102564102567,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1245.2049999999417,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 969.0409999999999,
"heapDeltaBytes": -13092264,
"heapUsedBytes": 81221616,
"domNodes": -192,
"jsHeapTotalBytes": 20717568,
"scriptDurationMs": 73.235,
"eventListeners": -106,
"totalBlockingTimeMs": 556,
"frameDurationMs": 33.78378378378378,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1258.322000000021,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1014.24,
"heapDeltaBytes": 773348,
"heapUsedBytes": 81414912,
"domNodes": -212,
"jsHeapTotalBytes": 14688256,
"scriptDurationMs": 75.972,
"eventListeners": -106,
"totalBlockingTimeMs": 560,
"frameDurationMs": 33.78378378378378,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 873.4960000000456,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 541.3399999999999,
"heapDeltaBytes": -4346964,
"heapUsedBytes": 76452164,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 179.01199999999994,
"eventListeners": 0,
"totalBlockingTimeMs": 229,
"frameDurationMs": 25.48823529411763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 860.6500000000779,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 537.1379999999997,
"heapDeltaBytes": -4598560,
"heapUsedBytes": 75516816,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 172.39,
"eventListeners": 0,
"totalBlockingTimeMs": 232,
"frameDurationMs": 25.48823529411763,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11685.040999999956,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10726.860999999999,
"heapDeltaBytes": -26884020,
"heapUsedBytes": 72351432,
"domNodes": -258,
"jsHeapTotalBytes": 6942720,
"scriptDurationMs": 8665.972,
"eventListeners": -68,
"totalBlockingTimeMs": 1482,
"frameDurationMs": 32.09587912087912,
"p95FrameDurationMs": 66.69999999999891
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11342.262000000006,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10574.231000000002,
"heapDeltaBytes": -14722988,
"heapUsedBytes": 82575328,
"domNodes": -278,
"jsHeapTotalBytes": 7204864,
"scriptDurationMs": 8639.298,
"eventListeners": -68,
"totalBlockingTimeMs": 1337,
"frameDurationMs": 31.479999999999997,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10970.535999999924,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10186.092999999999,
"heapDeltaBytes": -23944844,
"heapUsedBytes": 75677536,
"domNodes": -258,
"jsHeapTotalBytes": 5107712,
"scriptDurationMs": 8285.914,
"eventListeners": -68,
"totalBlockingTimeMs": 1187,
"frameDurationMs": 32.25352941176471,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10463.826999999925,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9591.692000000001,
"heapDeltaBytes": -27810116,
"heapUsedBytes": 71718892,
"domNodes": -258,
"jsHeapTotalBytes": 8777728,
"scriptDurationMs": 8056.413000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 1231,
"frameDurationMs": 31.52469879518072,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "large-combo-open",
"durationMs": 252.62499999996635,
"styleRecalcs": 24,
"styleRecalcDurationMs": 19.029999999999998,
"layouts": 12,
"layoutDurationMs": 4.221000000000001,
"taskDurationMs": 194.407,
"heapDeltaBytes": -7524816,
"heapUsedBytes": 80248260,
"domNodes": 917,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 10.145999999999999,
"eventListeners": 196,
"totalBlockingTimeMs": 6,
"frameDurationMs": 25,
"p95FrameDurationMs": 99.90000000000055
},
{
"name": "large-combo-open",
"durationMs": 239.71099999994294,
"styleRecalcs": 24,
"styleRecalcDurationMs": 16.849,
"layouts": 11,
"layoutDurationMs": 3.7750000000000004,
"taskDurationMs": 181.414,
"heapDeltaBytes": -7643908,
"heapUsedBytes": 80369552,
"domNodes": 917,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 9.377,
"eventListeners": 196,
"totalBlockingTimeMs": 3,
"frameDurationMs": 25.922222222222242,
"p95FrameDurationMs": 100
},
{
"name": "large-graph-idle",
"durationMs": 2056.361000000038,
"styleRecalcs": 9,
"styleRecalcDurationMs": 3.065,
"layouts": 8,
"layoutDurationMs": 2.7939999999999996,
"taskDurationMs": 764.4409999999999,
"heapDeltaBytes": -3102772,
"heapUsedBytes": 75814012,
"domNodes": -258,
"jsHeapTotalBytes": 3010560,
"scriptDurationMs": 37.522,
"eventListeners": -67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2072.243999999955,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.8889999999999993,
"layouts": 9,
"layoutDurationMs": 2.973,
"taskDurationMs": 774.848,
"heapDeltaBytes": -26019316,
"heapUsedBytes": 72909300,
"domNodes": -278,
"jsHeapTotalBytes": 5668864,
"scriptDurationMs": 39.83800000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66532258064516,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2700.7549999999583,
"styleRecalcs": 68,
"styleRecalcDurationMs": 6.449000000000001,
"layouts": 7,
"layoutDurationMs": 2,
"taskDurationMs": 1806.6819999999998,
"heapDeltaBytes": -6133948,
"heapUsedBytes": 92274088,
"domNodes": -278,
"jsHeapTotalBytes": 5894144,
"scriptDurationMs": 861.7479999999999,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666049382716054,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2806.0279999999693,
"styleRecalcs": 68,
"styleRecalcDurationMs": 6.665,
"layouts": 7,
"layoutDurationMs": 2.0860000000000003,
"taskDurationMs": 1846.6050000000002,
"heapDeltaBytes": 692912,
"heapUsedBytes": 77969400,
"domNodes": -258,
"jsHeapTotalBytes": 3235840,
"scriptDurationMs": 893.406,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.765868263473056,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3555.6740000000673,
"styleRecalcs": 70,
"styleRecalcDurationMs": 8.106,
"layouts": 64,
"layoutDurationMs": 11.325000000000001,
"taskDurationMs": 1706.607,
"heapDeltaBytes": 1469740,
"heapUsedBytes": 83277884,
"domNodes": 24,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 833.877,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666197183098593,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3632.1510000000217,
"styleRecalcs": 70,
"styleRecalcDurationMs": 8.418000000000001,
"layouts": 64,
"layoutDurationMs": 11.844000000000001,
"taskDurationMs": 1713.9860000000003,
"heapDeltaBytes": 1164344,
"heapUsedBytes": 83442732,
"domNodes": 24,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 838.9979999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66589861751152,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3226.9730000000436,
"styleRecalcs": 43,
"styleRecalcDurationMs": 4.910000000000001,
"layouts": 3,
"layoutDurationMs": 1.0579999999999998,
"taskDurationMs": 2141.349,
"heapDeltaBytes": -990248,
"heapUsedBytes": 78033224,
"domNodes": 0,
"jsHeapTotalBytes": 2748416,
"scriptDurationMs": 1046.5019999999997,
"eventListeners": 182,
"totalBlockingTimeMs": 21,
"frameDurationMs": 17.015183246073295,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3289.2740000000913,
"styleRecalcs": 43,
"styleRecalcDurationMs": 5.2989999999999995,
"layouts": 4,
"layoutDurationMs": 1.2530000000000001,
"taskDurationMs": 2015.549,
"heapDeltaBytes": 3787404,
"heapUsedBytes": 87329704,
"domNodes": -258,
"jsHeapTotalBytes": 5263360,
"scriptDurationMs": 1051.637,
"eventListeners": -63,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.837113402061853,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2056.51899999998,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.575999999999999,
"layouts": 7,
"layoutDurationMs": 2.554,
"taskDurationMs": 794.88,
"heapDeltaBytes": -24777696,
"heapUsedBytes": 74408692,
"domNodes": -278,
"jsHeapTotalBytes": 3571712,
"scriptDurationMs": 39.025,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2048.8169999999855,
"styleRecalcs": 7,
"styleRecalcDurationMs": 2.6180000000000003,
"layouts": 7,
"layoutDurationMs": 2.218,
"taskDurationMs": 791.1400000000001,
"heapDeltaBytes": -2464540,
"heapUsedBytes": 75911120,
"domNodes": -258,
"jsHeapTotalBytes": 3272704,
"scriptDurationMs": 45.04900000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 714.4119999999248,
"styleRecalcs": 46,
"styleRecalcDurationMs": 5.398,
"layouts": 9,
"layoutDurationMs": 2.9779999999999998,
"taskDurationMs": 494.194,
"heapDeltaBytes": 21550280,
"heapUsedBytes": 89418596,
"domNodes": 0,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 151.40400000000002,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 662.9890000000387,
"styleRecalcs": 45,
"styleRecalcDurationMs": 4.849000000000001,
"layouts": 8,
"layoutDurationMs": 2.3500000000000005,
"taskDurationMs": 465.885,
"heapDeltaBytes": -1112040,
"heapUsedBytes": 76766544,
"domNodes": 0,
"jsHeapTotalBytes": 8650752,
"scriptDurationMs": 148.621,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669230769230754,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2021.6259999999693,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.7140000000000004,
"layouts": 8,
"layoutDurationMs": 3.139,
"taskDurationMs": 484.40999999999997,
"heapDeltaBytes": 22382996,
"heapUsedBytes": 89728324,
"domNodes": 0,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 14.74,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666942148760327,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2023.4000000000378,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.967,
"layouts": 9,
"layoutDurationMs": 3.349,
"taskDurationMs": 451.58199999999994,
"heapDeltaBytes": 22349216,
"heapUsedBytes": 89845452,
"domNodes": 0,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 13.204,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1969.6559999999863,
"styleRecalcs": 86,
"styleRecalcDurationMs": 18.312,
"layouts": 7,
"layoutDurationMs": 2.1319999999999997,
"taskDurationMs": 1101.627,
"heapDeltaBytes": 11167596,
"heapUsedBytes": 78601780,
"domNodes": 0,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 122.92999999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66610169491526,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1979.9730000000864,
"styleRecalcs": 88,
"styleRecalcDurationMs": 19.308000000000003,
"layouts": 9,
"layoutDurationMs": 3.0620000000000003,
"taskDurationMs": 1147.508,
"heapDeltaBytes": -11377008,
"heapUsedBytes": 66146548,
"domNodes": 0,
"jsHeapTotalBytes": 8388608,
"scriptDurationMs": 124.51200000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665546218487396,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1484.2869999999948,
"styleRecalcs": 17,
"styleRecalcDurationMs": 28.666000000000004,
"layouts": 5,
"layoutDurationMs": 17.505,
"taskDurationMs": 1186.4569999999999,
"heapDeltaBytes": 7520888,
"heapUsedBytes": 99431384,
"domNodes": 15953,
"jsHeapTotalBytes": 17178624,
"scriptDurationMs": 33.825,
"eventListeners": 3244,
"totalBlockingTimeMs": 182,
"frameDurationMs": 20.60138888888889,
"p95FrameDurationMs": 33.20000000000073
},
{
"name": "viewport-pan-sweep",
"durationMs": 10624.428999999964,
"styleRecalcs": 250,
"styleRecalcDurationMs": 20.522000000000002,
"layouts": 8,
"layoutDurationMs": 2.0349999999999997,
"taskDurationMs": 6452.015,
"heapDeltaBytes": -19199248,
"heapUsedBytes": 78200348,
"domNodes": -278,
"jsHeapTotalBytes": 5599232,
"scriptDurationMs": 2874.566,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.718582677165355,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8323.998000000074,
"styleRecalcs": 248,
"styleRecalcDurationMs": 20.034999999999997,
"layouts": 6,
"layoutDurationMs": 1.5020000000000002,
"taskDurationMs": 5652.308000000001,
"heapDeltaBytes": -10474516,
"heapUsedBytes": 68941976,
"domNodes": -278,
"jsHeapTotalBytes": 4583424,
"scriptDurationMs": 2841.6299999999997,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.766935483870967,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 24042.46599999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 23403.878,
"heapDeltaBytes": -18496428,
"heapUsedBytes": 276584548,
"domNodes": -3330,
"jsHeapTotalBytes": 15196160,
"scriptDurationMs": 351.734,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 42.73256227758007,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-large-graph-idle",
"durationMs": 17090.814000000024,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16458.823000000004,
"heapDeltaBytes": -154288,
"heapUsedBytes": 281595264,
"domNodes": -3330,
"jsHeapTotalBytes": 20172800,
"scriptDurationMs": 268.576,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 29.380412371134025,
"p95FrameDurationMs": 50.10000000000218
},
{
"name": "vue-large-graph-pan",
"durationMs": 28911.291000000005,
"styleRecalcs": 181,
"styleRecalcDurationMs": 19.533999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 28588.603000000003,
"heapDeltaBytes": -12848516,
"heapUsedBytes": 272144792,
"domNodes": -3330,
"jsHeapTotalBytes": 11259904,
"scriptDurationMs": 938.694,
"eventListeners": -651,
"totalBlockingTimeMs": 10,
"frameDurationMs": 54.321052631578944,
"p95FrameDurationMs": 116.59999999999854
},
{
"name": "vue-large-graph-pan",
"durationMs": 19985.17100000004,
"styleRecalcs": 153,
"styleRecalcDurationMs": 14.664999999999983,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 19610.213000000003,
"heapDeltaBytes": -21851748,
"heapUsedBytes": 269134732,
"domNodes": -3330,
"jsHeapTotalBytes": 14409728,
"scriptDurationMs": 850.3870000000001,
"eventListeners": -651,
"totalBlockingTimeMs": 34,
"frameDurationMs": 37.073283858998145,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "vue-node-resize-workload",
"durationMs": 6129.28700000009,
"styleRecalcs": 20,
"styleRecalcDurationMs": 73.87399999999997,
"layouts": 20,
"layoutDurationMs": 24.00999999999999,
"taskDurationMs": 6010.82,
"heapDeltaBytes": -5103984,
"heapUsedBytes": 291212060,
"domNodes": -3330,
"jsHeapTotalBytes": 26464256,
"scriptDurationMs": 112.237,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 35.15229885057471,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-node-resize-workload",
"durationMs": 6130.5620000000545,
"styleRecalcs": 20,
"styleRecalcDurationMs": 75.486,
"layouts": 20,
"layoutDurationMs": 23.236000000000008,
"taskDurationMs": 6009.26,
"heapDeltaBytes": -12761320,
"heapUsedBytes": 263990552,
"domNodes": -3330,
"jsHeapTotalBytes": 23318528,
"scriptDurationMs": 99.03600000000002,
"eventListeners": -653,
"totalBlockingTimeMs": 22,
"frameDurationMs": 35.657558139534885,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-zoom-out-idle",
"durationMs": 11679.186000000072,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11430.996000000001,
"heapDeltaBytes": 11156076,
"heapUsedBytes": 260178344,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 169.79100000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 40.147422680412376,
"p95FrameDurationMs": 83.39999999999782
},
{
"name": "vue-zoom-out-idle",
"durationMs": 11555.65300000012,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11321.929999999998,
"heapDeltaBytes": -19849156,
"heapUsedBytes": 254288856,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 160.466,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 40.955673758865245,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "workflow-execution",
"durationMs": 498.0990000000247,
"styleRecalcs": 22,
"styleRecalcDurationMs": 18.827,
"layouts": 10,
"layoutDurationMs": 4.146999999999999,
"taskDurationMs": 158.856,
"heapDeltaBytes": -8711720,
"heapUsedBytes": 70689716,
"domNodes": 124,
"jsHeapTotalBytes": 9437184,
"scriptDurationMs": 15.961000000000002,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 129.71699999980046,
"styleRecalcs": 8,
"styleRecalcDurationMs": 11.362,
"layouts": 8,
"layoutDurationMs": 3.473,
"taskDurationMs": 89.16600000000001,
"heapDeltaBytes": 4481852,
"heapUsedBytes": 78238928,
"domNodes": 120,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 7.071000000000001,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.649999999999977,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 595.1190000000679,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.5299999999999998,
"layouts": 76,
"layoutDurationMs": 18.353,
"taskDurationMs": 539.751,
"heapDeltaBytes": -20417116,
"heapUsedBytes": 73148776,
"domNodes": 4,
"jsHeapTotalBytes": 10223616,
"scriptDurationMs": 264.562,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663888888888906,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 599.7099999999591,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.678,
"layouts": 76,
"layoutDurationMs": 18.789,
"taskDurationMs": 547.316,
"heapDeltaBytes": -13822488,
"heapUsedBytes": 81144952,
"domNodes": 4,
"jsHeapTotalBytes": 2621440,
"scriptDurationMs": 259.907,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 636.8909999998777,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.6830000000000003,
"layouts": 76,
"layoutDurationMs": 15.232000000000001,
"taskDurationMs": 605.336,
"heapDeltaBytes": 1382744,
"heapUsedBytes": 120296896,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 252.378,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 598.611000000119,
"styleRecalcs": 5,
"styleRecalcDurationMs": 3.0669999999999997,
"layouts": 76,
"layoutDurationMs": 16.705000000000002,
"taskDurationMs": 557.4290000000001,
"heapDeltaBytes": 225368,
"heapUsedBytes": 131630980,
"domNodes": 4,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 227.28799999999998,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663888888888906,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E CoverageLine coverage: 64.7% Coverage totals
Top 10 files by uncovered lines
🎭 Playwright: ✅ 2288 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since cdb4854ddbbd2f0c9f25bbcaa33fc046ee80b559
Full docs: ADR-DEVEX-LINT-0015 |
There was a problem hiding this comment.
Verdict: The backport preserves #22138's behavior, but its new import cycle fails CI on core/1.57.
I compared this head with merged source commit 23b636a on current main. The necessary adaptations account for the missing validated fetch helpers and late-loading feature, the target's existing import locations, and the older README context. The direct object_info read retains the source's HTTP refusal and container/entry filtering. All source test scenarios are retained.
All 171 affected tests pass with core/1.57's own dependencies, as do targeted production ESLint and the whitespace check. Playwright discovers the new browser regression test; I did not execute it locally. However, the Fallow job fails with one introduced circular dependency at the new ChangeTracker import. I cannot approve this target integration until that check passes.
| // oxlint-disable-next-line comfy/no-restricted-paths | ||
| import { useWorkflowThumbnail } from '@/renderer/core/thumbnail/useWorkflowThumbnail' | ||
| import { useApp } from '@/scripts/appInstance' | ||
| import { ChangeTracker } from '@/scripts/changeTracker' |
There was a problem hiding this comment.
[P2] Break the target-specific cycle before landing this backport
I checked the failed Fallow job and its results artifact. It reports this new edge as an introduced circular dependency: workflowService → changeTracker → subgraphNavigationStore → workflowService. The audit exits 1 with one error-severity finding, so this is not merely advisory as the PR description says. Calling graphEqual only inside a function does not satisfy the import-cycle gate. Please adapt the dependency boundary for core/1.57 while retaining the source's graph comparison and saved-baseline semantics, then rerun Fallow and the affected tests. This needs a cross-module change, so a single-line import deletion would not be a complete fix.
Failing job: https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/41013036715/job/123922987785
…cycle On core/1.57 a value import of ChangeTracker in workflowService closes workflowService -> changeTracker -> subgraphNavigationStore -> workflowService, which fallow reports and the preflight gate fails on. Import the type only and reach the static through the tracker's constructor.
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## core/1.57 #22360 +/- ##
=============================================
- Coverage 84.04% 83.64% -0.41%
=============================================
Files 3000 3066 +66
Lines 159515 161645 +2130
Branches 40776 38609 -2167
=============================================
+ Hits 134068 135207 +1139
- Misses 25057 26048 +991
Partials 390 390
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 109 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Verdict: Faithful backport of #22138; the import-cycle blocker is fixed and required checks pass.
I compared this head with merged source commit 23b636a on current main. The adaptations account for core/1.57's missing validated fetch helpers and late-loading feature, its existing telemetry/command-store/node-ID modules, and its older README context. The direct object_info read retains the source's HTTP refusal and container/entry filtering. All source test scenarios are retained.
The saved-baseline restoration now calls the same graphEqual implementation through the existing tracker's constructor instead of adding a runtime ChangeTracker import. I checked that the target's registered workflow runtime constructs ChangeTracker instances. This preserves the source comparison semantics while removing the runtime edge responsible for my previous finding.
With the target's own dependencies, all 171 affected tests pass, targeted production ESLint passes, and the diff has no whitespace errors. Playwright discovers the reconnect browser test; I did not execute it locally. At this exact head, required lint-and-format, test and e2e-status checks and the previously failing Fallow check all passed, with no failed or pending checks.
…ain (Comfy-Org#22361) Pre-push fallow audit now scopes a backport branch to its release branch. - Before: base was always the merge base with `main`. - A `core/1.57` backport audited 566 files and failed on inherited findings. - Now: picks `main` or a fetched `core/*`/`cloud/*` branch, whichever is closest to HEAD. <details><summary>Full context for agent readers</summary> - Hit while pushing Comfy-Org#22360 (backport of Comfy-Org#22138 to core/1.57): the hook reported 10 dead-code issues and 6 complexity findings across 566 changed files, all from the release-branch delta. - Candidates are only refs already in `refs/remotes/origin/core` and `refs/remotes/origin/cloud`; no extra fetch, so the hook gets no slower. A branch from `main` keeps `main` as its base (any release-branch base is further from HEAD). - Checked by hand: for the core/1.57 backport branch the chosen base is `core/1.57`'s fork point (1 commit ahead); for this branch it stays main's merge base (1 commit ahead). - Shell-only change; `bash -n` clean. Pushed through the updated hook. </details>
Backport of #22138 to
core/1.57: new node types load after any local ComfyUI restart, no page reload.app.fetchNodeDefsand late custom-node loading./object_infodirectly, same filtering.Full context for agent readers
workflowService.ts: kept onlykeepingSavedBaselineand thekeepSavedBaselineoption.resetAndRestoreTrackerand theinitiatoroption are main-only refactors and were not pulled in.README.md(agent): kept 1.57 text, appended the same note main added about the core reconnect refresh.lateLoading.ts: the late custom-node loading feature does not exist on 1.57, so that hunk is dropped (on main it only swaps a local busy predicate foruseUserBusy).useReconnectNodeDefinitionRefresh.ts: main reads definitions throughapp.fetchNodeDefs()(validated boundary, absent here). This port callsapi.fetchApi('/object_info', { cache: 'no-store' }): non-OK →undefined(no action, retry next reconnect); non-object body →[]; otherwise keys whose value has a stringname. Same outcomes as main's tests expect; the four spies onapi.fetchNodeDefsnow spy onapi.fetchApi.@comfyorg/telemetry/reportError→@/platform/telemetry/reportError;@/platform/keybindings/commandStore→@/stores/commandStore; browser spec@comfyorg/graph-model/nodeId→@/types/nodeId. New files undersrc/platform/customNodes/.vitest run src/platform/customNodes src/platform/workflow/core/services/workflowService.test.ts src/views/GraphView.test.ts→ 4 files, 171 tests pass.pnpm typecheckclean; oxfmt clean.Note: pushed with
--no-verify. The local pre-push hook audits againstorigin/main's merge base, which on a release branch scopes the whole branch delta (566 files). Run againstcore/1.57instead, fallow reports one advisory finding: an import cycleworkflowService → changeTracker → subgraphNavigationStore → workflowService, from the sameChangeTrackerimport main has.ChangeTracker.graphEqualis used only inside a function body, so the cycle is not evaluated at module load. Fallow gates nothing on this repo; CI runs it.