Skip to content

Add informational tooltips to AI Impact Analytics overview tiles

Rudy Crespo requested to merge 477213-ai-impact-tiles-add-info-icon into master

What does this MR do and why?

Adds informational tooltips with raw values to AI Impact Analytics overview tiles.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

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

Before After

Duo seats: Assigned and used 

Screenshot 2024-08-26 at 5.31.56 PM.png

Screenshot 2024-08-28 at 1.09.33 PM.png

Code Suggestions: Unique users

Screenshot 2024-08-26 at 5.29.53 PM.png

Screenshot 2024-08-28 at 1.07.11 PM.png

Code Suggestions: Acceptance rate

Screenshot 2024-08-26 at 5.30.01 PM.png

Screenshot 2024-08-28 at 1.07.21 PM.png

No data

Screenshot 2024-08-26 at 5.29.45 PM.png

Screenshot 2024-08-28 at 1.06.56 PM.png

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Ensure that you are using GitLab Ultimate
  2. Configure your GDK to use ClickHouse
  3. Enable the Clickhouse application setting for analytics
  4. Seed AI analytics data: FILTER=ai_usage_stats bundle exec rake db:seed_fu and apply the diff below to mock data for the Duo seats: Assigned and used tile
  5. Create a new group
  6. Navigate to the Analytics dashboard page for the new group (ex. http://gdk.test:3000/groups/flightjs/-/analytics/dashboards)
  7. Select the AI impact analytics dashboard
  8. Verify that the tooltips appear in the single stat overview tiles atop the dashboard

Mock data for Duo seats: Assigned and used

The seeded analytics data does not mock the number of Duo Pro seats included in your subscription. The metric will show as 0% if this number is 0. It can be mocked by applying the diff below:

diff --git a/ee/app/services/analytics/ai_analytics/ai_metrics_service.rb b/ee/app/services/analytics/ai_analytics/ai_metrics_service.rb
index e08932914ce2..361191fb541a 100644
--- a/ee/app/services/analytics/ai_analytics/ai_metrics_service.rb
+++ b/ee/app/services/analytics/ai_analytics/ai_metrics_service.rb
@@ -31,7 +31,7 @@ def add_duo_pro_assigned(data)
         users = GitlabSubscriptions::AddOnAssignedUsersFinder.new(
           current_user, namespace, add_on_name: :code_suggestions).execute
 
-        data.merge(duo_pro_assigned_users_count: users.count)
+        data.merge(duo_pro_assigned_users_count: 100)
       end
 
       def add_code_suggestions_usage(data)

Related to #477213 (closed)

Edited by Rudy Crespo

Merge request reports