Add GitLab Default Model Modal
What does this MR do and why?
This MR adds a confirmation modal that appears when a user selects the GitLab Default model option in the Model Selection interface. Selecting the default model has implications for customers who have compliance requirements. Users should confirm they understand this before the update is persisted.
Related issue: #555899 (closed)
Design: #546548[cm_com_2_options_4_dropdown_4_gitlabrec_2_modal.png]
What this MR does:
- Displays an information modal that pops up when a user selects the
GitLab Defaultmodel for any feature setting under Model Selection. The user must confirm the selection before the model is updated. - When a user checks the "Do not show again" checkbox, the modal will be suppressed and not shown again (uses
localStoragefor state).
References
Screenshots or screen recordings
Modal:
| Before | After |
|---|---|
| DefaultModelModalBefore | Screen_Recording_2025-08-25_at_1.34.11_pm |
How to set up and validate locally
Set-up
- An active online cloud or legacy, Ultimate license.
- Start GDK in saas mode
GITLAB_SIMULATE_SAAS=1 gdk start - Enable the model selection
ai_model_switchingfeature flag by visitinghttp://gdk.test:3000/rails/features/ - Run the Duo setup rake task
GITLAB_SIMULATE_SAAS=1 bundle exec 'rake gitlab:duo:setup'to seed DB with a Duo test group (it's calledgitlab-duo). - Visit the Model Selection page for the group i.e
http://gdk.test:3000/groups/test/-/settings/gitlab_duo/model_selection - By default, all feature settings will have the GitLab Default model pre-selected. Change the model on any feature to something else. Then change it back to the "GitLab Default" model where the modal will appear. Validate the modal appears every time the default model is selected, unless the "do not show again" checkbox is checked. To reset the "do not show again" behaviour, open dev tools, visit
Application > Storage > Local storage > http://gdk.test:3000/right-click and select "Clear".
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 #546548 (closed)
Edited by Julie Huang
