Skip to content

Add team level support for expert features#7331

Open
cstns wants to merge 9 commits into
inconsistend-backend-gating-of-snapshot-description-endpointfrom
team-level-support-for-expert-features
Open

Add team level support for expert features#7331
cstns wants to merge 9 commits into
inconsistend-backend-gating-of-snapshot-description-endpointfrom
team-level-support-for-expert-features

Conversation

@cstns
Copy link
Copy Markdown
Contributor

@cstns cstns commented May 25, 2026

Important

This PR is part of a nested merge list. Do not merge until its target branch is main.

Description

expertAssistant and expertInsights were previously platform-only features with no team-level granularity. All teams either had expert features or none did. Both flags now support team-level opt-out, defaulting to enabled.

Backend:

  • forge/lib/features.js: added expertAssistant and expertInsights to the feature list and names so they appear as checkboxes in the admin TeamType editor
  • forge/ee/lib/index.js: changed expertInsights from a private to a public flag so the frontend can check it via FEATURE_CONFIGS
  • forge/ee/routes/expert/index.js: added ai and expertAssistant team feature checks in the shared preHandler (applies to both /chat and /mcp/features), added expertInsights team feature check specifically for the /mcp/features endpoint

Frontend:

  • frontend/src/composables/FeatureChecks.ts: changed expertAssistant from platform-only to platform+team with optOut: true and added dependsOnTeam: 'ai'. Added expertInsights entry with the same pattern.
  • frontend/src/components/expert/Expert.vue and frontend/src/components/drawers/expert/ExpertDrawer.vue: changed from reading features.expertInsights directly to using featuresCheck.isExpertInsightsFeatureEnabled which respects both platform and team level checks
  • frontend/src/pages/admin/TeamTypes/dialogs/TeamTypeEditDialog.vue: added defaults for expertAssistant and expertInsights (both default to true, opt-out)

Related Issue(s)

closes #7315

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 self-assigned this May 25, 2026
@cstns cstns linked an issue May 25, 2026 that may be closed by this pull request
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.61%. Comparing base (1fb733c) to head (796ff4e).

Files with missing lines Patch % Lines
forge/ee/routes/expert/index.js 75.00% 3 Missing ⚠️
forge/comms/aclManager.js 87.50% 1 Missing ⚠️
Additional details and impacted files
@@                                      Coverage Diff                                      @@
##           inconsistend-backend-gating-of-snapshot-description-endpoint    #7331   +/-   ##
=============================================================================================
  Coverage                                                         76.61%   76.61%           
=============================================================================================
  Files                                                               405      405           
  Lines                                                             20638    20658   +20     
  Branches                                                           5006     5017   +11     
=============================================================================================
+ Hits                                                              15811    15827   +16     
- Misses                                                             4827     4831    +4     
Flag Coverage Δ
backend 76.61% <80.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.

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 6: Add team-level support for expert features

1 participant