Scope AI Governance dashboard filters to DAP for the limited beta

What and why

The AI Governance dashboard ships as a limited beta in 19.4, scoped to DAP agents only. This MR makes the filter row match that scope, and makes the two ranked-list cards actually respect the filter.

Changes

Filter row:

  • Agent-class control renders only DAP when the new flag is off, and sends agentClass: INTERNAL_DAP.
  • New Date range control (GlSegmentedControl) with a single Last 7 days option. The window was previously a hardcoded constant with no UI.

Correctness fix:

  • Developer activity and Project exposure now send agentClass. They previously ignored it and always showed all-agent data, contradicting the selected filter. The backend already supported it (aiGovernanceMetrics(agentClass:), applied via for_agent_class on the Postgres path and agent_class_filter on the ClickHouse path). The frontend simply was not sending the argument.
  • Without this, a DAP-only dashboard would show DAP tiles next to all-agent ranked lists.

Supporting:

  • Shared AGENT_CLASS_* constants moved to ee/app/assets/javascripts/ai/governance/constants.js, and locale/gitlab.pot regenerated for two new strings.
  • agentClass is a computed with a getter and setter rather than plain data, because Vue 2 runs data() before computed properties, so glFeatures is not readable there.

Screenshots

Before After (19.4 default, DAP only) After (19.5, when all FF are enabled)
before-master.png after-dap-only.png after-all-flags.png

Feature flags

Flag Type Default in 19.4 Plan
ai_governance_dashboard beta Enabled The beta release itself, graduated in !254074
ai_governance_connected_agents_filter wip Off Enabled by default in 19.5, when All agents and Connected return alongside connected agents

19.4 is DAP only. The wider filter stays dark until 19.5.

Not in scope

  • Audit logs card segmentation, needs agentClass on duoWorkflowSessionArtifacts, see !251518.
  • Connected agents in the inventory card, 19.5, backend landed in !253516 (merged).
  • MCP server activity and agent tool calls cards, behind their own flags, not in the beta.

Tests

ee/spec/frontend/ai/governance/components/dashboard green, 80 examples.

How to validate locally

Feature.enable(:gitlab_duo_governance_settings)
Feature.enable(:ai_governance_dashboard)
  1. Open the group's GitLab Duo governance settings page on the dashboard tab.
  2. Confirm the row shows Show [DAP] and Date range [Last 7 days], and that Developer activity and Project exposure populate.
  3. Run Feature.enable(:ai_governance_connected_agents_filter), reload, and confirm the control gains All agents and Connected.

References

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Edited by Dheeraj Joshi

Merge request reports

Loading
Loading