From cd10bc18dc0f6db6308528ea6c0e965b65c73e6f Mon Sep 17 00:00:00 2001 From: Simula_r <18093452+simula-r@users.noreply.github.com> Date: Tue, 20 Jan 2026 19:19:48 -0800 Subject: [PATCH] [backport core/1.37] feat: add isCloud guard to team workspaces feature flag (#8201) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport of #8192 to core/1.37 - Ensures the team_workspaces_enabled feature flag only returns true when running in cloud environment - Prevents the feature from activating in local/desktop installations - Added team_workspaces_enabled type to RemoteConfig (required dependency for the feature) - **src/composables/useFeatureFlags.ts**: Added TEAM_WORKSPACES_ENABLED enum and teamWorkspacesEnabled getter with isCloud guard - **src/platform/assets/components/MediaAssetFilterBar.vue**: Accepted PR version with wrapper div and shorthand prop syntax - **src/platform/remoteConfig/types.ts**: Added team_workspaces_enabled type (required for TypeScript compilation) - Verify feature flag returns false when not in cloud environment - Verify feature flag works correctly in cloud environment ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8201-backport-core-1-37-feat-add-isCloud-guard-to-team-workspaces-feature-flag-2ef6d73d36508108be9acdeaf01b2da8) by [Unito](https://www.unito.io) Co-authored-by: Claude Opus 4.5 --- src/composables/useFeatureFlags.ts | 3 + .../assets/components/MediaAssetFilterBar.vue | 62 ++++++++++--------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/src/composables/useFeatureFlags.ts b/src/composables/useFeatureFlags.ts index 136b7ccd1fa..ca54bb9c6f6 100644 --- a/src/composables/useFeatureFlags.ts +++ b/src/composables/useFeatureFlags.ts @@ -1,5 +1,6 @@ import { computed, reactive, readonly } from 'vue' +import { isCloud } from '@/platform/distribution/types' import { remoteConfig } from '@/platform/remoteConfig/remoteConfig' import { api } from '@/scripts/api' @@ -95,6 +96,8 @@ export function useFeatureFlags() { ) }, get teamWorkspacesEnabled() { + if (!isCloud) return false + return ( remoteConfig.value.team_workspaces_enabled ?? api.getServerFeature(ServerFeatureFlag.TEAM_WORKSPACES_ENABLED, false) diff --git a/src/platform/assets/components/MediaAssetFilterBar.vue b/src/platform/assets/components/MediaAssetFilterBar.vue index 6a0fcdb9394..a933bda84e1 100644 --- a/src/platform/assets/components/MediaAssetFilterBar.vue +++ b/src/platform/assets/components/MediaAssetFilterBar.vue @@ -5,36 +5,38 @@ :placeholder="$t('sideToolbar.searchAssets') + '...'" @update:model-value="handleSearchChange" /> - - - - - - - +
+ + + + + + + +