Repository navigation
feat: wire bulk asset export to asset_bulk_export_enabled flag (FE-781) - #12486
dante01yoon wants to merge 2 commits into
Conversation
Replace the isCloud gate on the server-side ZIP bulk-export path in useMediaAssetActions.downloadAssets with the asset_bulk_export_enabled capability flag, so the branch reflects backend capability instead of environment. The flag getter defaults to isCloud, so behavior is unchanged before the backend advertises it (Cloud has the export endpoint today, OSS does not); the served value wins once BE-997 registers the flag.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR introduces a feature flag ChangesFeature-Flagged Bulk Asset Export
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #12486 +/- ##
===========================================
- Coverage 76.85% 62.15% -14.71%
===========================================
Files 1570 1458 -112
Lines 111865 75086 -36779
Branches 35646 19521 -16125
===========================================
- Hits 85978 46668 -39310
- Misses 24945 28074 +3129
+ Partials 942 344 -598
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1182 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…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>
# Conflicts: # src/composables/useFeatureFlags.ts # src/platform/remoteConfig/types.ts
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1675 passed, 0 failed · 4 flaky📊 Browser Reports
📦 Bundle: 7.45 MB gzip 🔴 +223 BDetailsSummary
Category Glance App Entry Points — 45.8 kB (baseline 45.8 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.26 MB (baseline 1.26 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 95.3 kB (baseline 95.3 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed / 3 unchanged Panels & Settings — 523 kB (baseline 523 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 14 unchanged User & Accounts — 19.9 kB (baseline 19.9 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 3 unchanged Editors & Dialogs — 112 kB (baseline 112 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 4 added / 4 removed / 1 unchanged UI Components — 57.2 kB (baseline 57.2 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed / 8 unchanged Data & Services — 266 kB (baseline 266 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 12 added / 12 removed / 3 unchanged Utilities & Hooks — 3.3 MB (baseline 3.3 MB) • 🔴 +690 BHelpers, composables, and utility bundles
Status: 14 added / 14 removed / 16 unchanged Vendor & Third-Party — 15.3 MB (baseline 15.3 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 10.4 MB (baseline 10.4 MB) • ⚪ 0 BBundles that do not match a named category
Status: 63 added / 63 removed / 86 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-06-18T05:25:28.398Z",
"gitSha": "14ccbd70cfde8ac53b1fe6c8cb67737761aaa25f",
"branch": "jaewon/fe-781-l2-fe-wire-bulk-asset-export-to-asset_bulk_export_enabled",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2030.099000000007,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.460000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 401.115,
"heapDeltaBytes": -2325284,
"heapUsedBytes": 56507936,
"domNodes": 16,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 14.894,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2022.1599999999853,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.763,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 366.452,
"heapDeltaBytes": -1917752,
"heapUsedBytes": 56431640,
"domNodes": 22,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 22.53,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1785.2920000000267,
"styleRecalcs": 73,
"styleRecalcDurationMs": 36.033,
"layouts": 12,
"layoutDurationMs": 3.526,
"taskDurationMs": 742.439,
"heapDeltaBytes": -7105760,
"heapUsedBytes": 51623956,
"domNodes": 55,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 119.593,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1742.332000000033,
"styleRecalcs": 73,
"styleRecalcDurationMs": 32.043,
"layouts": 12,
"layoutDurationMs": 3.312,
"taskDurationMs": 715.14,
"heapDeltaBytes": -6783164,
"heapUsedBytes": 51574320,
"domNodes": 55,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 119.303,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.6189999999615,
"styleRecalcs": 30,
"styleRecalcDurationMs": 17.730000000000004,
"layouts": 6,
"layoutDurationMs": 0.5149999999999998,
"taskDurationMs": 306.75399999999996,
"heapDeltaBytes": 1837672,
"heapUsedBytes": 60190864,
"domNodes": 78,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 23.33,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1710.8570000000327,
"styleRecalcs": 30,
"styleRecalcDurationMs": 17.363,
"layouts": 6,
"layoutDurationMs": 0.5860000000000001,
"taskDurationMs": 286.274,
"heapDeltaBytes": 4199288,
"heapUsedBytes": 61084400,
"domNodes": 76,
"jsHeapTotalBytes": 18350080,
"scriptDurationMs": 17.387,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 573.8489999999956,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.014,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 335.66200000000003,
"heapDeltaBytes": 7346460,
"heapUsedBytes": 66075736,
"domNodes": 20,
"jsHeapTotalBytes": 19136512,
"scriptDurationMs": 56.40299999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 576.9970000000058,
"styleRecalcs": 13,
"styleRecalcDurationMs": 7.731,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 327.16,
"heapDeltaBytes": 7924480,
"heapUsedBytes": 66298720,
"domNodes": 22,
"jsHeapTotalBytes": 18874368,
"scriptDurationMs": 58.656,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2001.3959999999997,
"styleRecalcs": 12,
"styleRecalcDurationMs": 11.158000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 499.455,
"heapDeltaBytes": -8333680,
"heapUsedBytes": 61847544,
"domNodes": 24,
"jsHeapTotalBytes": 10629120,
"scriptDurationMs": 94.067,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 1985.5459999999994,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.102,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 497.11499999999995,
"heapDeltaBytes": -9467772,
"heapUsedBytes": 61973748,
"domNodes": 22,
"jsHeapTotalBytes": 11677696,
"scriptDurationMs": 84.595,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2082.108000000005,
"styleRecalcs": 71,
"styleRecalcDurationMs": 21.144000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1024.5230000000001,
"heapDeltaBytes": 9755784,
"heapUsedBytes": 82340620,
"domNodes": 22,
"jsHeapTotalBytes": 9756672,
"scriptDurationMs": 382.66999999999996,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2065.4710000000023,
"styleRecalcs": 69,
"styleRecalcDurationMs": 18.008999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 999.302,
"heapDeltaBytes": 10310520,
"heapUsedBytes": 83020996,
"domNodes": 18,
"jsHeapTotalBytes": 12378112,
"scriptDurationMs": 363.52,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3048.4010000000126,
"styleRecalcs": 66,
"styleRecalcDurationMs": 19.562,
"layouts": 60,
"layoutDurationMs": 7.3999999999999995,
"taskDurationMs": 1256.411,
"heapDeltaBytes": 16073828,
"heapUsedBytes": 82779272,
"domNodes": 16,
"jsHeapTotalBytes": 16048128,
"scriptDurationMs": 470.689,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3151.0079999999334,
"styleRecalcs": 66,
"styleRecalcDurationMs": 19.061999999999998,
"layouts": 60,
"layoutDurationMs": 7.129,
"taskDurationMs": 1287.394,
"heapDeltaBytes": -2155512,
"heapUsedBytes": 61467512,
"domNodes": -269,
"jsHeapTotalBytes": 5296128,
"scriptDurationMs": 470.895,
"eventListeners": -159,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2003.780000000006,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.858999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 490.59000000000003,
"heapDeltaBytes": -9476844,
"heapUsedBytes": 63938756,
"domNodes": 18,
"jsHeapTotalBytes": 7483392,
"scriptDurationMs": 88.35900000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2017.5369999999475,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.481999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 494.70599999999996,
"heapDeltaBytes": -7572252,
"heapUsedBytes": 64355544,
"domNodes": 22,
"jsHeapTotalBytes": 9580544,
"scriptDurationMs": 93.28299999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 577.6930000000107,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.557000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 367.837,
"heapDeltaBytes": 8012588,
"heapUsedBytes": 66678916,
"domNodes": 20,
"jsHeapTotalBytes": 19660800,
"scriptDurationMs": 121.96799999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666665,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 546.4829999999665,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.745999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 352.599,
"heapDeltaBytes": 10127752,
"heapUsedBytes": 61866588,
"domNodes": 18,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 123.513,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 1998.5399999999913,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.617999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 355.889,
"heapDeltaBytes": -2458472,
"heapUsedBytes": 56200276,
"domNodes": 20,
"jsHeapTotalBytes": 26214400,
"scriptDurationMs": 18.591,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2024.1539999999532,
"styleRecalcs": 6,
"styleRecalcDurationMs": 5.451000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 341.249,
"heapDeltaBytes": 10261032,
"heapUsedBytes": 63950244,
"domNodes": -307,
"jsHeapTotalBytes": 14868480,
"scriptDurationMs": 13.236,
"eventListeners": -195,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1692.2559999999862,
"styleRecalcs": 77,
"styleRecalcDurationMs": 36.086,
"layouts": 16,
"layoutDurationMs": 4.0009999999999994,
"taskDurationMs": 680.5000000000001,
"heapDeltaBytes": -11018308,
"heapUsedBytes": 47619768,
"domNodes": 63,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 97.869,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1691.0799999999426,
"styleRecalcs": 76,
"styleRecalcDurationMs": 34.876000000000005,
"layouts": 16,
"layoutDurationMs": 4.043,
"taskDurationMs": 642.883,
"heapDeltaBytes": -10992168,
"heapUsedBytes": 47680312,
"domNodes": 62,
"jsHeapTotalBytes": 26476544,
"scriptDurationMs": 92.225,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 915.614000000005,
"styleRecalcs": 17,
"styleRecalcDurationMs": 27.996,
"layouts": 4,
"layoutDurationMs": 13.721999999999998,
"taskDurationMs": 707.926,
"heapDeltaBytes": 4347852,
"heapUsedBytes": 79763708,
"domNodes": 13833,
"jsHeapTotalBytes": 16777216,
"scriptDurationMs": 26.59099999999999,
"eventListeners": 2529,
"totalBlockingTimeMs": 159,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8139.764000000014,
"styleRecalcs": 251,
"styleRecalcDurationMs": 55.77,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3683.5149999999994,
"heapDeltaBytes": -3904868,
"heapUsedBytes": 67583552,
"domNodes": 22,
"jsHeapTotalBytes": 16048128,
"scriptDurationMs": 1227.3899999999999,
"eventListeners": 20,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8167.958999999996,
"styleRecalcs": 252,
"styleRecalcDurationMs": 52.38,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3527.451,
"heapDeltaBytes": 25286512,
"heapUsedBytes": 84695964,
"domNodes": -262,
"jsHeapTotalBytes": 6754304,
"scriptDurationMs": 1185.595,
"eventListeners": -115,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 13213.383999999962,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13197.012999999999,
"heapDeltaBytes": -36528456,
"heapUsedBytes": 160897868,
"domNodes": -3306,
"jsHeapTotalBytes": 17010688,
"scriptDurationMs": 603.571,
"eventListeners": -16472,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 13160.31099999998,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13120.657000000001,
"heapDeltaBytes": -19484364,
"heapUsedBytes": 170796672,
"domNodes": -3335,
"jsHeapTotalBytes": 22515712,
"scriptDurationMs": 644.8,
"eventListeners": -16475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 14921.154000000002,
"styleRecalcs": 69,
"styleRecalcDurationMs": 17.027999999999988,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14893.387999999997,
"heapDeltaBytes": -41611880,
"heapUsedBytes": 169837476,
"domNodes": -3308,
"jsHeapTotalBytes": 19894272,
"scriptDurationMs": 854.144,
"eventListeners": -16470,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 15213.406999999961,
"styleRecalcs": 74,
"styleRecalcDurationMs": 17.91999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15182.750000000002,
"heapDeltaBytes": -38427948,
"heapUsedBytes": 160764304,
"domNodes": -3310,
"jsHeapTotalBytes": 22253568,
"scriptDurationMs": 957.2489999999999,
"eventListeners": -16470,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 441.64999999998145,
"styleRecalcs": 17,
"styleRecalcDurationMs": 21.345,
"layouts": 5,
"layoutDurationMs": 1.402,
"taskDurationMs": 109.11400000000002,
"heapDeltaBytes": 5327640,
"heapUsedBytes": 65250768,
"domNodes": 166,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 16.062000000000005,
"eventListeners": 69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 450.7149999999456,
"styleRecalcs": 18,
"styleRecalcDurationMs": 20.612,
"layouts": 4,
"layoutDurationMs": 0.9760000000000001,
"taskDurationMs": 110.384,
"heapDeltaBytes": 5224508,
"heapUsedBytes": 64913904,
"domNodes": 159,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 19.817,
"eventListeners": 69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
}
]
} |
) ## 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>
) ## 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>
|
Closing as superseded by #18944: the assets panel now zips whenever the assets system is enabled (flags.assetsEnabled) and falls back to per-file downloads otherwise, so a separate asset_bulk_export_enabled flag has no job left. |
Summary
Replace the
isCloudgate on the server-side ZIP bulk-export path with theasset_bulk_export_enabledcapability flag, so the branch reflects backend capability instead of environment (M1 L2, FE-781).Changes
useMediaAssetActions.downloadAssetsnow routes multi-asset / multi-output selections to the server ZIP export (POST /assets/export) whenflags.assetBulkExportEnabled, falling back to per-file direct downloads otherwise. AddsASSET_BULK_EXPORT_ENABLEDtoServerFeatureFlag+ anassetBulkExportEnabledgetter (and theasset_bulk_export_enabled?remote-config field).Review Focus
isCloud, notfalse— before the backend advertises the flag, behavior is unchanged (Cloud has the export endpoint today, OSS does not). The served value wins once BE-997 registers the flag. This mirrors the FE-780 pattern and is what makes the change safe onmainwith zero regression.isCloudimport stays — it still gates other (L1/N1-scope) delete/identity sites in this file, out of scope here.Merge gate
Draft — do not merge before BE-997 (registers
asset_bulk_export_enabledonServerFeatureFlag; Backlog as of 2026-05-27). BE-996 (OSSPOST /assets/export) is not required for this FE change; it only flips the OSS flag totrueonce shipped.Tests
useMediaAssetActions.test.ts: flag-gating regression tests (off → per-file downloads, on → ZIP, gates on flag notisCloud).useFeatureFlags.test.ts: getter default (isCloud) + served-value + dev-override precedence. All green; typecheck + lint clean.