Add team-level toggle for enabling/disabling AI features#7332
Open
cstns wants to merge 2 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## team-level-support-for-expert-features #7332 +/- ##
==========================================================================
- Coverage 76.61% 76.57% -0.04%
==========================================================================
Files 405 405
Lines 20658 20670 +12
Branches 5017 5022 +5
==========================================================================
+ Hits 15827 15828 +1
- Misses 4831 4842 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This PR is part of a nested merge list. Do not merge until its target branch is main.
Description
Team owners can now enable or disable AI features for their team independently of platform and team type settings. This adds the third level of the AI feature flag hierarchy, allowing team owners to opt out even when their team type has AI enabled.
Backend (
forge/routes/api/team.js):featuresbody parameter to the PUT team endpoint{ features: { ai: true/false } }aiis in the allowed features whitelist, preventing team owners from toggling other featuresteam.properties.features.ai, which is already respected byTeam.getFeatureProperty()(team-level overrides take precedence over team type)Frontend (
frontend/src/pages/team/Settings/Danger.vue):isAiFeatureEnabledForPlatform)Dialog.show()service with contextual messaging for enable/disable actionsFrontend (
frontend/src/ui-components/components/form/ToggleSwitch.vue):changeevent emission after toggling in sync modeFrontend (
frontend/src/stores/account.js):setTeamnow updatescontextStore.teameven when the team ID matches, ensuring team type features are currentFeature flag hierarchy (all three levels must be enabled):
Related Issue(s)
closes #7316
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel