Add foundational agents availability to admin and group Duo settings

What does this MR do and why?

This MR adds the foundational agents availability settings, which controls access to AI chat agents in GitLab, to the admin (instance) and group-level GitLab Duo settings. For 18.6, this is solely an on/off setting. This setting is hidden behind a WIP feature flag duo_foundational_agents_availability while the code changes are in flight.

Note that this change relies on a backend MR that is currently in review: Backend changes for instance and group settings... (!212111 - merged), but they can be merged independently. To properly test the frontend changes, use the combined branch - !212214 (closed)

References

[Foundational Agents] On/off setting - UI to up... (#579739 - closed)

Screenshots or screen recordings

Group settings Admin settings
group.mov admin.mov

How to set up and validate locally

Prerequisites:

  • Pull this branch and run migrations: bin/rails db:migrate
  • duo_foundational_agents_availability feature flag: /rails/features/duo_foundational_agents_availability

Steps:

Group

Instance/admin

  • Run GDK on SASS mode: GITLAB_SIMULATE_SAAS=1 gdk start

  • Run the following setup script to set up a group with GitLab Duo configured:

    GITLAB_SIMULATE_SAAS=1 bundle exec 'rake gitlab:duo:setup'

  • Go to group-level Duo settings: /groups/gitlab-duo/-/settings/gitlab_duo

  • Run GDK on non-SASS mode: GITLAB_SIMULATE_SAAS=0 gdk start

  • Run the following setup script to set up a group with GitLab Duo configured:

    GITLAB_SIMULATE_SAAS=0 bundle exec 'rake gitlab:duo:setup'

  • Go to admin Duo settings: /admin/gitlab_duo/configuration

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #579739 (closed)

Edited by Eduardo Bonet

Merge request reports

Loading