Skip to content

Add tooltip with raw counts to AI usage rate values in AI Impact table

What does this MR do and why?

Updates the AI impact GraphQL query to use the codeContributorsCount and codeSuggestionsContributorsCount fields to calculate the code suggestions usage rate and to display as a fraction in tooltips that appear upon hovering over the values in the table.

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
Screen Recording 2024-05-03 at 5.10.41 PM.mov Screen Recording 2024-05-03 at 5.12.09 PM.mov

How to set up and validate locally

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

Feature Flags

# enables the UI table
Feature.enable(:ai_impact_analytics_dashboard) 

# enable clickhouse
Feature.enable(:clickhouse_data_collection)
Feature.enable(:event_sync_worker_for_click_house)

# enable the worker to sync code suggestions events to clickhouse
Feature.enable(:code_suggestion_events_in_click_house)

Validation Steps

  1. Please make sure you have a GitLab Ultimate license.
  2. Ensure you have Clickhouse configured
  3. Enable the feature flags above.
  4. Seed data for the table: FILTER=ai_usage_stats bundle exec rake db:seed_fu
  5. Visit the groups analytics dashboard page: (ex. http://gdk.test:3000/groups/flightjs/-/analytics/dashboards)
  6. Click the AI impact dashboard, hover over the values in the Code suggestions usage row and verify that the tooltips appear
  7. Visit the projects analytics dashboard page: (ex. http://gdk.test:3000/flightjs/Flight/-/analytics/dashboards)
  8. Repeat step 6

Related to #456070 (closed)

Edited by Rudy Crespo

Merge request reports