Skip to content

Introduce generic ai platform and team type feature flag#7317

Open
cstns wants to merge 8 commits into
mainfrom
generic-ai-platform-and-team-level-feature-flag
Open

Introduce generic ai platform and team type feature flag#7317
cstns wants to merge 8 commits into
mainfrom
generic-ai-platform-and-team-level-feature-flag

Conversation

@cstns
Copy link
Copy Markdown
Contributor

@cstns cstns commented May 20, 2026

Description

Introduces a new ai feature flag at both platform and team type level as the foundation for a global AI opt-out mechanism.

This flag is not hooked up to any existing AI features yet. It is registered and available but does not currently gate anything. Subsequent tasks will wire generatedSnapshotDescription, assistantInlineCompletions, expertAssistant, and expertInsights to depend on this flag.

Changes:

  • Added ai.enabled config template to etc/flowforge.yml
  • Added ai to the feature list and feature names in forge/lib/features.js
  • Registered the ai platform feature flag in forge/ee/lib/index.js (config-driven, defaults to true)
  • Added isAiFeatureEnabled to frontend FEATURE_CONFIGS with both platformKey and teamKey

The flag is opt-in at the team type level and will automatically appear in the admin TeamType editor.

Related Issue(s)

closes #7310

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@cstns cstns requested a review from hardillb May 20, 2026 15:11
@cstns cstns self-assigned this May 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.59%. Comparing base (749f04a) to head (c1df27a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7317   +/-   ##
=======================================
  Coverage   76.59%   76.59%           
=======================================
  Files         405      405           
  Lines       20613    20614    +1     
  Branches     4991     4992    +1     
=======================================
+ Hits        15788    15789    +1     
  Misses       4825     4825           
Flag Coverage Δ
backend 76.59% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hardillb
Copy link
Copy Markdown
Contributor

A few things

  • Needs doc update to go with this
  • Will need helm chart update to expose this
  • Will probably need update to docker-compose default config
  • If this is false by default then it will break users that just upgrade, as they won't read the doc and remember to set this first

Copy link
Copy Markdown
Contributor

@hardillb hardillb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need answers to comment above

@cstns
Copy link
Copy Markdown
Contributor Author

cstns commented May 21, 2026

I'll create a task and update the docs shortly. I already created a change request for our platforms, i'm not sure that includes the docker-compose default config though (see https://github.com/FlowFuse/CloudProject/issues/1349).

That's a good point on defaulting to false, the rule is users should opt out by request. I'll update the pr so it'll default to true if not configured.

@hardillb
Copy link
Copy Markdown
Contributor

I already created a change request for our platforms, i'm not sure that includes the docker-compose default config though (see https://github.com/FlowFuse/CloudProject/issues/1349).

Helm chart update needs to be done before CloudProject work can be done

@cstns
Copy link
Copy Markdown
Contributor Author

cstns commented May 21, 2026

Is that done through a separate cloud infrastructure task? I forget

@hardillb
Copy link
Copy Markdown
Contributor

It need to be done here:

https://github.com/FlowFuse/helm/

So it's available to all (not just FFC)

@cstns
Copy link
Copy Markdown
Contributor Author

cstns commented May 21, 2026

Ok, raising an issue shortly

@cstns
Copy link
Copy Markdown
Contributor Author

cstns commented May 21, 2026

done, all tasks were raised and linked to the parent issue

@cstns cstns requested a review from hardillb May 21, 2026 11:16
@hardillb
Copy link
Copy Markdown
Contributor

@cstns is this ready for review again?

@cstns
Copy link
Copy Markdown
Contributor Author

cstns commented May 26, 2026

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task 1: Introduce generic ai platform and team level feature flag

2 participants