Repository navigation
refactor(assets): remove isCloud forks in assetsStore (FE-730) - #12335
dante01yoon wants to merge 4 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 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:
📝 WalkthroughWalkthroughThis PR consolidates input asset file handling and refactors the model cache system in the assets store. Five UI components receive Tailwind class reordering (cosmetic). The separate ChangesTailwind reordering and assets store unification
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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-729-delete-is-asset-api-enabled #12335 +/- ##
============================================================================
Coverage 62.16% 62.17%
============================================================================
Files 1458 1458
Lines 75045 75012 -33
Branches 21132 19494 -1638
============================================================================
- Hits 46654 46637 -17
+ Misses 28047 28031 -16
Partials 344 344
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
… fetcher FE-730 (L1.3). Both Cloud and OSS will serve /api/assets post-BE-786, so assetsStore collapses to a single asset-API code path. - Drop fetchInputFilesFromAPI (legacy /files/input caller); rename fetchInputFilesFromCloud to fetchInputFiles. - Remove the isCloud ternary on the input fetcher swap. - Unwrap getModelState()'s if(isCloud) body and delete its OSS no-op return object; the model pagination subsystem now runs unconditionally. - Drop now-dead isCloud + mapInputFileToAssetItem imports. - Delete mapInputFileToAssetItem + stripDirectoryAnnotation from assetMappers.ts (no remaining callers in src/); delete its test file. - Simplify assetsStore.test.ts: hardcode the distribution mock to isCloud: true, drop the mockIsCloud toggle helper and the dead mapper mock, rename the now-unconditional "(Cloud)" describe blocks. Blocked-merge by BE-786 (OSS --enable-assets removal) + FE-729 (isAssetAPIEnabled deletion). Opened as a Draft on the FE-729 stack. Auto-fixed unrelated tailwind class-order lint errors in five files via pnpm lint:fix to keep CI green.
231c348 to
b38fab4
Compare
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>
…i-enabled' into jaewon/fe-730-l13-l1-store-remove-iscloud-forks-in-assetsstore-no-fallback # Conflicts: # src/stores/assetsStore.test.ts # src/stores/assetsStore.ts
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ❌ 1644 passed, 11 failed · 2 flaky❌ Failed Tests📊 Browser Reports
📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-06-18T03:26:56.099Z",
"gitSha": "d24501a0b31eabdc7bf3aa6a1613b624cf78b66b",
"branch": "jaewon/fe-730-l13-l1-store-remove-iscloud-forks-in-assetsstore-no-fallback",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2050.551000000013,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.377000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 366.456,
"heapDeltaBytes": -2078136,
"heapUsedBytes": 56444076,
"domNodes": 20,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 20.378,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2070.7649999999944,
"styleRecalcs": 11,
"styleRecalcDurationMs": 11.962,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 383.315,
"heapDeltaBytes": -2060124,
"heapUsedBytes": 56539080,
"domNodes": 22,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 26.456999999999997,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1800.4439999999988,
"styleRecalcs": 73,
"styleRecalcDurationMs": 35.143,
"layouts": 12,
"layoutDurationMs": 3.259,
"taskDurationMs": 773.508,
"heapDeltaBytes": -7564300,
"heapUsedBytes": 51300716,
"domNodes": 54,
"jsHeapTotalBytes": 26476544,
"scriptDurationMs": 120.708,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1797.0550000000003,
"styleRecalcs": 73,
"styleRecalcDurationMs": 34.831999999999994,
"layouts": 12,
"layoutDurationMs": 3.2849999999999997,
"taskDurationMs": 727.893,
"heapDeltaBytes": -7448556,
"heapUsedBytes": 51669844,
"domNodes": 54,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 116.73700000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.458000000027,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.381,
"layouts": 6,
"layoutDurationMs": 0.5499999999999999,
"taskDurationMs": 309.01800000000003,
"heapDeltaBytes": 2026204,
"heapUsedBytes": 60555400,
"domNodes": 78,
"jsHeapTotalBytes": 26214400,
"scriptDurationMs": 23.554,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1721.9230000000607,
"styleRecalcs": 32,
"styleRecalcDurationMs": 16.504,
"layouts": 6,
"layoutDurationMs": 0.4959999999999999,
"taskDurationMs": 299.657,
"heapDeltaBytes": 2012804,
"heapUsedBytes": 60644212,
"domNodes": 78,
"jsHeapTotalBytes": 26214400,
"scriptDurationMs": 23.273000000000003,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 637.2000000000071,
"styleRecalcs": 12,
"styleRecalcDurationMs": 10.759999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 402.442,
"heapDeltaBytes": 7954460,
"heapUsedBytes": 66991532,
"domNodes": 20,
"jsHeapTotalBytes": 17825792,
"scriptDurationMs": 66.46000000000001,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 575.4369999999653,
"styleRecalcs": 13,
"styleRecalcDurationMs": 8.741,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 348.82,
"heapDeltaBytes": 7054580,
"heapUsedBytes": 65580056,
"domNodes": 22,
"jsHeapTotalBytes": 19136512,
"scriptDurationMs": 62.47800000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2029.5429999999897,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.772,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 511.7560000000001,
"heapDeltaBytes": -24392760,
"heapUsedBytes": 59866972,
"domNodes": -297,
"jsHeapTotalBytes": 901120,
"scriptDurationMs": 91.505,
"eventListeners": -195,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2038.2690000000139,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.513000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 505.73900000000003,
"heapDeltaBytes": -23911060,
"heapUsedBytes": 59813228,
"domNodes": -296,
"jsHeapTotalBytes": 2736128,
"scriptDurationMs": 94.864,
"eventListeners": -190,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2095.214999999996,
"styleRecalcs": 69,
"styleRecalcDurationMs": 18.848000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1029.8220000000001,
"heapDeltaBytes": 9625832,
"heapUsedBytes": 82590320,
"domNodes": 16,
"jsHeapTotalBytes": 9494528,
"scriptDurationMs": 377.48800000000006,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2119.3480000000022,
"styleRecalcs": 69,
"styleRecalcDurationMs": 17.981,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1032.3470000000002,
"heapDeltaBytes": 10267080,
"heapUsedBytes": 83431760,
"domNodes": 16,
"jsHeapTotalBytes": 10805248,
"scriptDurationMs": 389.677,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3100.3969999999867,
"styleRecalcs": 66,
"styleRecalcDurationMs": 18.892999999999997,
"layouts": 60,
"layoutDurationMs": 7.509,
"taskDurationMs": 1274.6870000000001,
"heapDeltaBytes": -6084760,
"heapUsedBytes": 68322556,
"domNodes": 14,
"jsHeapTotalBytes": 9056256,
"scriptDurationMs": 474.65399999999994,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3131.5349999999853,
"styleRecalcs": 66,
"styleRecalcDurationMs": 18.942,
"layouts": 60,
"layoutDurationMs": 7.085,
"taskDurationMs": 1264.118,
"heapDeltaBytes": -2223428,
"heapUsedBytes": 59910784,
"domNodes": -273,
"jsHeapTotalBytes": 4976640,
"scriptDurationMs": 468.923,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2001.4620000000036,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.049000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 479.742,
"heapDeltaBytes": -9978860,
"heapUsedBytes": 63525616,
"domNodes": 22,
"jsHeapTotalBytes": 8007680,
"scriptDurationMs": 85.802,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2017.6620000000867,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.693999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 473.07400000000007,
"heapDeltaBytes": 12903364,
"heapUsedBytes": 81997748,
"domNodes": 16,
"jsHeapTotalBytes": 13774848,
"scriptDurationMs": 85.053,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 551.3520000000085,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.974999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 352.477,
"heapDeltaBytes": 7429256,
"heapUsedBytes": 66365048,
"domNodes": 20,
"jsHeapTotalBytes": 19922944,
"scriptDurationMs": 120.503,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 589.2880000000105,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.108,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 375.243,
"heapDeltaBytes": 7851824,
"heapUsedBytes": 66654996,
"domNodes": 20,
"jsHeapTotalBytes": 19398656,
"scriptDurationMs": 130.306,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1999.100999999996,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.503000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 327.18399999999997,
"heapDeltaBytes": -2240052,
"heapUsedBytes": 56791100,
"domNodes": 18,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 11.869,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2006.9909999999709,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.195,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 356.11400000000003,
"heapDeltaBytes": -2135136,
"heapUsedBytes": 56772236,
"domNodes": 20,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 18.381,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1702.3120000000063,
"styleRecalcs": 76,
"styleRecalcDurationMs": 37.148,
"layouts": 16,
"layoutDurationMs": 4.422000000000001,
"taskDurationMs": 660.737,
"heapDeltaBytes": -4837836,
"heapUsedBytes": 59102472,
"domNodes": 62,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 91.88000000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1692.0749999999884,
"styleRecalcs": 76,
"styleRecalcDurationMs": 34.10000000000001,
"layouts": 16,
"layoutDurationMs": 3.5839999999999996,
"taskDurationMs": 660.1179999999999,
"heapDeltaBytes": -10864672,
"heapUsedBytes": 47938792,
"domNodes": 65,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 91.319,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 900.9399999999914,
"styleRecalcs": 16,
"styleRecalcDurationMs": 27.342000000000006,
"layouts": 4,
"layoutDurationMs": 13.530000000000001,
"taskDurationMs": 683.4610000000001,
"heapDeltaBytes": 4410964,
"heapUsedBytes": 87040100,
"domNodes": 13833,
"jsHeapTotalBytes": 15466496,
"scriptDurationMs": 24.845000000000006,
"eventListeners": 2527,
"totalBlockingTimeMs": 146,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8160.202000000027,
"styleRecalcs": 251,
"styleRecalcDurationMs": 55.48500000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3601.403,
"heapDeltaBytes": 91584,
"heapUsedBytes": 70227832,
"domNodes": 22,
"jsHeapTotalBytes": 16572416,
"scriptDurationMs": 1220.202,
"eventListeners": 20,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8173.282000000028,
"styleRecalcs": 252,
"styleRecalcDurationMs": 56.372,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3756.282,
"heapDeltaBytes": -1852508,
"heapUsedBytes": 68984116,
"domNodes": 22,
"jsHeapTotalBytes": 19193856,
"scriptDurationMs": 1279.784,
"eventListeners": 20,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 11756.216999999993,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11741.212000000001,
"heapDeltaBytes": -29200088,
"heapUsedBytes": 170707808,
"domNodes": -3306,
"jsHeapTotalBytes": 22253568,
"scriptDurationMs": 575.2489999999999,
"eventListeners": -16474,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 13523.027999999955,
"styleRecalcs": 2,
"styleRecalcDurationMs": 27.790999999999983,
"layouts": 2,
"layoutDurationMs": 7.576,
"taskDurationMs": 13505.893,
"heapDeltaBytes": -8365608,
"heapUsedBytes": 170473360,
"domNodes": 25,
"jsHeapTotalBytes": 46632960,
"scriptDurationMs": 597.825,
"eventListeners": 3524,
"totalBlockingTimeMs": 867,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 14248.333999999999,
"styleRecalcs": 65,
"styleRecalcDurationMs": 16.976000000000045,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14228.195,
"heapDeltaBytes": -54940368,
"heapUsedBytes": 170794420,
"domNodes": -8380,
"jsHeapTotalBytes": 20774912,
"scriptDurationMs": 857.0530000000001,
"eventListeners": -16466,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 14665.748000000007,
"styleRecalcs": 66,
"styleRecalcDurationMs": 17.176,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14641.827,
"heapDeltaBytes": -24956316,
"heapUsedBytes": 168671628,
"domNodes": -3308,
"jsHeapTotalBytes": 20680704,
"scriptDurationMs": 922.8360000000001,
"eventListeners": -16470,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 503.7479999999732,
"styleRecalcs": 16,
"styleRecalcDurationMs": 26.892,
"layouts": 5,
"layoutDurationMs": 1.2400000000000002,
"taskDurationMs": 162.794,
"heapDeltaBytes": -3789820,
"heapUsedBytes": 51154800,
"domNodes": -160,
"jsHeapTotalBytes": -1908736,
"scriptDurationMs": 20.942,
"eventListeners": -134,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 455.08700000004865,
"styleRecalcs": 18,
"styleRecalcDurationMs": 22.463,
"layouts": 4,
"layoutDurationMs": 1.136,
"taskDurationMs": 113.03699999999998,
"heapDeltaBytes": 5228600,
"heapUsedBytes": 65216028,
"domNodes": 157,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 20.38,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
} |
|
Blocker status — 2026-06-18 Resolved the merge conflict against the advanced FE-729 base ( Merge gate unchanged: BE-786 is confirmed still required — not done elsewhere (Matt checked: Slack). 3/4 BE-786 blockers cleared; only BE-933 remains = Simon's Comfy-Org/ComfyUI#14005, In Review. Ready for review once #14005 → BE-786 → FE-729 land. Red e2e is the temporary |
…i-enabled' into HEAD
) ## 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. |
Summary
FE-730 (L1.3 — L1 store fork removal). With both Cloud and OSS serving
/api/assetspost-BE-786,assetsStorecollapses to a single asset-API code path — no moreisCloudternaries on the input fetcher, and no more Cloud-only-wrappedgetModelState()body. Delete the legacy/internal/files/inputfetcher and its only consumer.Draft — do not merge until BE-786 + FE-729 land. This PR rests directly on the Notion v3 Setting retirement plan (sites #1 / #7 + the
getModelStatesubsystem).Changes
src/stores/assetsStore.tsfetchInputFilesFromAPI(legacy/internal/files/inputcaller).fetchInputFilesFromCloud→fetchInputFiles(name no longer carries Cloud-specific meaning).const fetchInputFiles = isCloud ? ... : ...ternary; the input fetcher routes throughassetService.getAssetsByTag('input', ...)unconditionally.getModelState()'sif (isCloud) { ... }body and delete the OSS no-op return object at the bottom of the closure. The model pagination subsystem now runs unconditionally on both backends.isCloudimport (last consumer in this file removed) and themapInputFileToAssetItemimport (onlyfetchInputFilesFromAPIused it).src/platform/assets/composables/media/assetMappers.tsmapInputFileToAssetItemand its private helperstripDirectoryAnnotation. Grep confirmsassetsStore.tswas the onlysrc/caller; no remaining consumers.appendCloudResParamandapiimports.src/platform/assets/composables/media/assetMappers.test.tsdescribe('mapInputFileToAssetItem')block tested the now-removed mapper; the other exports ofassetMappers(getAssetType,mapTaskOutputToAssetItem) had no tests in this file.src/stores/assetsStore.test.tsisCloud: true(was avi.hoistedmockIsCloudtoggle helper) since the store no longer branches.mockIsCloud.value = true/falsetoggle calls and thetry { ... } finally { mockIsCloud.value = false }blocks that wrapped Cloud-only tests.mapInputFileToAssetItemmock entry.describe('assetsStore - Model Assets Cache (Cloud)')→'...Cache'anddescribe('updateInputs cloud routing')→'updateInputs'; drop "when isCloud is true" from the test title — the spec is now unconditional.Auto-fixed unrelated tailwind class-order lint errors in five files via
pnpm lint:fixto keep CI green (VirtualGrid.vue,RightSidePanel.vue,Textarea.vue,ModelInfoPanel.vue,WidgetSelectDefault.vue). Same pattern as the FE-729 PR.Review Focus
The line-count of this PR is misleading (~370 net) — most of the diff is the cloud-body dedent of
getModelState()(a single nestedifremoved, ~395 lines shifted left by 2 spaces). Reviewers should toggle GitHub's "Hide whitespace" diff option. The substantive logic changes are confined to:No behavior change is intended on the Cloud path. The OSS path now resolves to the same asset-API calls Cloud has been making — which is the M1 unification step this PR exists to deliver.
Known e2e limitation (BE-786 dependency)
Same root cause as FE-729 / PR #12322: with the
isCloudfallback gone,assetService.getAssetsByTag('input', ...)is the only path on OSS, and OSS's/api/assetsendpoint is currently--enable-assets-gated. The CI containerghcr.io/comfy-org/comfyui-ci-container:0.0.17is also pinned pre-BE-786. E2E shards 1–8 +mobile-chrome+ the cloud Playwright project will fail with 503 cascade errors until:Comfy-Org/ComfyUI.comfyui-ci-containerrebuilds and publishes a new tag.image:tag across the frontend repo's e2e yamls.This is the intended final code shape; no temporary
isCloudfallback was added.Done when
isCloudchecks atassetsStore.ts:121and:323removed.fetchInputFilesFromAPIdeleted.isCloudwrap).mapInputFileToAssetItem+stripDirectoryAnnotationdeleted;assetMappers.test.tsremoved.assetsStore.test.tsno longer togglesisCloudper-test.pnpm typecheckclean;pnpm test:unit -- src/stores/assetsStore.test.ts— 58 tests pass.Dependencies
jaewon/fe-729-delete-is-asset-api-enabled, notmain. The PR diff shows FE-730 changes only; FE-729 changes are part of the base. Merge order is automatic: FE-729 → FE-730. Rebased onto FE-729 head 2026-05-20.Smoke test (cloud.comfy.org, 2026-05-19)
Verified manually via Chrome DevTools Protocol against
https://local.comfy.org:5173/(local Vite dev server runningpnpm dev:cloud-prod—DISTRIBUTION=cloud,DEV_SERVER_COMFYUI_URL=https://cloud.comfy.org/). Authenticated daily-driver Chrome with an activecloud.comfy.orgsession.GET /api/users,/api/settings,/api/userdata?dir=workflows→ 200ckpt_namewidget bound to cloud asset (v1-5-pruned-emaonly-fp16)getModelState()unwrap,sidebarTabStore→Comfy.BrowseModelAssetsGET /api/assets?include_tags=models→ 200,GET /api/assets?include_tags=models,checkpoints→ 200getModelState()cloud body (this PR's largest change)GET /api/assets?include_tags=models&offset=500,offset=1000,offset=1500→ 200 (×3)fetchHistoryAssets(unchanged code path, exercised)GET /api/jobs?status=completed,failed,cancelled&limit=200→ 200, thenGET /api/jobs/<id>→ 200 (×2)fetchInputFiles(renamed fromfetchInputFilesFromCloud, was branched onisCloud)GET /api/assets?include_tags=input&limit=100&exclude_tags=missing&include_public=false→ 200Text_encoders,Clip,Clip_visionall listed; BE alias resolution intact)The two load-bearing branches this PR collapsed — the
fetchInputFilesternary atassetsStore.ts:121and theif (isCloud)wrap ongetModelState()atassetsStore.ts:323— both route to the cloud asset-API path and exercise exactly the requests above on Cloud. No behavior change on Cloud relative tomain.Console: no FE-730-related errors. Pre-existing noise present (mixpanel CORS blocked by ad-blocker, Vue
nodeTypewarn fromFormDropdown, 404 on/api/i18n&/customers/cloud-subscription-status) — all reproduce onmain.Screenshots (captured 2026-05-19 via CDP against
https://local.comfy.org:5173/)v1-5-pruned-emaonly-fp16getModelStateexercised) — 60+ categories + LORAS cards loaded|
|
|
| 3. Assets sidebar — Generated tab (
fetchHistoryAssets, video + image preview cards) || 4. Assets sidebar — Imported tab (FE-730
fetchInputFilesexercised) — input asset cards via/api/assets?include_tags=input|Raw network log — all
/api/*calls observed during the smoke session (status, in order)Headline counts:
/api/assets?include_tags=models*— 8 calls, all 200, including 4-page sequence atoffset=0,500,1000,1500proving the unwrappedgetModelState()pagination subsystem runs cleanly./api/assets?include_tags=input— 1 call, 200, proving the renamedfetchInputFiles(formerly the cloud-only branch) is wired to the input fetcher.internal /files/inputor viamapInputFileToAssetItem.OSS path remains gated on BE-786 + container bump per the limitation section above.
OSS smoke test (ComfyUI master +
--enable-assets, 2026-05-20)Verified manually against a local ComfyUI master built from
comfyanonymous/ComfyUI(no BE-786 yet) launched with--enable-assets --database-url sqlite:///:memory:on port 8189. Vite dev server running this PR's worktree (jaewon/fe-730-..., commitdf2ea135b) proxies/api/*to that ComfyUI. This is the OSS-side counterpart to the cloud smoke above — it exercises the exact code path that BE-786 + container bump will unblock for CI.GET /api/users,/api/object_info,/api/node_replacements→ 200getModelState()unwrapGET /api/assets?include_tags=models&limit=500&exclude_tags=missing→ 200 (×2)/models/scan surfaces categories —/internal/folder_pathsaugments displayGET /internal/folder_paths→ 200fetchHistoryAssets)GET /api/jobs?status=completed,failed,cancelled&limit=200&offset=0→ 200/input/content (example.png, 768x768) rendered as asset cardfetchInputFiles(renamed fromfetchInputFilesFromCloud)GET /api/assets?include_tags=input&limit=100&exclude_tags=missing&include_public=false→ 200/api/viewGET /api/view?filename=example.png&type=input→ 200/internal/files/inputnot called — confirmsfetchInputFilesFromAPIdeletion is wired correctlyA → B diff: FE-729 code vs FE-730 code, same OSS backend
main/ FE-729 onlyGET /internal/files/inputGET /api/assets?include_tags=inputThis pair is the decisive evidence the PR's rename + branch removal in
assetsStore.ts:121lands cleanly on OSS — the input fetcher is now uniformly routed throughassetService.getAssetsByTag('input', …), which is what BE-786 + the cloud path were already doing.Screenshots (OSS)
checkpoints,loras,vae,text_encoders,diffusion_models,clip_vision,controlnet, …) viagetModelState()unwrap/input/example.pngrendered viafetchInputFiles→/api/assets?include_tags=inputOSS network log — full
/api/*+/internal/*calls during the smoke sessionConsole: no FE-730-related errors. Two
Version Compatibility Warningtoasts unrelated to this PR (comfyui-workflow-templates 0.9.54 < 0.9.77,comfyui-embedded-docs 0.4.3 < 0.5.0) from the local ComfyUI checkout.What this OSS smoke proves (and does not)
main, drives OSS asset routes correctly with no fallback to deleted legacy code paths.fetchInputFilesand the unwrappedgetModelState()route to the OSS/api/assetssurface exactly as designed.Comfy-Org/ComfyUI, (2)comfyui-ci-containerbumps, (3)ci-tests-e2e.yamlimage tag updates.main.Refs
┆Issue is synchronized with this Notion page by Unito