Loading
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-rowingitlab_duo_settings.vue, gated onduoAutoModeAvailable+showAllSettings, writingproject[project_setting_attributes][duo_auto_mode_enabled]. - Wires
duoAutoModeAvailable/initialDuoAutoModeEnabled/duoAutoModeLocked+duo_auto_mode_cascading_settingsthroughprojects_helperandee/projects_helper, with cascading-lock parity (icon + disabled state) to the siblingtool_approval_for_sessiontoggle. - Specs:
projects_helper_spec.rb(flag gating, initial value, ancestor lock) andgitlab_duo_settings_spec.js(render/disable matrix, cascading lock, hidden-input toggle).
How to set up and validate locally
- Enable the feature flag in the Rails console:
Feature.enable(:duo_auto_mode). - Make sure GitLab Duo is available for the group and project under test (Ultimate with a Duo add-on).
- Go to Project > Settings > GitLab Duo and confirm the Auto mode toggle renders.
- Turn it on, click Save changes, reload, and confirm it persists (
project.project_setting.duo_auto_mode_enabledistrue). - 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). - 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