Skip to content

Introduce AI-powered settings UI behind FF

Aleksei Lipniagov requested to merge 425047-duo-chat-ui-toggle into master

What does this MR do and why?

This MR is for Self-Managed instances only.
All changes are behind the FF, and will not affect 16.7.
FF and all the related branching will be removed in 16.8: cleanup issue.

It does two things:

  • It introduces the AI Beta Features checkbox (which will be used to enable Duo Chat): issue
  • It updates the design of "AI-powered" settings to build a foundation to implement "Code Suggestions -> GA" transition: issue
Q&A
  • Why do we need FF?
    • We don't want the change to be visible on 16.7 (all should appear on 16.8)
  • Why not wait for 16.8 to merge it?
    • 16.8 will be short because of the holidays, and we have a lot of ground to cover to deliver "CS -> GA" and Chat Duo in Beta. The main reason to release it now is that all future work will rely on the updated menu section, and having this in master, even behind FF, will greatly simplify the workflow and allow parallel workstreams.
  • Why does this MR covers two things instead of having 2 MRs?
    • The checkbox for enabling Duo Chat and the CS section is the same menu section, so there is a huge overlap. In the issue mentioned above, introducing the "AI beta" toggle assumes updating the design of the section, which is also needed for CS -> GA.
  • Why do I see a lot of duplication? (e.g., in helper)
    • For the reason above. I tried to make noninvasive changes to the current implementation and UX (16.7). So I duplicated the code instead of updating and refactoring the existing one. The goal is to separate the execution paths (with and without FF) as much as possible. This will reduce the risk of breaking something in 16.7. Also, some of the "Code Suggestions"-related helpers will be deleted in 16.8 (a few days after 16.7 will be released). So I tried to avoid unnecessary refactoring.
  • Where is the final design?
    • It was changing a lot 🙂 , and we may still update some labels and texts early 16.8 (as this is still behind FF in 16.7). The final version we agreed on is in the issue description, plus this edit from Katie (which simplifies things a bit and avoids some additional logic)

Note: We do not introduce "Service start date" logic (for more details, see the issues) in this MR - this will be done in a follow-up to reduce the scope.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2023-11-30_at_15.08.27 Screenshot_2023-11-30_at_15.07.51

How to set up and validate locally

  1. In rails c, enable the FF: Feature.enable(:updated_ai_powered_features_menu_for_sm).
  2. Visit http://localhost:3000/admin/application_settings/general and scroll down.
  3. Make sure you see the updated UI.
  4. Check that both checkboxes work (send the form, reload).
  5. Disable the FF and check that it is back to an old version.

MR acceptance checklist

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

Related to #425047

Edited by Aleksei Lipniagov

Merge request reports