From 09c888e33835b48236b9363ef1ae906756a8c72e Mon Sep 17 00:00:00 2001 From: Jin Yi Date: Sun, 23 Nov 2025 15:57:36 +0700 Subject: [PATCH] Fix: Selected assets count not updating in Imported tab (#6842) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Fix bug where the "Selected assets count" displayed as 0 in the Imported tab when selecting assets ## Root Cause The `getOutputCount` function was returning `0` when `user_metadata.outputCount` was not present. - **Generated tab**: Works correctly because `outputCount` metadata is set during generation - **Imported tab**: `outputCount` metadata is never set, so it always returns `0` → selected count shows as 0 ## Solution Changed the default return value from `0` to `1` when `outputCount` metadata is not present, ensuring every asset counts as at least 1. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- src/components/sidebar/tabs/AssetsSidebarTab.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/sidebar/tabs/AssetsSidebarTab.vue b/src/components/sidebar/tabs/AssetsSidebarTab.vue index c494498759..053cc40659 100644 --- a/src/components/sidebar/tabs/AssetsSidebarTab.vue +++ b/src/components/sidebar/tabs/AssetsSidebarTab.vue @@ -214,7 +214,7 @@ const shouldShowDeleteButton = computed(() => { const getOutputCount = (item: AssetItem): number => { const count = item.user_metadata?.outputCount - return typeof count === 'number' && count > 0 ? count : 0 + return typeof count === 'number' && count > 0 ? count : 1 } const shouldShowOutputCount = (item: AssetItem): boolean => {