Open agent sessions from Agents by provider in the side panel

What does this MR do and why?

Renames the Which AI agents developers are using dashboard card to Agents by provider. Behind the ai_governance_dashboard_side_panels flag, selecting a slice or a legend entry opens the side panel with Audit events filtered to that slice.

It uses the side panel from !269500 (merged).

Changes:

  • Rename, not behind a flag: the card title, the Storybook titles, the two session_distribution metric descriptions, the docs, and locale/gitlab.pot. The component, file, test IDs, and tracking labels keep their names, so the existing metrics keep counting.
  • donut_chart.vue: a new clickableSlices prop, false by default. When it is set, each legend entry is a native button and clicking a slice or a legend entry emits slice-click with { name, label, value }. The folded Other slice and the empty state never emit. The Tool calls by action card does not set the prop, so it renders as before.
  • session_distribution_card.vue: passes clickableSlices only when openGovernancePanel is provided, which happens only with the flag on. A click tracks click_card_link_on_ai_governance_dashboard with label session_distribution and property slice, then opens the panel with the slice label as its title.
  • click_card_link_on_ai_governance_dashboard.yml: the descriptions now list the new slice property value. The existing session_distribution metrics filter on the label only, so they count slice clicks too.

The filters depend on the Show control (agentClass). They use the raw slice name, such as claude-code, not the display label:

Show (agentClass) Slice name Audit events filters
ALL gitlab_duo { agentClass: INTERNAL_DAP }
ALL Any other, including unknown { agentClass: EXTERNAL, agentType: name }
EXTERNAL Any, including unknown { agentClass: EXTERNAL, agentType: name }
INTERNAL_DAP Any, including unknown { agentClass: INTERNAL_DAP, flowType: name }

Every row also gets startTimeAfter from the date range, through auditEventsFilters.

Not in this MR

These are known gaps. All of them are behind the default-off flag:

References

Screenshots or screen recordings

Screenshot_2026-11-12_at_9.16.32_AM

How to set up and validate locally

  1. In the Rails console, enable the feature flag:

    Feature.enable(:ai_governance_dashboard_side_panels)
  2. Open a group's AI > Governance page and select the Dashboard tab.

  3. Check that the card is titled Agents by provider.

  4. With Show set to All agents, select the GitLab Duo slice. Check that the side panel title is GitLab Duo and that Audit events is filtered to the agent class and the date range.

  5. Select a connected agent in the legend, such as Claude Code. Check the panel title and filters.

  6. Switch Show to DAP and then to Connected, and repeat with a slice and a legend entry.

  7. Press Tab to reach a legend entry and press Enter. Check that the panel opens.

  8. If the chart has an Other slice, check that it does not open the panel.

  9. Disable the flag with Feature.disable(:ai_governance_dashboard_side_panels) and reload. Check that only the title changed and that nothing on the card opens the panel.

MR acceptance checklist

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

Edited by Duo Developer

Merge request reports

Loading
Loading