From c5dd38f08933b9b58b4a7f20ba30a105971ace4f Mon Sep 17 00:00:00 2001 From: dante01yoon Date: Fri, 15 May 2026 18:04:19 +0900 Subject: [PATCH 01/33] refactor(assets): extract getAssetStoredFilename helper, add mockFeatureFlags test util L1 prerequisite cleanup. Two type-preserving refactors that make subsequent L1 sub-issues mechanical. 1. Extract getAssetStoredFilename(asset) helper to collapse the duplicated `isCloud && asset.asset_hash ? asset.asset_hash : asset.name` branch from useMediaAssetActions (lines 302, 446) into a single helper. Once BE-933/934 emit file_path and the cloud spec sync brings it into generated types, only the helper changes. 2. Add mockFeatureFlags(overrides) test utility under src/test-utils/. L1 sub-issues will use this consistently instead of re-inventing the mock shape each time. Includes a FeatureFlags type export from useFeatureFlags.ts so the mock stays in sync. Also auto-fixed unrelated tailwind class-order lint errors in four files (VirtualGrid, RightSidePanel, Textarea, ModelInfoPanel) to keep CI green. No behavior change. --- src/components/common/VirtualGrid.vue | 2 +- .../rightSidePanel/RightSidePanel.vue | 2 +- src/components/ui/textarea/Textarea.vue | 2 +- src/composables/useFeatureFlags.ts | 6 +++ .../components/modelInfo/ModelInfoPanel.vue | 2 +- .../composables/useMediaAssetActions.ts | 17 +++---- .../assets/utils/assetMetadataUtils.test.ts | 35 +++++++++++++- .../assets/utils/assetMetadataUtils.ts | 19 ++++++++ src/test-utils/mockFeatureFlags.ts | 48 +++++++++++++++++++ 9 files changed, 117 insertions(+), 16 deletions(-) create mode 100644 src/test-utils/mockFeatureFlags.ts diff --git a/src/components/common/VirtualGrid.vue b/src/components/common/VirtualGrid.vue index 97e568af07c..a3858e2110f 100644 --- a/src/components/common/VirtualGrid.vue +++ b/src/components/common/VirtualGrid.vue @@ -1,7 +1,7 @@