From f1d17475822559642f952b2336ee958898fedee8 Mon Sep 17 00:00:00 2001 From: Alexander Brown Date: Wed, 21 Jan 2026 16:32:30 -0800 Subject: [PATCH] feat: add session download tracking to assetDownloadStore (#8213) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Add session download tracking to track which assets were downloaded during the current session. This enables UI features like: - Badge count on "Imported" nav showing newly downloaded assets - Visual indicator on asset cards for recently downloaded items ## Changes - Add `acknowledged` flag to `AssetDownload` interface - Add `unacknowledgedDownloads` computed for filtering - Add `sessionDownloadCount` computed for badge display - Add `isDownloadedThisSession(identifier)` to check individual assets - Add `acknowledgeDownload(identifier)` to mark assets as seen ## Testing - 6 new unit tests covering all session tracking functionality - Run: `pnpm test:unit -- src/stores/assetDownloadStore.test.ts` ## Related - Part of Asset Browser improvements (#8090) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8213-feat-add-session-download-tracking-to-assetDownloadStore-2ef6d73d365081538045e8544d26bafa) by [Unito](https://www.unito.io) --------- Co-authored-by: Amp --- src/locales/en/main.json | 6 + .../assets/components/AssetBrowserModal.vue | 9 +- .../composables/useAssetBrowser.test.ts | 158 ++++++++++-------- .../assets/composables/useAssetBrowser.ts | 83 +++++++-- src/stores/assetDownloadStore.test.ts | 76 +++++++++ src/stores/assetDownloadStore.ts | 26 ++- 6 files changed, 272 insertions(+), 86 deletions(-) diff --git a/src/locales/en/main.json b/src/locales/en/main.json index 749273d20..75afcfd07 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -2315,6 +2315,12 @@ "assetBrowser": { "allCategory": "All {category}", "allModels": "All Models", + "byType": "By type", + "emptyImported": { + "canImport": "No imported models yet. Click \"Import Model\" to add your own.", + "restricted": "Personal models are only available at Creator tier and above." + }, + "imported": "Imported", "assetCollection": "Asset collection", "assets": "Assets", "baseModels": "Base models", diff --git a/src/platform/assets/components/AssetBrowserModal.vue b/src/platform/assets/components/AssetBrowserModal.vue index b7db7494c..8344a807f 100644 --- a/src/platform/assets/components/AssetBrowserModal.vue +++ b/src/platform/assets/components/AssetBrowserModal.vue @@ -7,12 +7,12 @@ >