Repository navigation
[backport core/1.53] refactor(assets): gate asset surfaces on server assets flag, retire Comfy.Assets.UseAssetAPI - #18729
Conversation
…omfy.Assets.UseAssetAPI (#17117) Retires the hidden `Comfy.Assets.UseAssetAPI` setting. Asset surfaces now follow the backend's `assets` capability flag. Widget-embedded model pickers stay cloud-only, under a name that says so. The backend already advertises `assets` support, so a hidden client override was redundant — and on core it could force asset mode against a server with no `/assets` endpoints. The gate functions were misleadingly named. `isAssetAPIEnabled` / `shouldUseAssetBrowser` read as "is the asset API on", but actually gated *widget* pickers — which are cloud-only because `MODEL_NODE_MAPPINGS` is only maintained for cloud. They're now `isWidgetAssetPickerEnabled` / `shouldUseWidgetAssetPicker`, hardcoded to `isCloud`. 67 files, small surface: **18 production**, 30 one-line locale deletions, 19 test migration. Commit 1 is production, commits 2–3 are tests. Unchanged for default settings on cloud, and on core without `--enable-assets`. **Core+ (`--enable-assets`)** — the model library enters asset mode. Six deliberate consequences, each already asserted by `modelLibraryAssetMode.spec.ts`: 1. Tree data from `/assets` instead of `api.getModels` 2. `visibleModelFolders` hides loaded-but-empty folders 3. The `supportsModelTypeTags` watcher goes live 4. Refresh issues `POST /assets/seed` via `requestModelScan()` 5. The per-folder extension allowlist applies client-side 6. The tab hides "Load all folders" and eager-loads on mount, bypassing `Comfy.ModelLibrary.AutoLoadAll` — the most visible off-cloud change **Anyone who had flipped the hidden setting:** - Cloud, set `false` → asset surfaces return; that opt-out is deliberately retired - Core, set `true` → no longer forces asset mode at servers that can't serve it (broken by construction) - Core−, palette command → silent no-op instead of a dialog offering to enable an API the server lacks **Deliberately untouched:** `Comfy.ModelLibrary.UseAssetBrowser` (sidebar-vs-modal), `Comfy.Assets.Sidebar.ViewMode`, `MODEL_NODE_MAPPINGS`. This PR edits `scripts/checkAssetsFlagArtifact.ts`, which statically proves non-cloud bundles strip the widget gate. Its non-cloud invariant is byte-identical — only the cloud regex and the function locator changed, tracking the rename. Verified against real builds for all three distributions, and mutation-tested: reverting the gate to a runtime setting read, or flipping its polarity, both still fail the check. Full unit suite and all touched e2e specs pass. `Comfy_ToggleAssetAPI` and its `menuLabels` mirror are removed from all 15 locales. The command is gone, so the keys are unreachable — a pure deletion, no translation pass. `pnpm locale:check`: 0 prunable keys, was 28. (cherry picked from commit dffad2d)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🎭 Playwright: ✅ 1912 passed, 0 failed · 1 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle Size
⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-24T21:18:46.842Z",
"gitSha": "c1d934c7914c0ce68ebcc5b36b2a4b642bbb22e8",
"branch": "backport-17117-to-core-1.53",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2025.935000000004,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.340000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 418.728,
"heapDeltaBytes": -14021728,
"heapUsedBytes": 56819628,
"domNodes": -279,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 6.667000000000001,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2019.8609999999917,
"styleRecalcs": 12,
"styleRecalcDurationMs": 7.093999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 427.16499999999996,
"heapDeltaBytes": 7519252,
"heapUsedBytes": 77963868,
"domNodes": -277,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 7.100000000000002,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1720.4329999999572,
"styleRecalcs": 74,
"styleRecalcDurationMs": 24.979000000000003,
"layouts": 14,
"layoutDurationMs": 3.302,
"taskDurationMs": 712.171,
"heapDeltaBytes": -7737876,
"heapUsedBytes": 62924736,
"domNodes": -280,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 108.836,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1704.431999999997,
"styleRecalcs": 74,
"styleRecalcDurationMs": 25.266000000000005,
"layouts": 14,
"layoutDurationMs": 3.2329999999999997,
"taskDurationMs": 666.122,
"heapDeltaBytes": -11048580,
"heapUsedBytes": 59702932,
"domNodes": -278,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 103.26299999999999,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1671.842999999967,
"styleRecalcs": 30,
"styleRecalcDurationMs": 12.122000000000002,
"layouts": 6,
"layoutDurationMs": 0.9629999999999999,
"taskDurationMs": 289.80899999999997,
"heapDeltaBytes": 4442384,
"heapUsedBytes": 75104592,
"domNodes": 79,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 9.154000000000002,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1658.5900000000038,
"styleRecalcs": 30,
"styleRecalcDurationMs": 11.693999999999999,
"layouts": 6,
"layoutDurationMs": 0.8920000000000001,
"taskDurationMs": 281.215,
"heapDeltaBytes": 4441672,
"heapUsedBytes": 75114988,
"domNodes": 78,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 7.627999999999999,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 574.6859999999856,
"styleRecalcs": 12,
"styleRecalcDurationMs": 6.0840000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 361.981,
"heapDeltaBytes": 18455776,
"heapUsedBytes": 82745856,
"domNodes": 20,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 122.73200000000001,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 536.7820000000165,
"styleRecalcs": 12,
"styleRecalcDurationMs": 5.176,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 330.755,
"heapDeltaBytes": -7845464,
"heapUsedBytes": 62901488,
"domNodes": 20,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 109.733,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 2011.1390000000142,
"styleRecalcs": 6,
"styleRecalcDurationMs": 3.8010000000000024,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 498.11300000000006,
"heapDeltaBytes": 10279472,
"heapUsedBytes": 85893260,
"domNodes": -270,
"jsHeapTotalBytes": -1130496,
"scriptDurationMs": 32.01,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2025.351999999998,
"styleRecalcs": 8,
"styleRecalcDurationMs": 4.749000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 498.896,
"heapDeltaBytes": 10781352,
"heapUsedBytes": 86063372,
"domNodes": -266,
"jsHeapTotalBytes": -1392640,
"scriptDurationMs": 21.82,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2113.756999999964,
"styleRecalcs": 64,
"styleRecalcDurationMs": 6.772,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1169.625,
"heapDeltaBytes": 21798136,
"heapUsedBytes": 88017388,
"domNodes": 4,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 564.4559999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2146.099999999933,
"styleRecalcs": 68,
"styleRecalcDurationMs": 8.056000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1242.205,
"heapDeltaBytes": 10704296,
"heapUsedBytes": 87926688,
"domNodes": -270,
"jsHeapTotalBytes": 667648,
"scriptDurationMs": 598.286,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3131.528000000003,
"styleRecalcs": 63,
"styleRecalcDurationMs": 10.459,
"layouts": 60,
"layoutDurationMs": 10.697,
"taskDurationMs": 1276.7180000000003,
"heapDeltaBytes": 7724696,
"heapUsedBytes": 75169552,
"domNodes": 8,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 548.943,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3072.593999999981,
"styleRecalcs": 63,
"styleRecalcDurationMs": 8.231000000000002,
"layouts": 60,
"layoutDurationMs": 7.838999999999999,
"taskDurationMs": 1193.3799999999999,
"heapDeltaBytes": 10795488,
"heapUsedBytes": 79895736,
"domNodes": 8,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 502.29699999999997,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2101.3869999999883,
"styleRecalcs": 43,
"styleRecalcDurationMs": 4.663999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1356.5819999999999,
"heapDeltaBytes": 14397816,
"heapUsedBytes": 81441892,
"domNodes": -5,
"jsHeapTotalBytes": 1204224,
"scriptDurationMs": 635.849,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "legacy-node-drag",
"durationMs": 2259.064999999964,
"styleRecalcs": 44,
"styleRecalcDurationMs": 4.858000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1374.4299999999998,
"heapDeltaBytes": 17871728,
"heapUsedBytes": 85119120,
"domNodes": 8,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 645.8870000000001,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2010.5379999999968,
"styleRecalcs": 6,
"styleRecalcDurationMs": 3.518999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 468.53900000000004,
"heapDeltaBytes": 10517520,
"heapUsedBytes": 87067340,
"domNodes": -271,
"jsHeapTotalBytes": -2703360,
"scriptDurationMs": 22.779000000000007,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2002.4160000000393,
"styleRecalcs": 6,
"styleRecalcDurationMs": 3.9489999999999976,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 452.547,
"heapDeltaBytes": 21850752,
"heapUsedBytes": 87314656,
"domNodes": -271,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 24.831,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 541.1720000000173,
"styleRecalcs": 48,
"styleRecalcDurationMs": 7.656999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 316.691,
"heapDeltaBytes": 14845916,
"heapUsedBytes": 87617872,
"domNodes": 22,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 100.81599999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 498.1989999999996,
"styleRecalcs": 47,
"styleRecalcDurationMs": 7.283000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 294.04600000000005,
"heapDeltaBytes": 14926328,
"heapUsedBytes": 87775756,
"domNodes": 20,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 94.399,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2003.9050000000316,
"styleRecalcs": 11,
"styleRecalcDurationMs": 6.612999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 409.004,
"heapDeltaBytes": -11943792,
"heapUsedBytes": 60903328,
"domNodes": -292,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 7.437999999999999,
"eventListeners": -231,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2022.073999999975,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.8679999999999986,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 406.667,
"heapDeltaBytes": 2429572,
"heapUsedBytes": 75221644,
"domNodes": -293,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 6.284999999999999,
"eventListeners": -231,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1727.4829999999497,
"styleRecalcs": 78,
"styleRecalcDurationMs": 26.062999999999995,
"layouts": 18,
"layoutDurationMs": 3.3230000000000004,
"taskDurationMs": 644.263,
"heapDeltaBytes": -12375536,
"heapUsedBytes": 60333012,
"domNodes": -294,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 72.735,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1672.5400000000263,
"styleRecalcs": 78,
"styleRecalcDurationMs": 24.126,
"layouts": 18,
"layoutDurationMs": 3.1279999999999997,
"taskDurationMs": 597.0360000000001,
"heapDeltaBytes": -13080848,
"heapUsedBytes": 59745968,
"domNodes": -297,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 66.31099999999999,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 916.0369999999602,
"styleRecalcs": 20,
"styleRecalcDurationMs": 23.012999999999998,
"layouts": 16,
"layoutDurationMs": 10.227999999999998,
"taskDurationMs": 691.821,
"heapDeltaBytes": -7347800,
"heapUsedBytes": 86427696,
"domNodes": 13751,
"jsHeapTotalBytes": 11010048,
"scriptDurationMs": 20.734999999999996,
"eventListeners": 2381,
"totalBlockingTimeMs": 102,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8143.274000000019,
"styleRecalcs": 248,
"styleRecalcDurationMs": 26.776999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4297.549,
"heapDeltaBytes": 13489668,
"heapUsedBytes": 89135088,
"domNodes": -270,
"jsHeapTotalBytes": -118784,
"scriptDurationMs": 1876.7559999999999,
"eventListeners": -167,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8188.535999999999,
"styleRecalcs": 247,
"styleRecalcDurationMs": 27.199,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4361.135,
"heapDeltaBytes": -16181744,
"heapUsedBytes": 84655384,
"domNodes": -269,
"jsHeapTotalBytes": -1392640,
"scriptDurationMs": 1924.507,
"eventListeners": -137,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 11201.870999999983,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10589.612,
"heapDeltaBytes": -34184340,
"heapUsedBytes": 175963824,
"domNodes": -6548,
"jsHeapTotalBytes": -2985984,
"scriptDurationMs": 145.066,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 12023.694999999974,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11353.017,
"heapDeltaBytes": -33100456,
"heapUsedBytes": 176485820,
"domNodes": -6548,
"jsHeapTotalBytes": -3088384,
"scriptDurationMs": 178.26000000000002,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 14119.600999999988,
"styleRecalcs": 69,
"styleRecalcDurationMs": 12.05399999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13436.567000000001,
"heapDeltaBytes": -10842296,
"heapUsedBytes": 189898012,
"domNodes": -6548,
"jsHeapTotalBytes": 2293760,
"scriptDurationMs": 676.3560000000001,
"eventListeners": -7473,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 14681.695999999989,
"styleRecalcs": 71,
"styleRecalcDurationMs": 12.419000000000013,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14084.566000000003,
"heapDeltaBytes": -27072316,
"heapUsedBytes": 188670704,
"domNodes": -6548,
"jsHeapTotalBytes": -913408,
"scriptDurationMs": 756.437,
"eventListeners": -7473,
"totalBlockingTimeMs": 42,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 4344.789999999989,
"styleRecalcs": 20,
"styleRecalcDurationMs": 60.59600000000004,
"layouts": 20,
"layoutDurationMs": 20.348000000000006,
"taskDurationMs": 4209.275,
"heapDeltaBytes": -25773484,
"heapUsedBytes": 176363604,
"domNodes": -6548,
"jsHeapTotalBytes": 12599296,
"scriptDurationMs": 75.92799999999998,
"eventListeners": -7473,
"totalBlockingTimeMs": 24,
"frameDurationMs": 17.220000000000013,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 4044.655999999918,
"styleRecalcs": 20,
"styleRecalcDurationMs": 60.284999999999975,
"layouts": 20,
"layoutDurationMs": 18.394999999999996,
"taskDurationMs": 3893.6600000000008,
"heapDeltaBytes": -19831060,
"heapUsedBytes": 182043872,
"domNodes": -6548,
"jsHeapTotalBytes": 14962688,
"scriptDurationMs": 64.993,
"eventListeners": -7473,
"totalBlockingTimeMs": 100,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "workflow-execution",
"durationMs": 448.72299999997267,
"styleRecalcs": 15,
"styleRecalcDurationMs": 16.740000000000002,
"layouts": 2,
"layoutDurationMs": 0.569,
"taskDurationMs": 97.20899999999999,
"heapDeltaBytes": 5076384,
"heapUsedBytes": 73555432,
"domNodes": 130,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 6.444999999999999,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 451.7549999999346,
"styleRecalcs": 20,
"styleRecalcDurationMs": 16.882,
"layouts": 3,
"layoutDurationMs": 1.3380000000000003,
"taskDurationMs": 93.08500000000001,
"heapDeltaBytes": 5209456,
"heapUsedBytes": 73668192,
"domNodes": 150,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 8.013,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 E2E CoverageNote Shard completeness could not be verified for this run, so these totals may not be comparable with a whole merge.
Top 10 files by uncovered lines
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7cdae05ce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| () => flags.assetsEnabled, | ||
| () => { | ||
| reloadModels().catch((error) => { | ||
| reportError(error, { errorType: 'model_library_capability_reload' }) |
There was a problem hiding this comment.
Rename the telemetry error type to the required form
Both new failure handlers emit model_library_capability_reload, which starts with the subject and uses reload rather than a present-participle operation. This prevents these failures from sorting and grouping with the repository's error telemetry taxonomy; use a generic-to-specific slug such as error_reloading_model_library_after_capability_change.
AGENTS.md reference: src/AGENTS.md:L23-L28
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Rejected: out of scope for a backport. Renaming it here would split the error type across branches; it belongs on main.
| watch( | ||
| () => flags.assetsEnabled, | ||
| () => { | ||
| reloadModels().catch((error) => { | ||
| reportError(error, { errorType: 'model_library_capability_reload' }) | ||
| }) | ||
| } |
There was a problem hiding this comment.
Serialize the capability reload with the eager load
When the feature_flags handshake enables assets after GraphView has populated the folder names but before any folder has loaded, this watcher races the mounted sidebar's new loadModels() watcher. reloadModels() snapshots every old folder as uninitialized, while loadModels() starts loading those legacy folder objects; the reload then replaces them with fresh, uninitialized asset-backed folders, so the completed legacy loads are detached and asset-mode search and badges remain incomplete until the user expands folders or refreshes. The source-switch reload and asset-mode eager load need to be one serialized operation.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Rejected for this backport: the same code is on main from #17117. Being fixed on main, and that fix will be offered as its own backport.
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## core/1.53 #18729 +/- ##
=============================================
+ Coverage 83.33% 83.43% +0.09%
=============================================
Files 2036 2035 -1
Lines 117778 117929 +151
Branches 32696 33302 +606
=============================================
+ Hits 98156 98395 +239
+ Misses 19268 19171 -97
- Partials 354 363 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 64 files with indirect coverage changes 🚀 New features to boost your workflow:
|
christian-byrne
left a comment
There was a problem hiding this comment.
Reviewed as the 1.53 backport of #17117, since this is the change that puts the server-flag gating in front of the external testing cohort.
The two E2E failures are pre-existing on core/1.53, not caused by this PR
I want to state the evidence rather than the conclusion, because the conclusion is the opposite of what it first looked like.
The run fails allNodes.spec.ts:61 (S3 save/reload contracts) and connectivity.spec.ts:208 (representative edges through model, serialize and prompt conversion), with graphToPrompt rejected a restored dangling link: InvalidLinkError: No input node found for id [734] slot [0] model. On an assets-gating backport, two failures both naming model slots is about as incriminating as CI gets.
First control, against main: main's latest CI: Tests Custom Nodes run has 51 failures, and neither of these two is among them. Taken alone that supports the regression reading, since the failure set is disjoint and ours are the assets-shaped ones.
Second control, against unrelated core/1.53 backports:
| Run | Failures | Ours? |
|---|---|---|
backport-17486-to-core-1.53 |
2 | both |
backport-18301-to-core-1.53 |
2 | both |
backport-17916-to-core-1.53 |
0 | — |
Two backports with nothing to do with assets fail exactly these two tests and nothing else. So they are a property of core/1.53, not of this change. The third run being clean says they are intermittent or environment-dependent on that branch rather than hard-broken, which is worth knowing separately.
Not a blocker for this PR. It is worth someone owning on the branch, because "custom nodes E2E is red" is currently indistinguishable from "custom nodes E2E is red for a new reason", and this PR is exactly the kind of change where that distinction matters.
The Vercel – billing-web-test failure is a preview deploy and looks unrelated to the diff.
The actual finding: three files from #17117 are not in this backport
.github/actions/build-cloud-frontend/action.yaml
scripts/checkAssetsFlagArtifact.ts
scripts/checkAssetsFlagArtifact.test.ts
67 files in the original, 64 here, and nothing added in exchange.
Those are not incidental CI plumbing. checkAssetsFlagArtifact is the build gate for the exact refactor being backported. It asserts, per distribution, that the widget asset-picker gate compiles to a static constant, false/!1 off-cloud, which is what proves the picker is statically stripped and lets the bundler drop everything behind it. It also scans every chunk, including sourcesContent, for COMFY_PRODUCTION_FORBIDDEN_MOCK_ASSET_SENTINEL, so a test-fixture mock asset cannot reach a production bundle. The action wiring is what makes it run on every caller of build-cloud-frontend.
So core/1.53 gets the refactor without the check that the refactor stayed correct. On the branch that is about to carry the external testing cohort, that inverts the usual backport risk trade: the release line with the less watched build is the one losing the build gate.
Three ways this could be fine, and I cannot tell which from here:
- The gate depends on build tooling that does not exist on
core/1.53, so it could not be carried. isWidgetAssetPickerEnableddiffers enough on 1.53 that the assertions would not hold as written.- It was dropped as CI-only noise during the backport.
If (1) or (2), say so in the description and I am satisfied. If (3), I would carry them: they are self-contained, and the sentinel scan in particular is cheap insurance against precisely the failure mode a hurried backport introduces.
Otherwise
The remaining 64 files line up with the original one for one, and the diff is the same shape: +374/-364 here against +455/-448 there, consistent with 1.53 lacking some of the surfaces main had rather than with hunks being dropped.
No objection to the backport itself. Answer the three-file question and this is good to go.
|
Answering the three-file question. The files were never on That's closest to your (1), but narrower. So I'd keep this PR as the #17117 backport and treat the gate as a separate backport of #16480 and #16570. The description now says this. On the custom-nodes E2E: agreed, it's pre-existing. One correction: #18525's first attempt failed the same two tests (its second attempt errored after the PR merged). Every Separately, Codex's P2 about the late assets-flag reload is a real race, and it's in #17117 on main as well. When the flag arrives after the folder names load, the sidebar's eager load lands on the legacy folders that the reload then replaces, so asset-mode folders stay unloaded until you expand one or search. I'm fixing it on main. Do you want that fix backported to this line as well? Answering from my context. 👎 if unhelpful. |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @synap5e.
Found 8 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 2 |
| 🟢 Low | 5 |
| ⚪ Nit | 1 |
Panel: 8/8 reviewers contributed findings.
| watch( | ||
| () => flags.assetsEnabled, | ||
| async (enabled) => { | ||
| if (enabled) await withLoadFailureToast(() => modelStore.loadModels()) |
There was a problem hiding this comment.
🟡 Medium — This watcher duplicates the new watch(() => flags.assetsEnabled) added to modelStore in the same PR, and both fire on the same flip. The store's reloadModels() rebuilds the folder map and only re-loads folders that were non-Uninitialized before the flip, so this loadModels() populates the pre-flip folder objects (still holding the legacy api.getModels closure) which the store's commit then discards — leaving the freshly committed map entirely Uninitialized in the common case, plus a possible spurious modelLibraryLoadFailed toast from the discarded legacy fetch. Consider dropping this watcher and letting the store's reload own the eager load.
Raised by 5 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro edge-case, gpt-5.6-sol-max edge-case).
There was a problem hiding this comment.
Rejected for this backport: the same code is on main from #17117. Being fixed on main, and that fix will be offered as its own backport.
| watch( | ||
| () => flags.assetsEnabled, | ||
| () => { | ||
| reloadModels().catch((error) => { |
There was a problem hiding this comment.
🟡 Medium — If this one-shot reload rejects (e.g. a transient getModelFolders failure right at handshake time), the error is only reported: the already-built ModelFolders keep the getModelsFunc captured for the previous capability while flags.assetsEnabled has already flipped, so the data source and every flag-derived gate (visibleModelFolders, widget routing) disagree with no retry until a manual refresh. Consider retrying or marking the library stale on failure.
Raised by 2 of 8 reviewers (gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case).
There was a problem hiding this comment.
Rejected: out of scope for a backport (identical to #17117 on main); noted for main.
| import { useToastStore } from '@/platform/updates/common/toastStore' | ||
|
|
||
| export async function openModelLibraryBrowser(): Promise<void> { | ||
| if (!useFeatureFlags().flags.assetsEnabled) return |
There was a problem hiding this comment.
🟢 Low — This early return makes Comfy.BrowseModelAssets a completely silent no-op: the command stays registered and visible in the command palette on every distribution, so on a backend without the assets capability the user invokes it and gets no dialog, no toast, not even a console line — the removed flow at least prompted to enable the API. Gate the command's registration/visibility on flags.assetsEnabled, or surface a toast here.
Raised by 5 of 8 reviewers (claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro edge-case, kimi-k3-max edge-case).
There was a problem hiding this comment.
Rejected: deliberate in #17117. The command does nothing when the server doesn't advertise assets.
| * stale response a no-op, so no debouncing is needed here. | ||
| */ | ||
| watch( | ||
| () => flags.assetsEnabled, |
There was a problem hiding this comment.
🟢 Low — Unlike the scan subscription a few lines above, which deliberately skips work with if (!modelDataConsumed) return, this watcher reloads unconditionally — a handshake landing after store init fires api.getModelFolders() plus a per-folder walk even when no UI has ever read the store. Applying the same modelDataConsumed guard would keep the two capability paths consistent.
Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Rejected: out of scope for a backport (identical to #17117 on main). A modelDataConsumed guard would also leave the boot-built folders on the wrong data source.
| // Cloud always has assets enabled, so the unmocked asset endpoints would 403 | ||
| // and workflow restore would throw uncaught. One glob covers every shape boot | ||
| // asks for: `/api/assets`, `?query`, `/seed`, `/<id>`. | ||
| await page.route('**/api/assets**', (route) => { |
There was a problem hiding this comment.
🟢 Low — The comment claims one glob covers /<id>, but the fulfilled body is the list envelope: **/api/assets** also matches GET /api/assets/<id>, which assetService.getAssetDetails validates against the single-asset schema and rejects with Invalid asset response against zod schema — reproducing the exact uncaught boot-chain throw this mock exists to prevent (/<id>/content is likewise served JSON). Match only the list shapes or branch on the URL; the same block is duplicated verbatim in checkoutRecovery.spec.ts and pricingTableDeepLink.spec.ts.
Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, kimi-k3-max edge-case).
There was a problem hiding this comment.
Rejected: out of scope for a backport. The fixture is identical on main, and no current test fetches those paths.
| if (!isCloud) return false | ||
| return !!useSettingStore().get('Comfy.Assets.UseAssetAPI') | ||
| function isWidgetAssetPickerEnabled(): boolean { | ||
| return isCloud |
There was a problem hiding this comment.
🟢 Low — Every other asset surface in this PR now gates on flags.assetsEnabled, but widget pickers gate on distribution alone, so a cloud backend that does not advertise assets (incident, staged rollout, older deployment) still renders pickers that call asset endpoints — and with Comfy.Assets.UseAssetAPI gone there is no user- or server-side kill switch left. Consider isCloud && useFeatureFlags().flags.assetsEnabled.
Raised by 2 of 8 reviewers (kimi-k3-max adversarial, gemini-3.1-pro edge-case).
There was a problem hiding this comment.
Rejected: widget pickers are deliberately cloud-only in #17117.
|
|
||
| function createGetModelsFunc(): (folder: string) => Promise<ModelFile[]> { | ||
| return usesAssetApi() | ||
| return flags.assetsEnabled |
There was a problem hiding this comment.
🟢 Low — Deriving the data source purely from the capability flag means a non-cloud backend that merely advertises assets now silently switches the model library from the live filesystem listing to the asset database, with the user setting that previously defaulted off locally no longer available as an escape hatch. If that database is not yet seeded, visibleModelFolders filters out the empty folders, so the sidebar renders blank with no hint that anything is missing.
Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Rejected: retiring Comfy.Assets.UseAssetAPI is the intent of #17117.
| await commandStore.commands | ||
| .find((cmd) => cmd.id === 'Comfy.BrowseModelAssets') | ||
| ?.function?.() | ||
| await openModelLibraryBrowser() |
There was a problem hiding this comment.
⚪ Nit — Calling the implementation directly instead of resolving Comfy.BrowseModelAssets from the command store bypasses the command registry, so an extension that re-registers that command id (allowed — registerCommand replaces by id) now affects only the palette entry and not the model-library sidebar button. Resolving through useCommandStore() keeps the two entry points in agreement.
Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Rejected: out of scope for a backport (identical to #17117 on main).
christian-byrne
left a comment
There was a problem hiding this comment.
Verified your three-file answer and it holds, with a control: scripts/checkAssetsFlagArtifact.ts 404s on core/1.53 and resolves on main, and #16480/#16570 both merged to main only. So the file-set difference is 1.53 lacking those two PRs, not this backport dropping anything. That closes it for me.
Your version is also narrower and better evidenced than my (1) — I asked whether the tooling was absent; you went and proved the gate itself compiles correctly on 1.53 by copying main's script across and checking return!1 off-cloud and return!0 on cloud. Treating the gate as a separate backport of #16480 and #16570 is the right split, and having the description say so is what I actually wanted.
Taking your E2E correction too. I established pre-existing by comparing against #17486 and #18301; you've given the sharper fact, that #18525's first attempt failed the same two and every core/1.53 run since 2026-09-22 ~23:00 UTC fails them identically. That's an onset, which is more useful than my "not caused by this PR".
On backporting the late-flag reload race: yes
Specifically because this is the cohort line.
The whole reason #17117 is being backported is to put server-flag gating in front of the external testers. If 1.53 gets the refactor without the race fix, then the first thing that cohort sees of asset-mode folders is the broken ordering: folders stay unloaded until they expand one or search. They will report it, and it will read as "assets sidebar is empty" rather than "load-order race", so you would be paying for the reports twice — once triaging them, once re-testing after the fix lands.
Shipping a known defect to the population you assembled to find unknown defects is the part that makes this worth the extra backport, rather than general risk appetite about touching a release line.
One sequencing ask: land them together, or land the race fix on main first and backport both in order. If this merges alone there is a window where 1.53 carries the refactor and not the fix, and if the cohort starts in that window the first-impression problem happens anyway.
Not blocking this PR on it — it's approved and correct as the #17117 backport. Just don't want the cohort to meet 1.53 in between.
|
I second being careful on an actual merge here. I'll take a closer look at the actual tests once I've looked over the sibbling backports. From my very quick hand testing everythin appears to work as expected. |
christian-byrne
left a comment
There was a problem hiding this comment.
@AustinMroz — since you're about to look at the tests across the sibling backports, here's what's already been established so you don't redo it.
The two custom-nodes E2E failures on this PR are pre-existing on core/1.53, not caused by it. What I verified directly:
main's latestCI: Tests Custom Nodesrun has 51 failures, and neither of these two is among them. That alone looks like evidence for a regression, which is why the second control matters.backport-17486-to-core-1.53andbackport-18301-to-core-1.53— neither touching assets — each fail exactly these two tests and nothing else.backport-17916-to-core-1.53had zero.
Failing tests are allNodes.spec.ts:61 (S3 enrolled save/reload contracts) and connectivity.spec.ts:208 (representative edges through model/serialize/prompt), with graphToPrompt rejected a restored dangling link: InvalidLinkError: No input node found for id [734] slot [0] model.
Both name model slots on an assets-gating backport, which is about as incriminating as CI gets and is exactly why one control isn't enough. Stopping after the main comparison would have produced a confident, wrong regression report.
Simon added an onset I have not independently checked: that #18525's first attempt failed the same two, and every core/1.53 run since 2026-09-22 ~23:00 UTC fails them identically. Worth confirming if you need the exact boundary, but the "not this PR" conclusion stands on the two backport controls alone.
The separate thing worth your eye when you get to it is the late-flag reload race Codex found (P2), which is in #17117 on main too and is the one defect here that a tester would actually notice: asset-mode folders stay unloaded until expanded or searched. Simon is fixing it on main and asked about backporting; I argued yes, because this is the cohort line and the sequencing matters — merging this alone opens a window where 1.53 has the refactor without the fix.
Manual backport of #17117 to
core/1.53. The automated backport failed with merge conflicts (#17117 (comment)).Cherry-picked from dffad2d (
git cherry-pick -x).Why
On
core/1.53, the hiddenComfy.Assets.UseAssetAPIsetting and theComfy.ToggleAssetAPI/Comfy.BrowseModelAssetspalette commands can put the model library in asset mode against a server that doesn't advertise theassetsfeature, so it calls/api/assetson a backend that doesn't serve it. This ties the model library, sidebar tab, model store and those commands to the server assets flag (useFeatureFlags().flags.assetsEnabled) and removes the setting and toggle command.Dependency check
No open PRs target
core/1.53. As with #18727 (core/1.54) and #18728 (cloud/1.54), the conflicts are real and come from main-only test-mock migrations and files that don't exist on this branch.Conflict resolution
14 files:
.github/actions/build-cloud-frontend/action.yaml: keptcore/1.53. refactor(assets): gate asset surfaces on server assets flag, retire Comfy.Assets.UseAssetAPI #17117 only reworded a step that isn't present here.scripts/checkAssetsFlagArtifact.ts,scripts/checkAssetsFlagArtifact.test.ts: not carried. They, and the CI wiring and build manifest they depend on, come from Address review on #16379: fix the shared cloud action, scope the gate scan, pin the gate shape #16480 and fix(scripts): follow-up to #16480 — checkAssetsFlagArtifact hardening + CI build tweaks #16570, which aren't oncore/1.53. Verified locally that the gate still compiles to the expected per-distribution constant on this branch. Adding the check to 1.53 would be a separate backport of those PRs.src/stores/modelStore.ts,src/stores/workspace/sidebarTabStore.ts,src/composables/useCoreCommands.ts: took refactor(assets): gate asset surfaces on server assets flag, retire Comfy.Assets.UseAssetAPI #17117.usesAssetApiandComfy.ToggleAssetAPIare removed, andComfy.BrowseModelAssetsopens throughopenModelLibraryBrowser().src/platform/assets/services/assetService.ts: took theisWidgetAssetPickerEnabledrename and droppedEXPERIMENTAL_WARNING. Keptcore/1.53'sresult.error ? … : 'Unknown validation error'guard ingetAssetDetails.ModelLibrarySidebarTab.test.ts,useCoreCommands.test.ts,assetService.test.ts,assetPreviewUtil.test.ts,useComboWidget.test.ts,modelStore.test.ts,sidebarTabStore.test.ts): keptcore/1.53's mocking style and ported only the setting-to-flag change.modelStore.test.tsalso takes refactor(assets): gate asset surfaces on server assets flag, retire Comfy.Assets.UseAssetAPI #17117'sremoteConfigholder mock so state doesn't leak between tests.No other changes from main are included.
Validation
pnpm typecheckandpnpm typecheck:browser: cleaneslinton changed files: cleanvitest runon the touched tests: 292 passed (modelStore.test.ts46/46)--enable-assets, with a temporary request guard that is not included in this PR:/api/assets*requests, including a user with a stale persistedComfy.Assets.UseAssetAPI=true./api/assets*requests.core/1.53recorded/api/assetsand/api/assets/seedrequests with the server flag off.