Add duo_auto_mode toggle to project-level Duo settings

Adds the Auto mode toggle to project-level Settings > GitLab Duo, completing the project scope for duo_auto_mode alongside the group and admin surfaces.

  • New project-setting-row in gitlab_duo_settings.vue, gated on duoAutoModeAvailable + showAllSettings, writing project[project_setting_attributes][duo_auto_mode_enabled].
  • Wires duoAutoModeAvailable / initialDuoAutoModeEnabled / duoAutoModeLocked + duo_auto_mode_cascading_settings through projects_helper and ee/projects_helper, with cascading-lock parity (icon + disabled state) to the sibling tool_approval_for_session toggle.
  • Specs: projects_helper_spec.rb (flag gating, initial value, ancestor lock) and gitlab_duo_settings_spec.js (render/disable matrix, cascading lock, hidden-input toggle).

How to set up and validate locally

  1. Enable the feature flag in the Rails console: Feature.enable(:duo_auto_mode).
  2. Make sure GitLab Duo is available for the group and project under test (Ultimate with a Duo add-on).
  3. Go to Project > Settings > GitLab Duo and confirm the Auto mode toggle renders.
  4. Turn it on, click Save changes, reload, and confirm it persists (project.project_setting.duo_auto_mode_enabled is true).
  5. Cascading lock: in the parent group's Settings > GitLab Duo, enable and lock Auto mode, then reload the project page and confirm the project toggle is disabled and shows the cascading-lock icon (same behavior as tool_approval_for_session).
  6. Run Feature.disable(:duo_auto_mode) and confirm the toggle no longer renders.

Screen recording

Flag-gated behind duo_auto_mode (off by default). Epic [Auto Mode] Iteration 0: Client-side enabled au... (&23199 - closed)

Closes Add project-level Settings UI toggle for Duo au... (#630007 - closed)

Edited by Dylan Bernardi

Merge request reports

Loading
Loading