Skip to content

refactor(assets): remove isCloud forks in assetsStore (FE-730) - #12335

Closed
dante01yoon wants to merge 4 commits into
jaewon/fe-729-delete-is-asset-api-enabledfrom
jaewon/fe-730-l13-l1-store-remove-iscloud-forks-in-assetsstore-no-fallback
Closed

dante01yoon wants to merge 4 commits into
jaewon/fe-729-delete-is-asset-api-enabledfrom
jaewon/fe-730-l13-l1-store-remove-iscloud-forks-in-assetsstore-no-fallback

Conversation

@dante01yoon

@dante01yoon dante01yoon commented May 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

FE-730 (L1.3 — L1 store fork removal). With both Cloud and OSS serving /api/assets post-BE-786, assetsStore collapses to a single asset-API code path — no more isCloud ternaries on the input fetcher, and no more Cloud-only-wrapped getModelState() body. Delete the legacy /internal/files/input fetcher 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 getModelState subsystem).

Changes

src/stores/assetsStore.ts

  • Drop fetchInputFilesFromAPI (legacy /internal/files/input caller).
  • Rename fetchInputFilesFromCloud → fetchInputFiles (name no longer carries Cloud-specific meaning).
  • Remove the const fetchInputFiles = isCloud ? ... : ... ternary; the input fetcher routes through assetService.getAssetsByTag('input', ...) unconditionally.
  • Unwrap getModelState()'s if (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.
  • Drop the isCloud import (last consumer in this file removed) and the mapInputFileToAssetItem import (only fetchInputFilesFromAPI used it).

src/platform/assets/composables/media/assetMappers.ts

  • Delete mapInputFileToAssetItem and its private helper stripDirectoryAnnotation. Grep confirms assetsStore.ts was the only src/ caller; no remaining consumers.
  • Drop the now-dead appendCloudResParam and api imports.

src/platform/assets/composables/media/assetMappers.test.ts

  • Delete the file. Its only describe('mapInputFileToAssetItem') block tested the now-removed mapper; the other exports of assetMappers (getAssetType, mapTaskOutputToAssetItem) had no tests in this file.

src/stores/assetsStore.test.ts

  • Hardcode the distribution mock to isCloud: true (was a vi.hoisted mockIsCloud toggle helper) since the store no longer branches.
  • Drop all mockIsCloud.value = true/false toggle calls and the try { ... } finally { mockIsCloud.value = false } blocks that wrapped Cloud-only tests.
  • Remove the dead mapInputFileToAssetItem mock entry.
  • Rename describe('assetsStore - Model Assets Cache (Cloud)') → '...Cache' and describe('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:fix to 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 nested if removed, ~395 lines shifted left by 2 spaces). Reviewers should toggle GitHub's "Hide whitespace" diff option. The substantive logic changes are confined to:

  • assetsStore.ts top imports + line ~25–43 (legacy fetcher delete) + line ~121 (ternary delete) + line ~292 (if-wrap delete) + line ~685–705 (OSS no-op return delete).
  • assetMappers.ts mapper delete.
  • Test mock simplification.

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 isCloud fallback gone, assetService.getAssetsByTag('input', ...) is the only path on OSS, and OSS's /api/assets endpoint is currently --enable-assets-gated. The CI container ghcr.io/comfy-org/comfyui-ci-container:0.0.17 is also pinned pre-BE-786. E2E shards 1–8 + mobile-chrome + the cloud Playwright project will fail with 503 cascade errors until:

  1. BE-786 merges into Comfy-Org/ComfyUI.
  2. comfyui-ci-container rebuilds and publishes a new tag.
  3. A chore PR bumps the image: tag across the frontend repo's e2e yamls.

This is the intended final code shape; no temporary isCloud fallback was added.

Done when

  • Both isCloud checks at assetsStore.ts:121 and :323 removed.
  • fetchInputFilesFromAPI deleted.
  • Model-state caching subsystem runs on both backends (no isCloud wrap).
  • mapInputFileToAssetItem + stripDirectoryAnnotation deleted; assetMappers.test.ts removed.
  • assetsStore.test.ts no longer toggles isCloud per-test.
  • pnpm typecheck clean; pnpm test:unit -- src/stores/assetsStore.test.ts — 58 tests pass.
  • Cloud + OSS verified end-to-end. Gated on BE-786 merge + container bump.

Dependencies

  • Blocks-merge: BE-786 — OSS asset routes unconditionally registered.
  • Stacked on: FE-729 / PR #12322 — this PR's base is jaewon/fe-729-delete-is-asset-api-enabled, not main. 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.
  • Coordinates with: BE-933 / BE-934 — L3 unified response shape (consumed by FE-732, not this PR).

Smoke test (cloud.comfy.org, 2026-05-19)

Verified manually via Chrome DevTools Protocol against https://local.comfy.org:5173/ (local Vite dev server running pnpm dev:cloud-prod — DISTRIBUTION=cloud, DEV_SERVER_COMFYUI_URL=https://cloud.comfy.org/). Authenticated daily-driver Chrome with an active cloud.comfy.org session.

# Scenario Touched by FE-730 Network evidence Result
1 Page load + auth + workflow graph (KSampler, CLIP Text Encode, Load Checkpoint, etc.) — GET /api/users, /api/settings, /api/userdata?dir=workflows → 200 ✅
2 Load Checkpoint node's ckpt_name widget bound to cloud asset (v1-5-pruned-emaonly-fp16) indirect — exercises asset-aware widget path workflow JSON value, no extra fetch ✅
3 Model Library sidebar tab → AssetBrowser dialog opens (60+ categories: Checkpoints, Loras, Diffusion_models, Text_encoders, …) getModelState() unwrap, sidebarTabStore → Comfy.BrowseModelAssets GET /api/assets?include_tags=models → 200, GET /api/assets?include_tags=models,checkpoints → 200 ✅
4 Model category pagination across all assets getModelState() cloud body (this PR's largest change) GET /api/assets?include_tags=models&offset=500, offset=1000, offset=1500 → 200 (×3) ✅
5 Assets sidebar → Generated tab → job + preview fetch fetchHistoryAssets (unchanged code path, exercised) GET /api/jobs?status=completed,failed,cancelled&limit=200 → 200, then GET /api/jobs/<id> → 200 (×2) ✅
6 Assets sidebar → Imported tab → input asset fetch fetchInputFiles (renamed from fetchInputFilesFromCloud, was branched on isCloud) GET /api/assets?include_tags=input&limit=100&exclude_tags=missing&include_public=false → 200 ✅
7 Alias-merged categories coexist (Text_encoders, Clip, Clip_vision all listed; BE alias resolution intact) unaffected — BE-side merge — ✅

The two load-bearing branches this PR collapsed — the fetchInputFiles ternary at assetsStore.ts:121 and the if (isCloud) wrap on getModelState() at assetsStore.ts:323 — both route to the cloud asset-API path and exercise exactly the requests above on Cloud. No behavior change on Cloud relative to main.

Console: no FE-730-related errors. Pre-existing noise present (mixpanel CORS blocked by ad-blocker, Vue nodeType warn from FormDropdown, 404 on /api/i18n & /customers/cloud-subscription-status) — all reproduce on main.

Screenshots (captured 2026-05-19 via CDP against https://local.comfy.org:5173/)

Drag-and-drop the file from temp/screenshots/ into the GitHub UI to replace each ATTACH_HERE token below.
Files: temp/screenshots/fe730-{01-workflow-canvas,02-model-library-dialog,03-assets-sidebar-generated,04-assets-sidebar-imported}.png

Scenario Screenshot
1. Workflow canvas — Load Checkpoint widget bound to cloud asset v1-5-pruned-emaonly-fp16 fe730-01-workflow-canvas
2. Model Library dialog (FE-730 getModelState exercised) — 60+ categories + LORAS cards loaded fe730-02-model-library-dialog

|
| 3. Assets sidebar — Generated tab (fetchHistoryAssets, video + image preview cards) |
fe730-03-assets-sidebar-generated |
| 4. Assets sidebar — Imported tab (FE-730 fetchInputFiles exercised) — input asset cards via /api/assets?include_tags=input | fe730-04-assets-sidebar-imported |

Raw network log — all /api/* calls observed during the smoke session (status, in order)
# initial page load (workflow + auth)
GET  /api/features                                                                                     200
GET  /api/system_stats                                                                                 200
GET  /api/users                                                                                        200
GET  /api/settings                                                                                     200
GET  /api/userdata?dir=workflows&recurse=true&split=false&full_info=true                               200
GET  /api/workspaces                                                                                   200
GET  /api/i18n                                                                                         404  # pre-existing on main

# Model Library sidebar → AssetBrowser dialog (FE-730: getModelState() unwrap)
GET  /api/assets?include_tags=models,checkpoints&limit=500&exclude_tags=missing                        200
GET  /api/assets?include_tags=models&limit=500&exclude_tags=missing                                    200
GET  /api/assets?include_tags=models,checkpoints&limit=500&exclude_tags=missing                        200  # cache miss retry
GET  /api/assets?include_tags=models&limit=500&exclude_tags=missing                                    200

# Model category pagination (FE-730: getModelState() pagination subsystem)
GET  /api/assets?include_tags=models&limit=500&exclude_tags=missing&include_public=true                200
GET  /api/assets?include_tags=models&limit=500&exclude_tags=missing&offset=500&include_public=true     200
GET  /api/assets?include_tags=models&limit=500&exclude_tags=missing&offset=1000&include_public=true    200
GET  /api/assets?include_tags=models&limit=500&exclude_tags=missing&offset=1500&include_public=true    200

# Assets sidebar — Generated tab (fetchHistoryAssets; unchanged code path)
GET  /api/jobs?status=completed,failed,cancelled&limit=200&offset=0                                    200
GET  /api/jobs/bc2d03dd-c439-4c2d-9936-eddeef8a2af7                                                    200
GET  /api/jobs/2adf8280-f193-413b-8add-892059627a40                                                    200

# Assets sidebar — Imported tab (FE-730: fetchInputFiles, renamed from fetchInputFilesFromCloud)
GET  /api/assets?include_tags=input&limit=100&exclude_tags=missing&include_public=false                200

Headline counts:

  • /api/assets?include_tags=models* — 8 calls, all 200, including 4-page sequence at offset=0,500,1000,1500 proving the unwrapped getModelState() pagination subsystem runs cleanly.
  • /api/assets?include_tags=input — 1 call, 200, proving the renamed fetchInputFiles (formerly the cloud-only branch) is wired to the input fetcher.
  • No requests routed to the deleted legacy endpoint internal /files/input or via mapInputFileToAssetItem.

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-..., commit df2ea135b) 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.

# Scenario Touched by FE-730 Network evidence Result
1 Page load + workflow canvas on OSS backend — GET /api/users, /api/object_info, /api/node_replacements → 200 ✅
2 Model Library sidebar → AssetBrowser dialog opens with full local-folder category list (checkpoints, loras, vae, text_encoders, diffusion_models, clip_vision, controlnet, …) getModelState() unwrap GET /api/assets?include_tags=models&limit=500&exclude_tags=missing → 200 (×2) ✅
3 Local /models/ scan surfaces categories — /internal/folder_paths augments display unaffected — read-only OSS scan GET /internal/folder_paths → 200 ✅
4 Assets sidebar → Generated tab (fetchHistoryAssets) unchanged code path GET /api/jobs?status=completed,failed,cancelled&limit=200&offset=0 → 200 ✅
5 Assets sidebar → Imported tab — local /input/ content (example.png, 768x768) rendered as asset card fetchInputFiles (renamed from fetchInputFilesFromCloud) GET /api/assets?include_tags=input&limit=100&exclude_tags=missing&include_public=false → 200 ✅
6 Asset thumbnail rendering via /api/view unchanged GET /api/view?filename=example.png&type=input → 200 ✅
7 Legacy endpoint /internal/files/input not called — confirms fetchInputFilesFromAPI deletion is wired correctly deleted function 0 calls observed across the 84-request session ✅

A → B diff: FE-729 code vs FE-730 code, same OSS backend

Endpoint On main / FE-729 only On FE-730 commit
GET /internal/files/input 1 call (legacy fetcher) 0 calls
GET /api/assets?include_tags=input not called 1 call

This pair is the decisive evidence the PR's rename + branch removal in assetsStore.ts:121 lands cleanly on OSS — the input fetcher is now uniformly routed through assetService.getAssetsByTag('input', …), which is what BE-786 + the cloud path were already doing.

Screenshots (OSS)

Files in temp/screenshots/fe730-oss-{01..04}.png — drag-drop into the ATTACH_HERE_OSS_0N slots below.

Scenario Screenshot
OSS workflow canvas fe730-oss-01-workflow-canvas
OSS Model Library dialog — full local-folder category list rendered (checkpoints, loras, vae, text_encoders, diffusion_models, clip_vision, controlnet, …) via getModelState() unwrap fe730-oss-02-model-library-dialog
OSS Assets sidebar — Generated tab fe730-oss-03-assets-sidebar-generated
OSS Assets sidebar — Imported tab — local /input/example.png rendered via fetchInputFiles → /api/assets?include_tags=input fe730-oss-04-assets-sidebar-imported
OSS network log — full /api/* + /internal/* calls during the smoke session
GET  /api/users                                                                            200
GET  /api/features                                                                         200
GET  /api/system_stats                                                                     200
GET  /api/settings                                                                         200
GET  /api/userdata?dir=workflows&recurse=true&split=false&full_info=true                   200
GET  /api/i18n                                                                             200
GET  /api/object_info                                                                      200
GET  /api/node_replacements                                                                200
GET  /api/global_subgraphs/<hash>                                                          200  (×60+, template hydration)
GET  /api/jobs?status=in_progress,pending&limit=200&offset=0                               200
GET  /api/jobs?status=completed,failed,cancelled&limit=64&offset=0                         200

# Model Library dialog (FE-730: getModelState() unwrap)
GET  /api/assets?include_tags=models&limit=500&exclude_tags=missing                        200
GET  /api/assets?include_tags=models&limit=500&exclude_tags=missing                        200
GET  /internal/folder_paths                                                                200
GET  /api/experiment/models                                                                200

# Assets sidebar — Generated tab
GET  /api/jobs?status=completed,failed,cancelled&limit=200&offset=0                        200

# Assets sidebar — Imported tab (FE-730: fetchInputFiles)
GET  /api/assets?include_tags=input&limit=100&exclude_tags=missing&include_public=false    200
GET  /api/view?filename=example.png&type=input                                             200

# Legacy endpoint deleted by this PR — not called
GET  /internal/files/input                                                                 (0 calls)

Console: no FE-730-related errors. Two Version Compatibility Warning toasts 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)

  • ✅ FE-730 code, applied on top of main, drives OSS asset routes correctly with no fallback to deleted legacy code paths.
  • ✅ The renamed fetchInputFiles and the unwrapped getModelState() route to the OSS /api/assets surface exactly as designed.
  • ⚠️ This is a manual smoke against a local ComfyUI — the e2e CI shards will start green only after (1) BE-786 lands in Comfy-Org/ComfyUI, (2) comfyui-ci-container bumps, (3) ci-tests-e2e.yaml image tag updates.
  • ⚠️ Write paths (delete / upload / model import wizard) were not exercised here; this PR doesn't change write paths, so behavior should mirror main.

Refs

┆Issue is synchronized with this Notion page by Unito

@coderabbitai

coderabbitai Bot commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c5a3711f-01e1-44c8-a5cc-b6bb2d1aded4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This 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 mapInputFileToAssetItem mapper is removed, and asset input fetching is unified into a single code path. The model cache transitions from cloud-conditional state to always-defined category-based state with improved batch loading and optimistic mutations.

Changes

Tailwind reordering and assets store unification

Layer / File(s) Summary
Tailwind utility class reordering in UI components
src/components/common/VirtualGrid.vue, src/components/rightSidePanel/RightSidePanel.vue, src/components/ui/textarea/Textarea.vue, src/platform/assets/components/modelInfo/ModelInfoPanel.vue, src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
Five components have Tailwind utility classes (scrollbar-gutter-stable, scrollbar-thin, flex, flex-col, h-full) reordered within class bindings without changing rendered behavior.
Remove input-file asset mapper and tests
src/platform/assets/composables/media/assetMappers.ts, src/platform/assets/composables/media/assetMappers.test.ts
The mapInputFileToAssetItem function (which stripped ComfyUI-style bracket annotations from filenames) and its 55-line test suite are removed. Unused imports (appendCloudResParam, api) supporting this logic are deleted, leaving only getAssetType and mapTaskOutputToAssetItem exported.
Update asset store tests for unified cloud behavior
src/stores/assetsStore.test.ts
Distribution-types mock changes from per-test controllable mockIsCloud to fixed isCloud: true. Removed mapInputFileToAssetItem from mocks. Test structure consolidated: "Model Assets Cache (Cloud)" renamed to "Model Assets Cache" with per-test setup/reset removed. Input-related tests (getInputName, updateInputs) rewritten to work with unified cloud mocking without mockIsCloud toggling.
Refactor asset store: unified input fetching and improved model cache
src/stores/assetsStore.ts
Imports updated to remove OSS input mapping and add new asset-mapper imports. New unified fetchInputFiles() entry point replaces separate internal-API vs cloud flows. isCloud branching eliminated. getModelState() refactored from cloud-conditional to always-present category-based cache state with Maps, pending Promise tracking, cache key resolution helpers, array view caching, and status accessors (getAssets, isLoading, getError, hasMore, hasAssetKey, hasCategory). Core updateModelsForCategory pipeline rewritten to short-circuit concurrent in-flight requests via pending Promises, load assets in batches with staleness checks, merge new assets, prune unobserved IDs, and handle errors. Category entry points and cache invalidation updated. updateAssetInCache adjusted for refactored state resolution. Optimistic mutation helpers (updateAssetMetadata, updateAssetTags) enhanced with rollback on server errors and tag diff compensation logic (restoration or category invalidation on partial failures). Refactored cache accessors exposed from store.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • Comfy-Org/ComfyUI_frontend#12275: Tailwind class canonicalization and reordering in the same UI components (VirtualGrid.vue, RightSidePanel.vue) affecting scrollbar utilities.
  • Comfy-Org/ComfyUI_frontend#12280: Tailwind class reordering on textarea components (Textarea.vue, ModelInfoPanel.vue) to control scrollbar-gutter-stable positioning.
  • Comfy-Org/ComfyUI_frontend#12283: Removes cloud vs internal API wrapper-level switch (useInternalFilesApi/useMediaAssets) and updates callers to use useAssetsApi, complementing the unified input fetching refactoring in assetsStore.ts.

Suggested labels

size:L

Suggested reviewers

  • DrJKL
  • jtydhr88

Poem

🐇 Classes shuffled, maps are cleaner—
Cloud and API paths now leaner!
Mappers fade, state reigns supreme,
Batch-loaded dreams in every theme.
Optimistic hopes that rollback if they fail,
A unified store tells the better tale. 🎉

🚥 Pre-merge checks | ✅ 6 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.89% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: removing isCloud conditional branches from assetsStore and unifying the asset-API code path.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
End-To-End Regression Coverage For Fixes ✅ Passed PR title uses "refactor", not bug-fix language (fix/fixed/bugfix/etc). Check requires all three fail conditions; condition 1 is false. E2E test requirement applies only to bug-fix PRs.
Adr Compliance For Entity/Litegraph Changes ✅ Passed Check not applicable: PR does not modify files under src/lib/litegraph/, src/ecs/, or related graph entity files. Changes are limited to UI components, asset mappers, and asset store refactoring.
Description check ✅ Passed The PR description is comprehensive and follows the template structure with Summary, Changes, and Review Focus sections. All required information is present and well-organized.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jaewon/fe-730-l13-l1-store-remove-iscloud-forks-in-assetsstore-no-fallback

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 19, 2026
@codecov

codecov Bot commented May 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/stores/assetsStore.ts 92.30% 13 Missing ⚠️
@@                             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             
Flag Coverage Δ
unit 62.17% <92.30%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../platform/assets/composables/media/assetMappers.ts 0.00% <ø> (-47.37%) ⬇️
src/stores/assetsStore.ts 94.01% <92.30%> (+3.61%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

… 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.
@dante01yoon
dante01yoon changed the base branch from main to jaewon/fe-729-delete-is-asset-api-enabled May 20, 2026 03:30
@dante01yoon
dante01yoon force-pushed the jaewon/fe-730-l13-l1-store-remove-iscloud-forks-in-assetsstore-no-fallback branch from 231c348 to b38fab4 Compare May 20, 2026 03:30
dante01yoon added a commit that referenced this pull request May 26, 2026
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
dante01yoon added a commit that referenced this pull request Jun 2, 2026
…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>
dante01yoon added a commit that referenced this pull request Jun 2, 2026
…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>
mathtone pushed a commit to sketchyplans/ComfyUI-frontend-fork1 that referenced this pull request Jun 17, 2026
…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>
@dante01yoon
dante01yoon marked this pull request as ready for review June 18, 2026 01:21
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jun 18, 2026
…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
@github-actions

github-actions Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 06/18/2026, 03:17:26 AM UTC

Links

🎭 Playwright: ❌ 1644 passed, 11 failed · 2 flaky

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 1625 / ❌ 10 / ⚠️ 2 / ⏭️ 5)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 16 / ❌ 1 / ⚠️ 0 / ⏭️ 0)

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 53.9 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 49.1 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 57.8 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 63.2 MB heap
large-graph-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 57.1 MB heap
large-graph-pan: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 79.2 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.1 MB heap
minimap-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.4 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 63.4 MB heap
subgraph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 54.2 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 51.0 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 146ms TBT · 83.0 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 66.4 MB heap
vue-large-graph-idle: · 58.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 434ms TBT · 162.7 MB heap
vue-large-graph-pan: · 57.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 161.9 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 55.5 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 11ms
canvas-idle: layout count 0
canvas-idle: style recalc count 11
canvas-idle: task duration 375ms
canvas-idle: script duration 23ms
canvas-idle: TBT 0ms
canvas-idle: heap used 53.9 MB
canvas-idle: DOM nodes 21
canvas-idle: event listeners 5
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 3ms
canvas-mouse-sweep: style recalc duration 35ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 73
canvas-mouse-sweep: task duration 751ms
canvas-mouse-sweep: script duration 119ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 49.1 MB
canvas-mouse-sweep: DOM nodes 54
canvas-mouse-sweep: event listeners 4
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 1ms
canvas-zoom-sweep: style recalc duration 16ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 32
canvas-zoom-sweep: task duration 304ms
canvas-zoom-sweep: script duration 23ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 57.8 MB
canvas-zoom-sweep: DOM nodes 78
canvas-zoom-sweep: event listeners 19
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 10ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 13
dom-widget-clipping: task duration 376ms
dom-widget-clipping: script duration 64ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 63.2 MB
dom-widget-clipping: DOM nodes 21
dom-widget-clipping: event listeners 1
large-graph-idle: avg frame time 17ms
large-graph-idle: p95 frame time 17ms
large-graph-idle: layout duration 0ms
large-graph-idle: style recalc duration 7ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 9
large-graph-idle: task duration 509ms
large-graph-idle: script duration 93ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 57.1 MB
large-graph-idle: DOM nodes -297
large-graph-idle: event listeners -193
large-graph-pan: avg frame time 17ms
large-graph-pan: p95 frame time 17ms
large-graph-pan: layout duration 0ms
large-graph-pan: style recalc duration 18ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 69
large-graph-pan: task duration 1031ms
large-graph-pan: script duration 384ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 79.2 MB
large-graph-pan: DOM nodes 16
large-graph-pan: event listeners 6
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 7ms
large-graph-zoom: style recalc duration 19ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 66
large-graph-zoom: task duration 1269ms
large-graph-zoom: script duration 472ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 61.1 MB
large-graph-zoom: DOM nodes -130
large-graph-zoom: event listeners -60
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 9ms
minimap-idle: layout count 0
minimap-idle: style recalc count 10
minimap-idle: task duration 476ms
minimap-idle: script duration 85ms
minimap-idle: TBT 0ms
minimap-idle: heap used 69.4 MB
minimap-idle: DOM nodes 19
minimap-idle: event listeners 6
subgraph-dom-widget-clipping: avg frame time 17ms
subgraph-dom-widget-clipping: p95 frame time 17ms
subgraph-dom-widget-clipping: layout duration 0ms
subgraph-dom-widget-clipping: style recalc duration 11ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 47
subgraph-dom-widget-clipping: task duration 364ms
subgraph-dom-widget-clipping: script duration 125ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 63.4 MB
subgraph-dom-widget-clipping: DOM nodes 20
subgraph-dom-widget-clipping: event listeners 6
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 8ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 342ms
subgraph-idle: script duration 15ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 54.2 MB
subgraph-idle: DOM nodes 19
subgraph-idle: event listeners 4
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 4ms
subgraph-mouse-sweep: style recalc duration 36ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 76
subgraph-mouse-sweep: task duration 660ms
subgraph-mouse-sweep: script duration 92ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 51.0 MB
subgraph-mouse-sweep: DOM nodes 64
subgraph-mouse-sweep: event listeners 4
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 14ms
subgraph-transition-enter: style recalc duration 27ms
subgraph-transition-enter: layout count 4
subgraph-transition-enter: style recalc count 16
subgraph-transition-enter: task duration 683ms
subgraph-transition-enter: script duration 25ms
subgraph-transition-enter: TBT 146ms
subgraph-transition-enter: heap used 83.0 MB
subgraph-transition-enter: DOM nodes 13833
subgraph-transition-enter: event listeners 2527
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 56ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 252
viewport-pan-sweep: task duration 3679ms
viewport-pan-sweep: script duration 1250ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 66.4 MB
viewport-pan-sweep: DOM nodes 22
viewport-pan-sweep: event listeners 20
vue-large-graph-idle: avg frame time 17ms
vue-large-graph-idle: p95 frame time 17ms
vue-large-graph-idle: layout duration 4ms
vue-large-graph-idle: style recalc duration 14ms
vue-large-graph-idle: layout count 1
vue-large-graph-idle: style recalc count 1
vue-large-graph-idle: task duration 12624ms
vue-large-graph-idle: script duration 587ms
vue-large-graph-idle: TBT 434ms
vue-large-graph-idle: heap used 162.7 MB
vue-large-graph-idle: DOM nodes -1641
vue-large-graph-idle: event listeners -6475
vue-large-graph-pan: avg frame time 17ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 17ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 66
vue-large-graph-pan: task duration 14435ms
vue-large-graph-pan: script duration 890ms
vue-large-graph-pan: TBT 0ms
vue-large-graph-pan: heap used 161.9 MB
vue-large-graph-pan: DOM nodes -5844
vue-large-graph-pan: event listeners -16468
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 25ms
workflow-execution: layout count 5
workflow-execution: style recalc count 17
workflow-execution: task duration 138ms
workflow-execution: script duration 21ms
workflow-execution: TBT 0ms
workflow-execution: heap used 55.5 MB
workflow-execution: DOM nodes -2
workflow-execution: event listeners -32
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
    }
  ]
}

@dante01yoon

Copy link
Copy Markdown
Collaborator Author

Blocker status — 2026-06-18

Resolved the merge conflict against the advanced FE-729 base (assetsStore.ts / assetsStore.test.ts) and pushed — PR is mergeable again. (Collapsed the input fetcher to a single fetchInputFiles using INPUT_TAG; test mock uses hash to match the schema / store lookup.)

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 --enable-assets golden mismatch (inherited from FE-729), not a regression.

DrJKL added a commit that referenced this pull request Jul 6, 2026
)

## 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>
@dante01yoon

Copy link
Copy Markdown
Collaborator Author

@github-actions github-actions Bot locked and limited conversation to collaborators Jul 23, 2026
@christian-byrne

christian-byrne commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Closed — retiring the FE-729→732 chain in favour of a fresh re-cut

Closing 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 isCloud / isAssetAPIEnabled teardown is still wanted. It is a decision to re-cut it fresh from main once the assets-sidebar stack lands, rather than rebase four branches whose premise has shifted underneath them.

Why re-cut rather than rebase. First, the premise was overtaken. The chain exists to delete Comfy.Assets.UseAssetAPI and the isCloud forks, but #13464 adds a sibling flag Comfy.ModelLibrary.UseAssetBrowser in the very block #12322 removes, plus new isCloud branches in modelStore.ts. A rebase would have to delete code that doesn't exist yet and re-open a design decision that just went the other way. Second, assetsStore.ts is a head-on collision: #12335 is +346/−395 in that file while #12948 is +416/−366 — two near-complete rewrites of the same file, with 13 files overlapping across the two stacks. Drift compounds it: #12322 is 246 commits behind main, #12417 is 320.

The blocker underneath all of it: BE-786 never landed. #12322 patches CI to start ComfyUI with --enable-assets because FE-729 routes modelStore through assetService, which 503s without it — and main's .github/actions/start-comfyui-server/action.yaml still does not pass that flag. So the chain was never merge-eligible regardless of conflicts, and the same dependency will block the re-cut. BE-786 (Core serving /api/assets by default, tracked in core as ComfyUI#14699) needs to land, or be explicitly scheduled, before the re-cut is scoped. Related context: the assets-panel rewire (FE-740 / #12464) faces the same gating fork, and the dialog-architecture work has its own track in #13558.

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants