From 6e5dfc01099d109ba0454563a0943729ed73a1a5 Mon Sep 17 00:00:00 2001 From: Luke Mino-Altherr Date: Tue, 6 Jan 2026 15:56:38 -0800 Subject: [PATCH] feat: split asset_update_options_enabled into separate deletion and rename flags (#7864) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Replace single `asset_update_options_enabled` feature flag with two granular flags: - `asset_deletion_enabled`: controls delete button visibility - `asset_rename_enabled`: controls rename button visibility The context menu only shows when at least one flag is enabled. ## Changes - Updated `ServerFeatureFlag` enum with new flag names - Updated `RemoteConfig` type with new properties - Updated `AssetCard.vue` to conditionally show rename/delete buttons based on their respective flags ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7864-feat-split-asset_update_options_enabled-into-separate-deletion-and-rename-flags-2e06d73d365081f9ac0afa12b87bd988) by [Unito](https://www.unito.io) --------- Co-authored-by: Amp --- src/composables/useFeatureFlags.ts | 19 +++++++++++-------- src/platform/assets/components/AssetCard.vue | 10 +++++++++- src/platform/remoteConfig/types.ts | 3 ++- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/composables/useFeatureFlags.ts b/src/composables/useFeatureFlags.ts index 043721b98..3388140ad 100644 --- a/src/composables/useFeatureFlags.ts +++ b/src/composables/useFeatureFlags.ts @@ -11,7 +11,8 @@ export enum ServerFeatureFlag { MAX_UPLOAD_SIZE = 'max_upload_size', MANAGER_SUPPORTS_V4 = 'extension.manager.supports_v4', MODEL_UPLOAD_BUTTON_ENABLED = 'model_upload_button_enabled', - ASSET_UPDATE_OPTIONS_ENABLED = 'asset_update_options_enabled', + ASSET_DELETION_ENABLED = 'asset_deletion_enabled', + ASSET_RENAME_ENABLED = 'asset_rename_enabled', PRIVATE_MODELS_ENABLED = 'private_models_enabled', ONBOARDING_SURVEY_ENABLED = 'onboarding_survey_enabled', HUGGINGFACE_MODEL_IMPORT_ENABLED = 'huggingface_model_import_enabled', @@ -42,14 +43,16 @@ export function useFeatureFlags() { ) ) }, - get assetUpdateOptionsEnabled() { - // Check remote config first (from /api/features), fall back to websocket feature flags + get assetDeletionEnabled() { return ( - remoteConfig.value.asset_update_options_enabled ?? - api.getServerFeature( - ServerFeatureFlag.ASSET_UPDATE_OPTIONS_ENABLED, - false - ) + remoteConfig.value.asset_deletion_enabled ?? + api.getServerFeature(ServerFeatureFlag.ASSET_DELETION_ENABLED, false) + ) + }, + get assetRenameEnabled() { + return ( + remoteConfig.value.asset_rename_enabled ?? + api.getServerFeature(ServerFeatureFlag.ASSET_RENAME_ENABLED, false) ) }, get privateModelsEnabled() { diff --git a/src/platform/assets/components/AssetCard.vue b/src/platform/assets/components/AssetCard.vue index e0be22582..a24610022 100644 --- a/src/platform/assets/components/AssetCard.vue +++ b/src/platform/assets/components/AssetCard.vue @@ -33,7 +33,7 @@