Create new route for Code Suggestions page in Admin Area
What does this MR do and why?
Context: https://gitlab.com/gitlab-org/gitlab/-/issues/432411.
This MR creates a Code Suggestions page in the Admin Area for Self-Managed instances, where the Code Suggestions UI would be added later (https://gitlab.com/gitlab-org/gitlab/-/issues/432440).
- Add the
/admin/code_suggestionsroute - Add a "Code Suggestions" entry in the sidebar for SM instances to access the page
Changes are behind the self_managed_code_suggestions feature flag.
Screenshots or screen recordings
Self-managed instance with the self_managed_code_suggestions feature flag enabled
| Case | Before | After |
|---|---|---|
Admin route (/admin/code_suggestions) |
![]() |
![]() |
| Sidebar entry | ![]() |
![]() |
SaaS instance, or the self_managed_code_suggestions feature flag is disabled
| Case | Before | After |
|---|---|---|
Admin route (/admin/code_suggestions) |
![]() |
No change |
| Sidebar entry | ![]() |
No change |
How to set up and validate locally
- Start GDK in SaaS / SM instance mode by setting the
GITLAB_SIMULATE_SAASenvironment variable to1/0, respectively. (One way to do it is to addexport GITLAB_SIMULATE_SAAS=0toenv.runitin your GDK root folder, for SM mode.) - Start GDK.
- Set the
self_managed_code_suggestionsfeature flag totrue/falseas needed. (You can do this by going into the Rails console usingbundle exec rails console, then runningFeature.enable(:self_managed_code_suggestions)orFeature.disable(:self_managed_code_suggestions), then exiting the console for the change to take effect.) - Test that the
/admin/code_suggestionspath is available only for SM instances with the feature flag enabled. - Test that the "Code Suggestions" sidebar nav menu is available only for SM instances with the feature flag enabled.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Mohamed Moustafa



