Add session badge to issue board cards

What does this MR do and why?

Adds a session badge to issue board cards that shows how many Duo Agent sessions are attached to a work item. The badge uses a binary status model: orange when any session is awaiting user input, neutral otherwise. Clicking the badge opens a popover listing sessions with their status, ID, and flow type.

Related to #600601.

Key behaviors

  • Badge: Compact session-ai icon + count, placed in the right footer cluster next to relationship icons. Matches the WorkItemRelationshipIcons visual pattern.
  • Popover: Lists up to 5 sessions with status dots, IDs, flow type, and human-readable status. Shows 5+ when paginated.
  • Session links: Clicking a session ID emits SHOW_SESSION on the AI panel event hub to open the session in the Duo side panel.
  • View all: The View all sessions link opens the work item in the board's side-by-side detail panel via setActiveBoardItemMutation.
  • Click isolation: js-no-trigger prevents badge/popover clicks from also opening the board card detail panel.

Technical details

  • Reuses the existing getDuoAgentSessionsOnWorkItem query with first: 5 pagination — no backend changes
  • EE component loaded via ee_component lazy import pattern
  • Feature flag check inside the component (skip() on the Apollo query)
  • push_frontend_feature_flag added to both group and project EE boards controllers

As it is behind the duo_agent_sessions_on_board flag, I have elected to not add a changelog.

Feature flag: duo_agent_sessions_on_board (ee/config/feature_flags/gitlab_com_derisk/duo_agent_sessions_on_board.yml)

dark-error-popover

dark-popover

semantic-dark

semantic-light

How to set up and validate locally

  1. Enable the feature flag: Feature.enable(:duo_agent_sessions_on_board)
  2. Navigate to a project or group board with issues that have Duo Agent sessions
  3. Observe the session badge in the card footer (right cluster, next to relationship icons)
  4. Click the badge to open the popover showing session details
  5. Click a session ID to open it in the Duo side panel
  6. Click View all sessions to open the work item in the board detail panel

MR acceptance checklist

  • This MR is behind the duo_agent_sessions_on_board feature flag
  • Tests added for the new component and integration
  • Existing specs updated for query shape change (pageInfo)
Edited by Andrew Fontaine

Merge request reports

Loading