Repository navigation
refactor(assets): remove isCloud guards in widget composables (FE-731) - #12375
Conversation
- useComboWidget: drop the `if (isCloud)` wrap so shouldUseAssetBrowser and NODE_MEDIA_TYPE_MAP paths run unconditionally. Rename resolveCloudDefault -> resolveAssetDefault. - useAssetWidgetData: drop the `if (isCloud)` branch and its empty-data fallback; remove the "Cloud-only" docstring. - Tests: drop the isCloud mock + per-test toggles. Delete the isCloud=false desktop spec and the OSS LoadImage fall-through case that asserted the now-removed branch.
|
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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## jaewon/fe-730-l13-l1-store-remove-iscloud-forks-in-assetsstore-no-fallback #12375 +/- ##
==============================================================================================================
- Coverage 62.17% 62.14% -0.03%
==============================================================================================================
Files 1458 1458
Lines 75012 74992 -20
Branches 19494 21116 +1622
==============================================================================================================
- Hits 46637 46604 -33
- Misses 28031 28044 +13
Partials 344 344
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Align with the L1 stack pattern (FE-729 #12322 / FE-730 #12335 / FE-731 #12375 / FE-732 #12417): the Generated tab now resolves to `useFlatOutputAssetsGrouped()` unconditionally. OSS reaches the same asset-API path as cloud once BE-786 lands and `_ASSETS_ENABLED` is no longer a gate; no transitional fallback is kept, in line with FE-730's "no temporary isCloud fallback" stance. FE-740
…ed feature-flag test infra Per review (DrJKL): mockFeatureFlags and the exported FeatureFlags type have no live consumer in the open stack — FE-729~732 (#12322/#12335/#12375/#12417) don't use them, and FE-780/781 (#12485/#12486) still hand-roll inline vi.hoisted mocks. Shipping them here adds a public surface with no caller, so split them out; they'll be reintroduced bundled with the first PR that actually adopts the util. This PR is now scoped to the getAssetStoredFilename extraction, which is consumed at its two call sites in useMediaAssetActions. Retained-code review fixes: - M3: spread importOriginal in the distribution/types mock so isDesktop and isNightly survive the wholesale replacement. - L2: trim getAssetStoredFilename JSDoc; demote the BE-933/934 collapse to a one-line TODO. Removed: src/test-utils/mockFeatureFlags.ts, the FeatureFlags type export, and its knip ignore entry. Pre-split state preserved on local branch jaewon/fe-733-presplit-snapshot. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ed feature-flag test infra Per review (DrJKL): mockFeatureFlags and the exported FeatureFlags type have no live consumer in the open stack — FE-729~732 (#12322/#12335/#12375/#12417) don't use them, and FE-780/781 (#12485/#12486) still hand-roll inline vi.hoisted mocks. Shipping them here adds a public surface with no caller, so split them out; they'll be reintroduced bundled with the first PR that actually adopts the util. This PR is now scoped to the getAssetStoredFilename extraction, which is consumed at its two call sites in useMediaAssetActions. Retained-code review fixes: - M3: spread importOriginal in the distribution/types mock so isDesktop and isNightly survive the wholesale replacement. - L2: trim getAssetStoredFilename JSDoc; demote the BE-933/934 collapse to a one-line TODO. Removed: src/test-utils/mockFeatureFlags.ts, the FeatureFlags type export, and its knip ignore entry. Pre-split state preserved on local branch jaewon/fe-733-presplit-snapshot. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…fy-Org#12287) ## Summary L1 prerequisite cleanup, scoped to a single type-preserving refactor: extract `getAssetStoredFilename(asset)` to collapse the duplicated `isCloud && asset.asset_hash ? asset.asset_hash : asset.name` branch from `useMediaAssetActions.ts` into one helper in `assetMetadataUtils.ts`. No behavior change. Once BE-933/934 emit `file_path` and the cloud spec sync brings the field into generated types, only the helper internals change (collapse to `asset.file_path ?? asset.name`). ## Scope change (per review) The `mockFeatureFlags` test util and the exported `FeatureFlags` type that this PR originally also added have been **split out**. They had no live consumer in the open stack — FE-729~732 (Comfy-Org#12322 / Comfy-Org#12335 / Comfy-Org#12375 / Comfy-Org#12417) don't use them, and FE-780 / FE-781 (Comfy-Org#12485 / Comfy-Org#12486) still hand-roll inline `vi.hoisted` mocks — so shipping them here would add a public surface with no caller. They will be reintroduced bundled with the first PR that actually adopts the util, where `featureFlag`'s return type and the "all flags off vs. production defaults" semantics can be validated against a real consumer. ## Review fixes carried in this PR - Mock `@/platform/distribution/types` via an `importOriginal` spread so `isDesktop` / `isNightly` survive the wholesale replacement (only `isCloud` was re-hoisted before). - Trimmed the `getAssetStoredFilename` JSDoc; the BE-933/934 future-collapse is now a one-line `TODO` rather than a design-doc paragraph. ## Review Focus - The helper is intentionally named `getAssetStoredFilename` to disambiguate from the existing `getAssetFilename` (which targets `user_metadata.filename` / `metadata.filename` for serialized-identifier contexts — missing-model matching, filename schema validation) and `getAssetDisplayFilename` (UI labels). Folding the `isCloud && asset_hash` fallback into either of those would regress display/identifier sites where the cloud hash is never meant to surface. - Fixes FE-733 - Parent: FE-601 (L1 umbrella) - RFC: [Asset Identity Semantics](https://www.notion.so/comfy-org/RFC-Asset-Identity-Semantics-35a6d73d365080e59d59c98cebae779b) - Survey: [Asset FE Divergence Survey M1 Scope](https://www.notion.so/comfy-org/Assets-FE-Divergence-Survey-M1-Scope-3616d73d365080d0a9cbf5f2394c12f8) - Slack thread: https://comfy-organization.slack.com/archives/C0AUUTS2RQV/p1778815571949519 ## Screenshots (if applicable) N/A — no UI change. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-12287-refactor-assets-extract-getAssetStoredFilename-helper-add-mockFeatureFlags-test-util-3616d73d365081c9a1c6e1982728a38a) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: Matt Miller <matt@miller-media.com>
…tsstore-no-fallback' into jaewon/fe-731-l14-l1-widgets-remove-iscloud-guards-in-usecombowidget
📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-06-18T03:32:38.956Z",
"gitSha": "59b1ea5ea527313f47280786f2f7a77fd9525b50",
"branch": "jaewon/fe-731-l14-l1-widgets-remove-iscloud-guards-in-usecombowidget",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2022.1439999999689,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.969,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 343.818,
"heapDeltaBytes": -2044424,
"heapUsedBytes": 56715720,
"domNodes": 22,
"jsHeapTotalBytes": 24117248,
"scriptDurationMs": 22.115000000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2038.3409999999458,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.234000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 356.299,
"heapDeltaBytes": -1907336,
"heapUsedBytes": 56674828,
"domNodes": 20,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 29.523,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1887.0200000000068,
"styleRecalcs": 75,
"styleRecalcDurationMs": 38.275,
"layouts": 12,
"layoutDurationMs": 3.702,
"taskDurationMs": 812.207,
"heapDeltaBytes": -8018500,
"heapUsedBytes": 50859000,
"domNodes": 58,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 126.29800000000002,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1758.8779999999815,
"styleRecalcs": 73,
"styleRecalcDurationMs": 33.515,
"layouts": 12,
"layoutDurationMs": 3.1010000000000004,
"taskDurationMs": 700.9139999999999,
"heapDeltaBytes": 15194956,
"heapUsedBytes": 65896164,
"domNodes": 55,
"jsHeapTotalBytes": 24117248,
"scriptDurationMs": 120.12299999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1722.0859999999902,
"styleRecalcs": 32,
"styleRecalcDurationMs": 15.873999999999999,
"layouts": 6,
"layoutDurationMs": 0.568,
"taskDurationMs": 295.209,
"heapDeltaBytes": 1896640,
"heapUsedBytes": 60491436,
"domNodes": 79,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 24.255,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1721.7249999999922,
"styleRecalcs": 31,
"styleRecalcDurationMs": 15.754999999999999,
"layouts": 6,
"layoutDurationMs": 0.5939999999999999,
"taskDurationMs": 295.602,
"heapDeltaBytes": 2020328,
"heapUsedBytes": 60684360,
"domNodes": 79,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 24.477,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 530.5940000000078,
"styleRecalcs": 13,
"styleRecalcDurationMs": 9.258,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 324.31,
"heapDeltaBytes": 4453692,
"heapUsedBytes": 54855468,
"domNodes": 22,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 61.238,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 590.8620000000155,
"styleRecalcs": 13,
"styleRecalcDurationMs": 11.202000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 335.257,
"heapDeltaBytes": 7532740,
"heapUsedBytes": 66023768,
"domNodes": 22,
"jsHeapTotalBytes": 18874368,
"scriptDurationMs": 61.476000000000006,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666682,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2019.549999999981,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.826,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 474.183,
"heapDeltaBytes": -9993844,
"heapUsedBytes": 63067748,
"domNodes": 22,
"jsHeapTotalBytes": 12988416,
"scriptDurationMs": 88.856,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 1994.3379999999706,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.297,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 474.543,
"heapDeltaBytes": -8501860,
"heapUsedBytes": 61802692,
"domNodes": 20,
"jsHeapTotalBytes": 11153408,
"scriptDurationMs": 90.18599999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2117.322999999999,
"styleRecalcs": 70,
"styleRecalcDurationMs": 18.755000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1003.1479999999999,
"heapDeltaBytes": 11253080,
"heapUsedBytes": 82646688,
"domNodes": 20,
"jsHeapTotalBytes": 11853824,
"scriptDurationMs": 391.351,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2064.3010000000004,
"styleRecalcs": 67,
"styleRecalcDurationMs": 15.653999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 947.168,
"heapDeltaBytes": 27224620,
"heapUsedBytes": 82182512,
"domNodes": -277,
"jsHeapTotalBytes": 1515520,
"scriptDurationMs": 361.471,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3033.2239999999615,
"styleRecalcs": 65,
"styleRecalcDurationMs": 17.887999999999998,
"layouts": 60,
"layoutDurationMs": 7.137999999999999,
"taskDurationMs": 1205.8,
"heapDeltaBytes": 14062756,
"heapUsedBytes": 79708948,
"domNodes": 14,
"jsHeapTotalBytes": 17620992,
"scriptDurationMs": 457.30699999999996,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3032.169000000067,
"styleRecalcs": 66,
"styleRecalcDurationMs": 18.944999999999997,
"layouts": 60,
"layoutDurationMs": 6.885,
"taskDurationMs": 1205.3660000000002,
"heapDeltaBytes": 12802504,
"heapUsedBytes": 68359380,
"domNodes": 16,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 458.345,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2011.257999999998,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.597999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 446.61,
"heapDeltaBytes": 6019136,
"heapUsedBytes": 59158180,
"domNodes": -278,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 84.089,
"eventListeners": -189,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2009.1300000000274,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.488,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 465.51599999999996,
"heapDeltaBytes": -9157744,
"heapUsedBytes": 64687020,
"domNodes": 20,
"jsHeapTotalBytes": 7483392,
"scriptDurationMs": 82.22600000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 548.0000000000018,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.857,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 355.46299999999997,
"heapDeltaBytes": 7508124,
"heapUsedBytes": 66401308,
"domNodes": 20,
"jsHeapTotalBytes": 19660800,
"scriptDurationMs": 124.395,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666665,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 583.4019999999782,
"styleRecalcs": 48,
"styleRecalcDurationMs": 10.732999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 345.665,
"heapDeltaBytes": 7490176,
"heapUsedBytes": 66574272,
"domNodes": 22,
"jsHeapTotalBytes": 19660800,
"scriptDurationMs": 119.774,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666682,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1992.387000000008,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.634,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 334.62800000000004,
"heapDeltaBytes": -2598720,
"heapUsedBytes": 56276340,
"domNodes": 20,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 16.357999999999997,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2007.8170000000455,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.463999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 340.73199999999997,
"heapDeltaBytes": -2400376,
"heapUsedBytes": 56521196,
"domNodes": 20,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 17.459,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1708.2090000000107,
"styleRecalcs": 76,
"styleRecalcDurationMs": 33.473000000000006,
"layouts": 16,
"layoutDurationMs": 3.5509999999999997,
"taskDurationMs": 634.8000000000001,
"heapDeltaBytes": -11593660,
"heapUsedBytes": 52379432,
"domNodes": 64,
"jsHeapTotalBytes": 24178688,
"scriptDurationMs": 91.254,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1706.9740000000593,
"styleRecalcs": 77,
"styleRecalcDurationMs": 33.799,
"layouts": 16,
"layoutDurationMs": 3.5620000000000003,
"taskDurationMs": 636.636,
"heapDeltaBytes": -10826888,
"heapUsedBytes": 48047704,
"domNodes": 66,
"jsHeapTotalBytes": 26476544,
"scriptDurationMs": 89.688,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 948.851999999988,
"styleRecalcs": 16,
"styleRecalcDurationMs": 27.265000000000004,
"layouts": 5,
"layoutDurationMs": 13.949000000000003,
"taskDurationMs": 710.9960000000002,
"heapDeltaBytes": 32222720,
"heapUsedBytes": 98646324,
"domNodes": 13833,
"jsHeapTotalBytes": 16515072,
"scriptDurationMs": 26.372000000000007,
"eventListeners": 2529,
"totalBlockingTimeMs": 146,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "viewport-pan-sweep",
"durationMs": 8147.900999999991,
"styleRecalcs": 252,
"styleRecalcDurationMs": 52.418000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3445.4159999999997,
"heapDeltaBytes": -16731028,
"heapUsedBytes": 66417600,
"domNodes": -266,
"jsHeapTotalBytes": 9756672,
"scriptDurationMs": 1189.594,
"eventListeners": -175,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8148.45600000001,
"styleRecalcs": 251,
"styleRecalcDurationMs": 52.358000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3466.602,
"heapDeltaBytes": -3881064,
"heapUsedBytes": 67366980,
"domNodes": 22,
"jsHeapTotalBytes": 17620992,
"scriptDurationMs": 1174.446,
"eventListeners": 20,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 11304.895000000044,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11292.151,
"heapDeltaBytes": -8867168,
"heapUsedBytes": 167183872,
"domNodes": -27,
"jsHeapTotalBytes": 15962112,
"scriptDurationMs": 567.834,
"eventListeners": -6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 11384.348000000045,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11355.007000000001,
"heapDeltaBytes": 102644,
"heapUsedBytes": 165155648,
"domNodes": -27,
"jsHeapTotalBytes": 14651392,
"scriptDurationMs": 537.3969999999999,
"eventListeners": -6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 13934.089000000085,
"styleRecalcs": 65,
"styleRecalcDurationMs": 15.810999999999991,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13912.064999999999,
"heapDeltaBytes": -7353196,
"heapUsedBytes": 168863044,
"domNodes": -29,
"jsHeapTotalBytes": 16486400,
"scriptDurationMs": 823.504,
"eventListeners": -2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.216666666666665,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 13412.928999999964,
"styleRecalcs": 65,
"styleRecalcDurationMs": 15.519000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13391.473999999998,
"heapDeltaBytes": 17818548,
"heapUsedBytes": 175693804,
"domNodes": -25,
"jsHeapTotalBytes": 13254656,
"scriptDurationMs": 881.5360000000001,
"eventListeners": -4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333326,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 468.85200000008354,
"styleRecalcs": 23,
"styleRecalcDurationMs": 25.534000000000002,
"layouts": 5,
"layoutDurationMs": 1.4969999999999999,
"taskDurationMs": 139.541,
"heapDeltaBytes": -14903312,
"heapUsedBytes": 52590972,
"domNodes": 192,
"jsHeapTotalBytes": 8187904,
"scriptDurationMs": 22.433,
"eventListeners": 69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 459.64600000002065,
"styleRecalcs": 17,
"styleRecalcDurationMs": 21.148,
"layouts": 5,
"layoutDurationMs": 1.2329999999999999,
"taskDurationMs": 114.013,
"heapDeltaBytes": 5239632,
"heapUsedBytes": 65340420,
"domNodes": 157,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 21.439,
"eventListeners": 69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
}
]
}🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ❌ 1408 passed, 129 failed · 2 flaky❌ Failed Tests📊 Browser Reports
|
…e-iscloud-forks-in-assetsstore-no-fallback' into HEAD # Conflicts: # src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.test.ts # src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts
christian-byrne
left a comment
There was a problem hiding this comment.
Parallel multi-agent review (8 reviewers: bug-hunter, regression-risk, test-quality, vue-patterns, api-contract, architecture, error-handling, dx-readability). Reviewed against the stacked base jaewon/fe-730-.... No public API breakage (the resolveCloudDefault->resolveAssetDefault rename is module-private; consumers are gated). One finding worth a close look (the input-mapping default, flagged by 4 of 8 reviewers and tracing to a named prior bugfix) plus a test-coverage note; the rest are minor/nit.
This is a Draft PR, so treating all of these as non-blocking pre-merge feedback.
additional (architecture, non-blocking, file not in diff): src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue:51 still forks on distribution: const outputMediaAssets = isCloud ? useFlatOutputAssets() : useAssetsApi('output'), sitting one line above the now-unconditional useAssetWidgetData(toRef(nodeType)). After FE-731 the model-asset path is per-node while the output-media path beside it is still per-distribution, so the residual isCloud reads like an oversight next to a deliberately de-clouded composable. If output-media unification is a later L1 ticket, a tracking ref would make the intent clear; otherwise it could move behind a service seam matching how shouldUseAssetBrowser hides the model-side decision.
| ) | ||
| } | ||
| if (NODE_MEDIA_TYPE_MAP[node.comfyClass ?? '']) { | ||
| return createInputMappingWidget(node, inputSpec, defaultValue) |
There was a problem hiding this comment.
issue: createInputMappingWidget is now seeded with the raw defaultValue (getDefaultValue(inputSpec) = inputSpec.default ?? options[0], a server filename) instead of the deleted resolveCloudInputDefault, which mapped the default onto an actual input-asset hash (else ''). The widget's dynamic values list (bindDynamicValuesOption) still exposes only asset.hash, so a freshly added LoadImage/LoadVideo/LoadAudio node gets seeded with a value that is not a member of its own option set: broken selection highlight, and on serialize/undo/reload it persists a filename the asset path cannot map back to a hash. That is the exact missing-model-on-reload case commit 4bfb0c3 "Fix Cloud media input defaults (#12562)" (2026-06-04) fixed. The surviving test masks it because it uses hash-shaped options[0].
Could the input-mapping path resolve the default against inputAssets (a resolveInputAssetDefault(node.comfyClass, inputSpec.default) mirroring the deleted helper), the way the adjacent asset-browser branch does via resolveAssetDefault? Or is the divergence intentional? If intentional, a one-line comment plus a regression test (a LoadImage default absent from the asset library should start empty, not as a server filename) would pin the contract.
| expect.any(Function), | ||
| expect.objectContaining({ | ||
| values: [], | ||
| values: [], // Empty initially, populated via dynamic getter |
There was a problem hiding this comment.
suggestion: two coverage gaps survive the rewrite. (1) The options.values getter for input-mapping widgets (media-type filter + asset.hash extraction + null-hash drop) still runs unconditionally in production, but the suite only asserts values: [] at construction here and never reads the getter back with a populated inputAssets store. (2) The new raw-default passthrough into createInputMappingWidget is only covered for the options[0] case. Consider a behavioral test that populates inputAssets (mixed media types + one empty-hash asset) and asserts the getter exposes only the matching, non-empty hashes, plus input-mapping cases for an explicit default and the no-default/no-options ('') fallback.
|
|
||
| const isLoading = assetsStore.isModelLoading(currentNodeType) | ||
| const hasBeenInitialized = assetsStore.hasAssetKey(currentNodeType) | ||
| watch( |
There was a problem hiding this comment.
note (non-blocking): removing the empty-data fallback means this watcher now runs updateModelsForNodeType on OSS too. That is not an unhandled rejection (the store catches the fetch error into state.error and the composable re-exposes it via error), but the consumer (useWidgetSelectItems) never reads error/isLoading - so pre-BE-786, a failed or empty OSS fetch renders an empty "Select model" dropdown with no error or retry affordance. Is the empty-dropdown UX acceptable for the pre-BE-786 window, or worth surfacing the error/loading state downstream?
| } | ||
|
|
||
| const mockDistributionState = vi.hoisted(() => ({ isCloud: false })) | ||
| // Use vi.hoisted() to ensure mock state is initialized before mocks |
There was a problem hiding this comment.
nitpick (non-blocking): this comment is vestigial - the mockDistributionState = vi.hoisted(...) toggle it described was deleted, and the remaining vi.hoisted() calls hoist for the ordinary mock-factory-reference reason. A few other added comments (lines 86, 105, 396, 419, 431) also paraphrase the next line. Per AGENTS.md (explain why, not what) these could be dropped.
| @@ -234,7 +228,7 @@ describe('useComboWidget', () => { | |||
| createMockAssetItem({ name: 'cloud_model.safetensors' }) | |||
There was a problem hiding this comment.
nitpick (non-blocking): lone surviving cloud_model.safetensors literal after the systematic cloud_* -> asset_* rename in this file; asset_model.safetensors would keep the fixtures consistent.
) ## Summary L1 prerequisite cleanup, scoped to a single type-preserving refactor: extract `getAssetStoredFilename(asset)` to collapse the duplicated `isCloud && asset.asset_hash ? asset.asset_hash : asset.name` branch from `useMediaAssetActions.ts` into one helper in `assetMetadataUtils.ts`. No behavior change. Once BE-933/934 emit `file_path` and the cloud spec sync brings the field into generated types, only the helper internals change (collapse to `asset.file_path ?? asset.name`). ## Scope change (per review) The `mockFeatureFlags` test util and the exported `FeatureFlags` type that this PR originally also added have been **split out**. They had no live consumer in the open stack — FE-729~732 (#12322 / #12335 / #12375 / #12417) don't use them, and FE-780 / FE-781 (#12485 / #12486) still hand-roll inline `vi.hoisted` mocks — so shipping them here would add a public surface with no caller. They will be reintroduced bundled with the first PR that actually adopts the util, where `featureFlag`'s return type and the "all flags off vs. production defaults" semantics can be validated against a real consumer. ## Review fixes carried in this PR - Mock `@/platform/distribution/types` via an `importOriginal` spread so `isDesktop` / `isNightly` survive the wholesale replacement (only `isCloud` was re-hoisted before). - Trimmed the `getAssetStoredFilename` JSDoc; the BE-933/934 future-collapse is now a one-line `TODO` rather than a design-doc paragraph. ## Review Focus - The helper is intentionally named `getAssetStoredFilename` to disambiguate from the existing `getAssetFilename` (which targets `user_metadata.filename` / `metadata.filename` for serialized-identifier contexts — missing-model matching, filename schema validation) and `getAssetDisplayFilename` (UI labels). Folding the `isCloud && asset_hash` fallback into either of those would regress display/identifier sites where the cloud hash is never meant to surface. - Fixes FE-733 - Parent: FE-601 (L1 umbrella) - RFC: [Asset Identity Semantics](https://www.notion.so/comfy-org/RFC-Asset-Identity-Semantics-35a6d73d365080e59d59c98cebae779b) - Survey: [Asset FE Divergence Survey M1 Scope](https://www.notion.so/comfy-org/Assets-FE-Divergence-Survey-M1-Scope-3616d73d365080d0a9cbf5f2394c12f8) - Slack thread: https://comfy-organization.slack.com/archives/C0AUUTS2RQV/p1778815571949519 ## Screenshots (if applicable) N/A — no UI change. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-12287-refactor-assets-extract-getAssetStoredFilename-helper-add-mockFeatureFlags-test-util-3616d73d365081c9a1c6e1982728a38a) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: Matt Miller <matt@miller-media.com>
Closed — retiring the FE-729→732 chain in favour of a fresh re-cutClosing this chain (#12322, #12335, #12375, #12417 — Linear FE-729, FE-730, FE-731, FE-732) by agreement between @dante01yoon, @synap5e and @christian-byrne (Slack, 2026-07-23). This is not an abandonment of the work — the L1 Why re-cut rather than rebase. First, the premise was overtaken. The chain exists to delete The blocker underneath all of it: BE-786 never landed. #12322 patches CI to start ComfyUI with The full diff is preserved on each PR as the specification of intent — please read these branches rather than re-deriving the approach when the re-cut is scoped. @dante01yoon to be looped back in at that point. Salvage note — this is the one to start from. Unlike the rest of the chain, this PR's five files ( |
Summary
FE-731 (L1.4 — widget composables). With both Cloud and OSS serving
/api/assetspost-BE-786,useComboWidgetanduseAssetWidgetDatacollapse to a single asset-aware code path — no moreisCloudshort-circuits, no Cloud-only docstrings.Draft — do not merge until BE-786 + FE-729 + FE-730 land.
Changes
src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.tsisCloudimport and theif (isCloud) { ... }wrapper inaddComboWidget. TheshouldUseAssetBrowserbranch and theNODE_MEDIA_TYPE_MAP(LoadImage / LoadVideo / LoadAudio) branch now run unconditionally; eligibility is decided per-node byassetService.shouldUseAssetBrowserand the media-type map, not by distribution.resolveCloudDefault→resolveAssetDefaultand update the docstring/comment to drop the "cloud" qualifier — the helper resolves againstassetsStore.getAssets(nodeType)on either backend.src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.tsisCloudimport and the outerif (isCloud) { ... } else { empty-data fallback }branch. The body (category lookup, asset list, loading/error refs, lazyupdateModelsForNodeTypewatcher) now runs unconditionally.src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.test.tsmockDistributionStatetoggle, the@/platform/distribution/typesmock, and 11 per-testmockDistributionState.isCloud = ...assignments.should create normal combo widget for LoadImage in OSStest — it asserted the removedisCloud=falseshort-circuit (LoadImage falling through to the standard combo path); the new behavior routes LoadImage throughcreateInputMappingWidgeton both backends, which is covered by the existing input-mapping suite.setupCloudAssetWidget→setupAssetBrowserWidgetand drop "cloud" / "in cloud" qualifiers from describe/it titles. Non-eligible-combo coverage (shouldUseAssetBrowserreturns false → serverinputSpec.optionsused) remains.src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.test.ts@/platform/distribution/typesmock; the(cloud mode, isCloud=true)qualifier removed from the describe title.src/renderer/extensions/vueNodes/widgets/composables/useAssetWidgetData.desktop.test.ts— deleted. The file's only test (returns empty/default values without calling storesunderisCloud=false) verified a branch that no longer exists.Review Focus
shouldUseAssetBrowser,NODE_MEDIA_TYPE_MAP) — no distribution gate. This is the intended M1 shape; no temporary fallback / feature flag was added (per the no-flags decision).resolveAssetDefaultkeeps the existing Cloud policy: preferinputSpec.defaultif it's in the asset library, otherwiseassets[0], otherwise placeholder. Server-providedinputSpec.optionsare intentionally ignored on asset-aware widgets to avoid missing-model errors on undo/reload — same behavior Cloud has been running with.shouldUseAssetBrowser=false, not inNODE_MEDIA_TYPE_MAP), the standard combo path is unchanged and still usesinputSpec.options. Covered byshould create normal combo widget when asset browser is not eligible.Dependencies
jaewon/fe-730-..., notmain. Merge order: FE-729 → FE-730 → FE-731.Done when
isCloudguards removed from both files.isCloudmocks).pnpm typecheckclean;pnpm test:uniton the two target specs — 25 tests pass.OSS smoke test (ComfyUI master +
--enable-assets, 2026-05-20)Verified manually against a local ComfyUI master launched with
python main.py --cpu --listen 127.0.0.1 --port 8189 --enable-assets --database-url sqlite:///:memory:. Vite dev server running this PR's worktree (jaewon/fe-731-..., commit9b9b0f245) withDEV_SERVER_COMFYUI_URL=http://127.0.0.1:8189./api/featuresconfirms"assets": true.example.pngbound)createInputMappingWidgettriggered during hydrationGET /api/assets?include_tags=input&limit=100&exclude_tags=missing&include_public=false→ 200 (reqid=1728)app.graph.clear()→assetsStore.$patch({ inputAssets: [], inputLoading: false })→LiteGraph.createNode('LoadImage')+graph.add()on empty canvascreateInputMappingWidget→updateInputs()lazy loadGET /api/assets?include_tags=input&...→ 200 (reqid=1768, new call after store reset). Widget breakdown:image(type=combo,values: []) +upload(type=button) — exactlycreateInputMappingWidget+useImageUploadWidgetoutputshouldUseAssetBrowser=true→createAssetBrowserWidgetpath (wasisCloud-gated)WidgetSelect modelValue="Select model" widget={type:"asset", spec.type:"COMBO"}.GET /api/assets?include_tags=models&limit=500&exclude_tags=missing→ 200 (reqid=1757/1760)example.pngasset card (input asset);GET /api/jobs?status=completed,failed,cancelled&limit=200&offset=0→ 200 (reqid=1762, history fetch for the All/Generated tab — existing modal logic, not new from FE-731)createInputMappingWidgetskipsupdateInputswheninputAssets.length > 0)useComboWidget.ts:170/api/assets?include_tags=inputcallsampler_name,schedulershouldUseAssetBrowser=false, not inNODE_MEDIA_TYPE_MAPnode.addWidget('combo', …, { values: inputSpec.options }); no/api/assetsrequest for these widgetsWhat this proves
useComboWidgetroutesLoadImagethroughcreateInputMappingWidgeton OSS —updateInputs()lazy load fires on first node add, and is correctly skipped on subsequent adds while the store is populated.useAssetWidgetDataandcreateAssetBrowserWidgetactivate for model widgets on OSS —WidgetSelectrenderstype: "asset"with category lookup viaassetsStore.getAssets().sampler_name,scheduler) remain on the non-asset path — no regression.Refs
┆Issue is synchronized with this Notion page by Unito