Wire AI Governance dashboard summary metrics to aiGovernanceMetrics API

What does this MR do?

Wires the AI Governance dashboard summary tiles (AI agents, AI sessions) to the real aiGovernanceMetrics GraphQL API instead of mock data.

  • Starts using the API aiGovernanceMetrics(timeframe:)agents/sessions KPIs with count, previousCount, trend.
  • queries the metrics and maps each KPI to a tile: count → value, count − previousCount → signed delta and up/down/neutral direction, trend → sparkline series.
  • Degrades gracefully (neutral placeholder) while the field is not deployed or the ai_governance_dashboard flag is off, so the dashboard keeps rendering.

References

Before After
image.png image.png

Please note some of the enhancements are being done in a follow-up MR: Simplify AI Governance dashboard summary tiles ... (!248465 - merged)

How to test locally

  1. Set up GitLab Duo locally (SaaS mode + licensed group): Set up GitLab Duo.
  2. Enable the flag: Feature.enable(:ai_governance_dashboard)
  3. Visit Settings → GitLab Duo → Governance on the gitlab-duo group, open the Dashboard tab
Edited by Dheeraj Joshi

Merge request reports

Loading
Loading