From 8120ed9dfa4f4fef91da632d35ce304bfc9f722c Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 23 Oct 2025 13:43:34 -0700 Subject: [PATCH] load assets browser before fetch completes and show loading state (#6189) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Moves the fetch and post-fetch logic associated with the asset browser into the component and shows a loading state while fetching. To test, use this branch: https://github.com/comfyanonymous/ComfyUI/pull/10045 https://github.com/user-attachments/assets/718974d5-efc7-46a0-bcd6-e82596d4c389 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6189-load-assets-browser-before-fetch-completes-and-show-loading-state-2946d73d365081879d1bd05d86e8c036) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action --- .../assets/components/AssetBrowserModal.vue | 73 ++++- src/platform/assets/components/AssetGrid.vue | 4 +- .../assets/composables/useAssetBrowser.ts | 19 +- .../composables/useAssetBrowserDialog.ts | 46 +--- src/platform/assets/schemas/assetSchema.ts | 4 +- src/platform/assets/utils/categoryLabel.ts | 16 ++ .../components/AssetBrowserModal.test.ts | 253 ++++++++++-------- .../composables/useAssetBrowser.test.ts | 40 +-- .../composables/useAssetBrowserDialog.test.ts | 98 +------ 9 files changed, 271 insertions(+), 282 deletions(-) create mode 100644 src/platform/assets/utils/categoryLabel.ts diff --git a/src/platform/assets/components/AssetBrowserModal.vue b/src/platform/assets/components/AssetBrowserModal.vue index d0fe01a72..dccd36208 100644 --- a/src/platform/assets/components/AssetBrowserModal.vue +++ b/src/platform/assets/components/AssetBrowserModal.vue @@ -40,6 +40,7 @@ @@ -47,7 +48,9 @@