Skip to content

Add Code Suggestions setting to user profile

What does this MR do and why?

Adds a user-level setting for enabling/disabling code suggestions.

If any of the top-level groups that the user belongs to have disabled code suggestions, it is disabled for the user.

If all of the top-level groups that the user belongs to have enabled code suggestions, the user can opt out of code suggestions via the user-level setting.

Fixes #411936 (closed)

Screenshots or screen recordings

User profile setting:

personal_setting_code_suggestions

Group setting:

group_setting_code_suggestions

How to set up and validate locally

  1. Simulate SaaS: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/gitpod.md#L217
  2. Enable feature flags ai_assist_ui and ai_assist_flag
  3. Log in as any user who does not belong to any groups
  4. Visit https://gdk.test:3443/-/profile/preferences
  5. Scroll to bottom of page and see "Code Suggestions" preference

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jessie Young

Merge request reports

Loading