Repository navigation
refactor(templates): polish template detail decision surface - #16109
mariana953 wants to merge 90 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1883 passed, 0 failed · 2 flaky📊 Browser Reports
📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-09-01T09:42:51.701Z",
"gitSha": "9614d7c1dd98c37686298b604ad0da62d8f30f74",
"branch": "mariana/fe-1491-detail-polish",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2073.3889999999633,
"styleRecalcs": 8,
"styleRecalcDurationMs": 5.491999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 443.96900000000005,
"heapDeltaBytes": 16082796,
"heapUsedBytes": 79298676,
"domNodes": -284,
"jsHeapTotalBytes": 3923968,
"scriptDurationMs": 7.948999999999998,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2028.3239999999978,
"styleRecalcs": 11,
"styleRecalcDurationMs": 6.870000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 407.48699999999997,
"heapDeltaBytes": 13264840,
"heapUsedBytes": 82052180,
"domNodes": -280,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 7.110999999999999,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1747.560999999962,
"styleRecalcs": 73,
"styleRecalcDurationMs": 31.293999999999997,
"layouts": 12,
"layoutDurationMs": 2.983,
"taskDurationMs": 724.504,
"heapDeltaBytes": -8552192,
"heapUsedBytes": 60396588,
"domNodes": -276,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 115.80499999999999,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1743.6569999999847,
"styleRecalcs": 71,
"styleRecalcDurationMs": 27.094000000000005,
"layouts": 12,
"layoutDurationMs": 3.1580000000000004,
"taskDurationMs": 705.274,
"heapDeltaBytes": 4733764,
"heapUsedBytes": 73501528,
"domNodes": -281,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 117.678,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1684.0550000000007,
"styleRecalcs": 31,
"styleRecalcDurationMs": 13.549999999999999,
"layouts": 6,
"layoutDurationMs": 0.5379999999999998,
"taskDurationMs": 291.425,
"heapDeltaBytes": 4502196,
"heapUsedBytes": 73178400,
"domNodes": 80,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 9.011999999999999,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1709.2330000000402,
"styleRecalcs": 31,
"styleRecalcDurationMs": 12.263000000000002,
"layouts": 6,
"layoutDurationMs": 0.48900000000000005,
"taskDurationMs": 291.066,
"heapDeltaBytes": 4539844,
"heapUsedBytes": 73452652,
"domNodes": 76,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 9.376000000000001,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 548.1130000000007,
"styleRecalcs": 12,
"styleRecalcDurationMs": 6.687,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 371.81600000000003,
"heapDeltaBytes": 18790860,
"heapUsedBytes": 87239324,
"domNodes": 20,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 130.20299999999997,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 532.2270000000344,
"styleRecalcs": 11,
"styleRecalcDurationMs": 6.0409999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 355.58299999999997,
"heapDeltaBytes": 18604780,
"heapUsedBytes": 87870772,
"domNodes": 18,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 125.67899999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2023.7450000000194,
"styleRecalcs": 7,
"styleRecalcDurationMs": 4.645,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 475.6889999999999,
"heapDeltaBytes": -12074852,
"heapUsedBytes": 87322768,
"domNodes": -267,
"jsHeapTotalBytes": -1581056,
"scriptDurationMs": 28.287,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2027.9520000000275,
"styleRecalcs": 7,
"styleRecalcDurationMs": 4.632000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 474.3190000000001,
"heapDeltaBytes": -12243116,
"heapUsedBytes": 87180936,
"domNodes": -268,
"jsHeapTotalBytes": -1581056,
"scriptDurationMs": 29.848999999999993,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2136.4169999999945,
"styleRecalcs": 67,
"styleRecalcDurationMs": 12.356000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1297.6770000000001,
"heapDeltaBytes": 9497548,
"heapUsedBytes": 74647572,
"domNodes": -270,
"jsHeapTotalBytes": 1798144,
"scriptDurationMs": 643.33,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2126.7970000000105,
"styleRecalcs": 67,
"styleRecalcDurationMs": 10.488000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1276.9189999999999,
"heapDeltaBytes": 893676,
"heapUsedBytes": 66650856,
"domNodes": 10,
"jsHeapTotalBytes": 1310720,
"scriptDurationMs": 639.332,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3205.618999999956,
"styleRecalcs": 63,
"styleRecalcDurationMs": 12.254000000000001,
"layouts": 60,
"layoutDurationMs": 6.988000000000001,
"taskDurationMs": 1441.652,
"heapDeltaBytes": 10275668,
"heapUsedBytes": 83621412,
"domNodes": -279,
"jsHeapTotalBytes": -2142208,
"scriptDurationMs": 636.392,
"eventListeners": -177,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3112.14300000006,
"styleRecalcs": 62,
"styleRecalcDurationMs": 10.628000000000002,
"layouts": 60,
"layoutDurationMs": 7.0470000000000015,
"taskDurationMs": 1359.553,
"heapDeltaBytes": 21227268,
"heapUsedBytes": 88801268,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 615.8359999999999,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 2290.030999999999,
"styleRecalcs": 42,
"styleRecalcDurationMs": 5.646999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1517.75,
"heapDeltaBytes": 22147224,
"heapUsedBytes": 89291264,
"domNodes": 4,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 747.5699999999999,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2255.290000000059,
"styleRecalcs": 41,
"styleRecalcDurationMs": 5.452999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1535.0469999999998,
"heapDeltaBytes": 22512920,
"heapUsedBytes": 89683060,
"domNodes": 2,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 759.977,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 1999.2089999999507,
"styleRecalcs": 4,
"styleRecalcDurationMs": 2.331999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 443.78700000000003,
"heapDeltaBytes": 21795600,
"heapUsedBytes": 87260632,
"domNodes": -272,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 27.197000000000006,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2001.4949999999772,
"styleRecalcs": 4,
"styleRecalcDurationMs": 2.588,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 449.2680000000001,
"heapDeltaBytes": 22170604,
"heapUsedBytes": 87866604,
"domNodes": -270,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 29.52699999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 520.7139999999981,
"styleRecalcs": 48,
"styleRecalcDurationMs": 9.973999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 326.934,
"heapDeltaBytes": 14737604,
"heapUsedBytes": 85831400,
"domNodes": 22,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 112.58900000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 529.231999999979,
"styleRecalcs": 47,
"styleRecalcDurationMs": 8.632,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 322.83099999999996,
"heapDeltaBytes": 14363568,
"heapUsedBytes": 85989588,
"domNodes": 20,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 110.89200000000001,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2008.0319999999574,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.971000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 394.524,
"heapDeltaBytes": 3201944,
"heapUsedBytes": 67951300,
"domNodes": -298,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 6.569999999999998,
"eventListeners": -233,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2004.4820000000527,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.911,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 402.12699999999995,
"heapDeltaBytes": 1221828,
"heapUsedBytes": 72814228,
"domNodes": -295,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 6.686000000000001,
"eventListeners": -231,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1744.4880000000467,
"styleRecalcs": 76,
"styleRecalcDurationMs": 27.814,
"layouts": 16,
"layoutDurationMs": 3.4119999999999995,
"taskDurationMs": 673.839,
"heapDeltaBytes": -12027460,
"heapUsedBytes": 59143492,
"domNodes": -297,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 85.419,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1727.3610000000872,
"styleRecalcs": 76,
"styleRecalcDurationMs": 27.986,
"layouts": 16,
"layoutDurationMs": 3.364,
"taskDurationMs": 670.5409999999999,
"heapDeltaBytes": -12463684,
"heapUsedBytes": 58936840,
"domNodes": -294,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 90.607,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 899.9059999999872,
"styleRecalcs": 21,
"styleRecalcDurationMs": 24.994999999999997,
"layouts": 16,
"layoutDurationMs": 10.593000000000002,
"taskDurationMs": 712.2789999999999,
"heapDeltaBytes": -3507784,
"heapUsedBytes": 93652420,
"domNodes": 13671,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 22.092,
"eventListeners": 2381,
"totalBlockingTimeMs": 85,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8274.504999999976,
"styleRecalcs": 249,
"styleRecalcDurationMs": 35.829,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4751.993,
"heapDeltaBytes": 841372,
"heapUsedBytes": 75650732,
"domNodes": -267,
"jsHeapTotalBytes": -868352,
"scriptDurationMs": 2201.184,
"eventListeners": -167,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8208.889,
"styleRecalcs": 249,
"styleRecalcDurationMs": 33.842,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4747.089,
"heapDeltaBytes": -31447432,
"heapUsedBytes": 68099392,
"domNodes": -266,
"jsHeapTotalBytes": 1040384,
"scriptDurationMs": 2189.963,
"eventListeners": -137,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 14703.22200000004,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14243.016000000001,
"heapDeltaBytes": -35171700,
"heapUsedBytes": 175499480,
"domNodes": -6548,
"jsHeapTotalBytes": 2375680,
"scriptDurationMs": 220.51299999999998,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 14638.206999999966,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14227.029,
"heapDeltaBytes": -41315776,
"heapUsedBytes": 175199060,
"domNodes": -6548,
"jsHeapTotalBytes": -4128768,
"scriptDurationMs": 218.833,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.33666666666662,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 17473.26400000003,
"styleRecalcs": 145,
"styleRecalcDurationMs": 14.53299999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17066.461,
"heapDeltaBytes": -14312820,
"heapUsedBytes": 189818656,
"domNodes": -6548,
"jsHeapTotalBytes": -5996544,
"scriptDurationMs": 744.1229999999999,
"eventListeners": -7473,
"totalBlockingTimeMs": 2,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 17630.766999999993,
"styleRecalcs": 133,
"styleRecalcDurationMs": 14.77600000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17256.29,
"heapDeltaBytes": -38051824,
"heapUsedBytes": 166044820,
"domNodes": -6548,
"jsHeapTotalBytes": -6189056,
"scriptDurationMs": 809.399,
"eventListeners": -7471,
"totalBlockingTimeMs": 15,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 447.0389999999611,
"styleRecalcs": 19,
"styleRecalcDurationMs": 18.384999999999998,
"layouts": 3,
"layoutDurationMs": 1.0070000000000001,
"taskDurationMs": 92.78500000000001,
"heapDeltaBytes": 5382236,
"heapUsedBytes": 69039828,
"domNodes": 152,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 9.36,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 74.30699999997614,
"styleRecalcs": 6,
"styleRecalcDurationMs": 10.812000000000001,
"layouts": 2,
"layoutDurationMs": 0.8639999999999999,
"taskDurationMs": 52.51,
"heapDeltaBytes": 3102084,
"heapUsedBytes": 70175960,
"domNodes": 124,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 4.710000000000001,
"eventListeners": 25,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000273
}
]
}🔬 E2E Coverage
|
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## ryan-di/fe-1491-stack-05-model-routing #16109 +/- ##
==========================================================================
+ Coverage 80.64% 82.82% +2.17%
==========================================================================
Files 2322 1963 -359
Lines 118525 113303 -5222
Branches 32520 31486 -1034
==========================================================================
- Hits 95585 93841 -1744
+ Misses 22372 19117 -3255
+ Partials 568 345 -223
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 379 files with indirect coverage changes 🚀 New features to boost your workflow:
|
1239376 to
7780b9f
Compare
5baa884 to
85db057
Compare
7780b9f to
974ed95
Compare
85db057 to
2822771
Compare
9df6728 to
024400e
Compare
145b053 to
2306560
Compare
c634193 to
5f6234a
Compare
5f6234a to
01d25c4
Compare
f0c917b to
0e2d29a
Compare
## Summary Validates a fetched template workflow - against the supported schema, then against the explicit legacy-loadable shape - before it reaches graph loading, and moves the shared model-selection helpers to their workflow-core owner. ## Changes - Accepts a supported workflow, or the explicit legacy-loadable shape, and rejects a payload that is neither - reported through telemetry with its own error type rather than the generic load failure. - Carries which of the two accepted it, so a legacy payload is not parsed a second time and does not reach sample-input preparation, which needs a strictly valid workflow. - Moves `getSelectedModelsMetadata` and its node-activity helpers out of `workbench/` into the workflow-core owner, and keeps partial entries a workflow declared while rejecting malformed ones. There is no public prepare/open seam in this slice: `useTemplateWorkflows()` exposes `loadWorkflowTemplate`, and resolution, validation and loading are private stages of that one call. ## Stack Stack 1/6 targeting `main`. Next: [Comfy-Org#15874](Comfy-Org#15874). Cumulative UI: [Comfy-Org#16109](Comfy-Org#16109). ## Review focus - Whether the loose per-entry parse in `declaredModels` is the right contract for `properties.models`: it keeps a bare `{ name }`, because workflows that fail strict validation still load and enrichment fills each field where present. - Whether the legacy-loadable shape is narrow enough to accept, given that `loadGraphData` takes what it accepts. ## Validation At `c3b66c00` on this branch: 3 Vitest files / 75 tests for the files this slice changes. App typecheck (`vue-tsc -p tsconfig.json`) 0 errors, `pnpm oxlint` 0 errors, ESLint 0 errors on the touched trees. Required CI is green on this PR. No GitHub issue to reference with `Fixes #n` - this work is tracked in Linear only. Linear: [FE-1491](https://linear.app/comfyorg/issue/FE-1491) · [Review spec](https://app.notion.com/p/3c76d73d365081c9bffde74a29e5b6c4) --------- Co-authored-by: bymyself <cbyrne@comfy.org> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: jaeone94 <89377375+jaeone94@users.noreply.github.com>
… readiness (Comfy-Org#15872) ## Summary Resolves truthful Desktop model readiness and owns the pre-load Detail admission contract for active model requirements. ## Changes - Reads only the unique model directories referenced by the active template and treats empty, loading, failed, or absent inventory as incomplete evidence. - Enters Detail only when at least one active model is positively missing; all-installed and installed/unknown results direct-open into the existing post-open recovery path. - Resolves unique model URLs with at most six concurrent lookups, a 10-second per-request timeout, and prompt parent cancellation. - Keeps local download admission independent from optional metadata: failed size/gating lookup leaves size unknown without erasing known local downloadability. - Preserves the full active declaration total for the Models group while later stack layers separately derive the remaining startable model size for the CTA. - Reports inventory failures at warning level and normalizes invalid sizes, gated URLs, raw folder labels, and shared model identity. ## Stack Stack 3/6. Previous: [Comfy-Org#15874](Comfy-Org#15874). Next: [Comfy-Org#15873](Comfy-Org#15873). Cumulative UI: [Comfy-Org#16109](Comfy-Org#16109). ## Review focus - Unknown inventory is not proof of absence and therefore does not force the pre-load Detail surface. - Metadata failure cannot silently remove an otherwise valid download action. - Models group total means the complete active declaration; the footer's remaining-download total is a separate selector contract. - Known model kinds keep semantic localized labels; only unknown/raw directories use the generic category formatter. - Broader Civitai taxonomy/parser/cache cleanup remains a follow-up outside this behavior correction. ## Validation At `19ac0b40` on this branch: 8 Vitest files / 179 tests for the files this slice changes. App typecheck (`vue-tsc -p tsconfig.json`) 0 errors, `pnpm oxlint` 0 errors, ESLint 0 errors on the touched trees. Required CI is green on this PR. Linear: [FE-1491](https://linear.app/comfyorg/issue/FE-1491) · [Review spec](https://app.notion.com/p/3c76d73d365081c9bffde74a29e5b6c4) --------- Co-authored-by: Christian Byrne <cbyrne@comfy.org> Co-authored-by: jaeone94 <89377375+jaeone94@users.noreply.github.com>
f5276aa to
b08200e
Compare
… model downloads (Comfy-Org#15873) ## Summary Adds the per-model download tracker primitives for Desktop Template Detail: a composable that holds row state, correlates native host progress, and exposes a read-only `stateFor(model)`. This slice has no production owner — the wiring that mounts it in Detail lands in [Comfy-Org#15875](Comfy-Org#15875), so product behaviour belongs to that PR, not this one. ## Changes - Tracks queued, starting, active, paused, completed, failed and retry states through a reducer, and correlates native progress against them. - Supports Desktop2, legacy Electron and browser outcomes without inventing progress nobody reported. A host that refuses a request — a resolved `false`, matching the convention `openModelAccessPage` documents on the same bridge — fails the row rather than leaving it in `starting`. - Correlates native events by `ComfyDownloadProgress.id` where the host sends one. An attempt is claimed by the job that reports activity for it, only that job may end it, and a job that has delivered its own terminal event cannot claim a later attempt — so arrival order does not decide who holds a retry. A job is remembered on that terminal event rather than on the claim, because a request the host joins to a transfer already running reuses that job's id: the retry's job is the same job, and refusing it would strand the row. One gap this leaves, not closable from the renderer: hosts that send no id at all — older desktop builds, and Electron — keep the attempt heuristic, where a delayed event from an abandoned attempt still reaches the current row. It needs a request token from the host at accept time, and the dispatch result carries no job id today. - Takes resolved folder paths as a value, so a queued row dispatches at once or fails and no lookup outlives its owner. - Creates the legacy Electron subscription only on the first dispatch that lands there, so Desktop2 never constructs that store. - Buffers live Electron progress during the snapshot restore and replays it afterwards, so a delayed snapshot cannot move a download backwards and no live event is dropped. The progress fan-out isolates each subscriber. - Keeps `stateFor(model)` read-only while already-rendered rows still react to later updates, and disposes idempotently. ## Stack Stack 4/6. Previous: [Comfy-Org#15872](Comfy-Org#15872). Next: [Comfy-Org#15875](Comfy-Org#15875). Final assets: [Comfy-Org#20084](Comfy-Org#20084). Cumulative UI: [Comfy-Org#16109](Comfy-Org#16109). ## Review focus - Job-id correlation: whether claiming an attempt on non-terminal activity, and honouring a terminal event only from the claiming job, is the right rule for a payload with no request token. - The snapshot/live-event ordering in `electronDownloadStore.initialize`, which buffers rather than choosing one of the two failure modes. - Rendering an idle row establishes the Vue dependency a later download needs to update in place, without reads creating tracking state. ## Screenshots Every model-row state, from the `Components/Templates/WorkflowTemplateModelStatus → Every State` story (`pnpm storybook`): idle, queued, starting, active, paused, downloaded, failed, cancelled, installed, manual, unavailable and unknown. <img width="410" height="571" alt="Every model-row status state" src="https://github.com/user-attachments/assets/3967182e-9f2c-40e7-ba0c-4b9239a833f6" /> ## Validation At `8bac45b9` on this branch: 5 Vitest files / 128 tests covering the composable, the reducer, the Electron store and the Detail components. App typecheck (`vue-tsc -p tsconfig.json`) 0 errors, `pnpm oxlint` 0 errors, ESLint 0 errors on the touched trees, and `fallow audit --gate new-only` reports no issues across the changed files. CI status at this head is whatever GitHub shows on the PR; the last head I watched to completion was `e2afbc4`, where every required check passed or was skipped. Each fix in this round was checked by reverting it and confirming a named case fails. I did not retain the run output, so the record is the mutation and the case it breaks, quoted on the thread for each finding - reproducible from those two lines rather than from a log I can link. Not verified here: the two-window Desktop race for template inputs, and any manual Desktop flow at this head. Linear: [FE-1491](https://linear.app/comfyorg/issue/FE-1491) · [Review spec](https://app.notion.com/p/3c76d73d365081c9bffde74a29e5b6c4) --------- Co-authored-by: bymyself <cbyrne@comfy.org> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: jaeone94 <89377375+jaeone94@users.noreply.github.com>
… template setup (Comfy-Org#15875) ## Summary Connects the final model launch choices to the already-prepared workflow. ## Changes - `Open now` opens immediately and starts no idle model downloads. - `Download models & open` requests every eligible idle/failed missing model row, then opens immediately without waiting for transfers. - Individual model download remains available from its Detail row. - Web/Cloud and model-ready Desktop paths remain direct-open. - Consumes the bounded/cancellable readiness result owned by [Comfy-Org#15872](Comfy-Org#15872) without duplicating metadata lifecycle ownership in this layer. - Renames the browser fixture action from `loadTemplate` to `selectTemplate` so clicking a card does not falsely imply that a workflow already loaded. Input asset authority and open-time handoff are intentionally owned by [Comfy-Org#20084](Comfy-Org#20084). Final CTA presentation is owned by [Comfy-Org#16109](Comfy-Org#16109). ## Stack Stack 5/6. Previous: [Comfy-Org#15873](Comfy-Org#15873). Next: [Comfy-Org#20084](Comfy-Org#20084), which replaces [Comfy-Org#15902](Comfy-Org#15902). ## Review focus - Both actions open the exact prepared graph without refetching or waiting. - `Open now` starts no downloads. `Download models & open` starts every eligible idle or failed row; an individual row action starts only that model. - The browser-level non-Desktop path proves that selecting a template loads nodes without presenting Detail. ## Screenshots Captured from `WorkflowTemplateDetail.stories.ts`, added in this slice. Its fixtures mirror what `buildTemplateDetailGroups` emits - one `models` group, labels read from `i18n`, and a byte-size total only once every declaration carries one. The Before capture renders the base branch's Detail with the same fixture. | State | | |---|---| | **Before** - the base branch offers one action, `Open template`, whatever the models need |<img width="2360" height="1400" alt="fe1491-detail-before" src="https://github.com/user-attachments/assets/78d434e2-0583-4b80-8a3c-c989601b58e2" /> | | `Open now` - the missing model can only be fetched by hand, so opening is the only action |<img width="2360" height="1400" alt="fe1491-detail-open-now" src="https://github.com/user-attachments/assets/2a905f8f-c206-4976-b409-b226669f11cb" />| | Resolving - metadata is still arriving, so `Download models & open` is shown disabled |<img width="2360" height="1400" alt="fe1491-detail-resolving" src="https://github.com/user-attachments/assets/bc83b3e1-dd90-455d-b637-68d221df88e8" />| | Downloadable - `Download models & open` plus the per-row download action |<img width="2360" height="1400" alt="fe1491-detail-downloadable" src="https://github.com/user-attachments/assets/f5f26ffa-0e48-44a1-8ade-319cb7634ffe" />| ## Validation At `8230ddbc` on this branch: 7 Vitest files / 149 tests across the files this slice changes - the Detail component and its dialog case, the folder-path cache, the model-download dispatch, the row-downloads composable and the reducer. App typecheck (`vue-tsc -p tsconfig.json`) 0 errors, `pnpm oxlint` 0 errors, ESLint 0 errors on the touched trees. CI status at this head is whatever GitHub shows on the PR. Linear: [FE-1491](https://linear.app/comfyorg/issue/FE-1491) · [Review spec](https://app.notion.com/p/3c76d73d365081c9bffde74a29e5b6c4) --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org> Co-authored-by: jaeone94 <89377375+jaeone94@users.noreply.github.com>
…-Org#20178) Polish pass over the template detail panel, on top of the five merged FE-1491 stacks. It carries over what PR Comfy-Org#16109 had worked out before it was closed, reconstructed from that PR rather than reimplemented from memory, plus the problems that reconstruction turned up. ## What changes **The row is a grid.** Progress and metadata were competing for one flex line, so a long model name squeezed the progress track. Rows are now `2.5rem / 1fr / auto`, and progress drops to a full-width second row instead of fighting for horizontal space. Fragment components do not forward `class`, so placement sits on each rendered branch rather than on a wrapper. **The bulk button says what it will fetch.** "Download models and open" became "Download 6.46 GB and open" when every pending model declares a size. The figure counts only what the click actually starts - an installed model is not part of it, which is why it differs from the group header's total. **A long description opens, and a failure says why.** Descriptions clamp to three lines with a toggle that only appears when the text is really clipped, measured rather than guessed from a character count. A failed download shows its reason, and Retry carries that reason as its accessible description. **One prop instead of five.** The footer took four booleans and a string - sixteen inputs for three outputs - and the component never actually distinguished two of them. `modelSetup` is a discriminated union whose arms are the three states the footer has, so a caller cannot hand it a combination the data cannot produce. **Keyboard focus survives starting a download.** Requesting a download unmounts the button that requested it, which dropped focus to the body and sent the next Tab back to the top of the dialog - once per model. The progress area that replaces the control takes focus, and only when the request came from that row. Retry does the same, since it swaps the failure badge for the same status region. In the footer, `Open now` reports `aria-disabled` rather than being disabled while a template opens. Disabling it would blur it, and the primary action disables on the same flag, so the footer would have nothing left to focus. **An unknown-length download no longer claims a third of the bar.** `Queued`, `Starting` and a download whose server sends no length all drew a solid bar filling exactly a third, with a pulse as the only thing distinguishing it from real progress. That fails on a static frame, on `paused` (which has no pulse by design), and under reduced motion. It is a drifting stripe now: the pattern says the length is unknown, the motion says work is happening, and stopping the motion costs nothing. ## Fixed along the way Deriving the remaining-size total did not dedupe by model identity, while the group header did - a model declared twice was charged twice on the button and once in the header. The predicates and the sum now live in `templateModelSetup.ts` and share `totalDeclarations`' dedupe. Reverting that reuse fails the new test. ## Not fixed here Two findings are outside this feature and have their own issues: `.disable-animations` accelerates infinite animations rather than stopping them (Comfy-Org#20173), and `Button`'s `loading` state disables the element and drops keyboard focus for every caller (Comfy-Org#20174). Both are worked around locally here - the stripe switches its own animation off the way `agent-shimmer-outline` already does, and the footer's secondary action uses `aria-disabled` instead of `disabled`. ## Review notes The stripe treatment is a visual decision made during polish, not something the original PR specified - worth a look from design alongside the count-badge contrast question. Captures are below. `WorkflowTemplateModelStatus`'s `EveryState` story now renders through the real group component instead of a flex wrapper, so the second-row progress states are visible in Storybook for the first time. That is also what surfaced the indeterminate-bar problem, and a fixture gap: `paused` declared a known fraction, so paused-and-unknown-length - the state this change is most for - had no story at all. Stacked under this: Comfy-Org#20084 (6/6, desktop input assets) is based on this branch, so it reviews against the final look rather than an intermediate state. ## Screenshots ### Indeterminate progress `Queued`, `Starting` and an unknown-length download. Before, all three draw a solid third of the bar; `active` below them is a real 25%, which is the ambiguity. | | Before | After | |---|---|---| | Light | <img width="1120" height="580" alt="before" src="https://github.com/user-attachments/assets/9a5a0ce1-4153-4409-9475-67c305b6adeb" /> | <img width="1120" height="580" alt="after" src="https://github.com/user-attachments/assets/cc69d39f-29c4-4f4c-99f0-a5dbed843f48" />| | Dark | <img width="1120" height="580" alt="before-dark" src="https://github.com/user-attachments/assets/d9f7fb5b-5b51-406e-824f-f4bc83ee2425" /> |<img width="1120" height="580" alt="after-dark" src="https://github.com/user-attachments/assets/ecbed3fd-19f3-4c76-9959-b4b58c7d8417" />| Dark is the clearer case: before, `queued`, `starting` and `active` are three identical bars. [05-direction-light.webm](https://github.com/user-attachments/assets/a2f2ec08-7dd2-4e93-b261-40c5b2522e47) [06-direction-dark.webm](https://github.com/user-attachments/assets/e85d9f0c-5d6e-4909-b1b3-ed9f67e4ee96) ### Against the original design The closed Comfy-Org#16109 as reference, same fixtures, rendered from both branches. | | Comfy-Org#16109 | This PR | |---|---|---| | Downloadable row | <img width="2360" height="1400" alt="dark__downloadable-row__ref-old-pr" src="https://github.com/user-attachments/assets/c81f3f9a-f7c9-4ef1-bc63-b631b853d4ba" /> | <img width="2360" height="1400" alt="dark__downloadable-row__ours" src="https://github.com/user-attachments/assets/80db60ee-b70c-408f-a157-d30b9e31d031" /> | | Resolving |<img width="2360" height="1400" alt="dark__resolving__ref-old-pr" src="https://github.com/user-attachments/assets/3aa109ba-14e5-4613-bf0d-8cacc037da9b" /> | <img width="2360" height="1400" alt="dark__resolving__ours" src="https://github.com/user-attachments/assets/34fe191f-7239-4969-8482-e2a2e0020249" /> | | Open now only | <img width="2360" height="1400" alt="dark__open-now__ref-old-pr" src="https://github.com/user-attachments/assets/25d41913-c3e2-456b-bae8-e8ca7d5ae2e8" /> | <img width="2360" height="1400" alt="dark__open-now__ours" src="https://github.com/user-attachments/assets/dc14603f-12a2-4ff3-a943-e9b7dfafd9bf" /> | The count badge's dark-mode outline is the one deliberate difference: ours measures 1.16:1 against the panel, the reference 1.36:1.
…ktop template inputs (Comfy-Org#20084) ## Summary Completes the trusted Desktop input-asset contract while templates still open immediately. ## Changes - Restricts automatic asset authority to official/default templates; custom and extension templates cannot turn arbitrary missing inputs into managed downloads. - Lists declared Input Assets in Template Detail for transparency, with no per-asset action or transfer status. - Hands off missing trusted assets on every Desktop open route: `Open now`, `Download models & open`, model-ready direct open, and asset-only direct open. - Keeps `Open now` passive for models while still performing the trusted asset handoff. - Leaves transfer progress and recovery to the opened Graph/App and global managed-download surfaces. - Clears resolved missing-media errors and refreshes graph bindings as managed asset transfers complete. - Requires [Comfy-Desktop Comfy-Org#1435](Comfy-Org/Comfy-Desktop#1435) and the published bridge contract before merge. ## Stack Stack 6/6, replacing [Comfy-Org#15902](Comfy-Org#15902). Previous: [Comfy-Org#15875](Comfy-Org#15875). Final Detail copy/layout: [Comfy-Org#16109](Comfy-Org#16109). ## Desktop dependency The host side is [Comfy-Desktop#1435](Comfy-Org/Comfy-Desktop#1435), which owns the bridge contract this slice consumes. It is not a merge blocker: `src/types/comfyDesktopBridgeTemplateInputs.d.ts` declares the new members locally on top of the published `0.2.0` types, every host method is optional, and each call site guards, so a Desktop build without them simply does not light the feature up. What it does set is release ordering. Once Comfy-Org#1435 merges and `@comfyorg/comfyui-desktop-bridge-types@0.3.0` is published, this branch owes two edits: bump the catalog pin in `pnpm-workspace.yaml` from `0.2.0`, and delete the local declaration file. ## Review focus - Viewing Detail starts no transfer. - Input assets never become a second reason to enter Detail. - Only trusted template declarations can authorize asset download. - Open-time handoff is consistent across every Desktop open route. ## Validation At `d190e1af` on this branch: 13 Vitest files / 207 tests for the files this slice changes. App typecheck (`vue-tsc -p tsconfig.json`) 0 errors, `pnpm oxlint` 0 errors, ESLint 0 errors on the touched trees. CI status at this head is whatever GitHub shows on the PR. Linear: [FE-1491](https://linear.app/comfyorg/issue/FE-1491) · [Review spec](https://app.notion.com/p/3c76d73d365081c9bffde74a29e5b6c4) --- Reopened from Comfy-Org#15902, which GitHub closed as merged when its head commits reached this PR's base branch through a mistaken push. Nothing was merged to `main`; the base branch has been restored to its own scope and this branch rebuilt on it. The review history on Comfy-Org#15902 still applies to this diff. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
Polishes Template Detail around the final launch contract and makes model progress readable without competing with row metadata.
Changes
Open nowplusDownload models & open ({remaining size}); while setup is still resolving, the bulk action uses the generic label and remains disabled.Download models & openwhen any startable model has unknown size rather than presenting a partial total.Open nowaction, including when requirements are complete or no eligible download exists.Ownership
Trusted asset inventory and open-time handoff belong to #15902. This PR owns final CTA copy/state presentation, truthful remaining-model size, and row layout only.
Validation
Linear: FE-1491