Refactor Sorting Logic on AI Feature Settings Table Rows

What does this MR do and why?

Refactors sorting logic on AI Feature Settings table rows. This turns sort logic into a reusable method and also ensures all table rows are sorted, not just the "Other Duo features" section. Also addresses the follow up in this discussion to add tests.

References

GitLab Duo Self-Hosted

Screenshots or screen recordings

Before & After — No visual changes
Screenshot_2025-04-10_at_10.48.51_am

How to set up and validate locally

Pre-requisites

  • You will need an active Ultimate online cloud license.
  • Make sure you are set up with a Duo Enterprise subscription by running the following command in the terminal:

GITLAB_SIMULATE_SAAS=0 bundle exec 'rake gitlab:duo:setup[duo_enterprise]'

  1. Start GDK in self-managed mode (GITLAB_SIMULATE_SAAS=0 gdk start)
  2. Navigate to http://gdk.test:3000/rails/features/ and enable the ai_duo_chat_sub_features_settings feature flag
  3. Visit Admin Area > GitLab Duo Self-Hosted
  4. Navigate to the "AI-powered features" tab

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 #535650 (closed)

Edited by Julie Huang

Merge request reports

Loading