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-aiicon + count, placed in the right footer cluster next to relationship icons. Matches theWorkItemRelationshipIconsvisual 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_SESSIONon the AI panel event hub to open the session in the Duo side panel. - View all: The
View all sessionslink opens the work item in the board's side-by-side detail panel viasetActiveBoardItemMutation. - Click isolation:
js-no-triggerprevents badge/popover clicks from also opening the board card detail panel.
Technical details
- Reuses the existing
getDuoAgentSessionsOnWorkItemquery withfirst: 5pagination — no backend changes - EE component loaded via
ee_componentlazy import pattern - Feature flag check inside the component (
skip()on the Apollo query) push_frontend_feature_flagadded 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)
How to set up and validate locally
- Enable the feature flag:
Feature.enable(:duo_agent_sessions_on_board) - Navigate to a project or group board with issues that have Duo Agent sessions
- Observe the session badge in the card footer (right cluster, next to relationship icons)
- Click the badge to open the popover showing session details
- Click a session ID to open it in the Duo side panel
- Click
View all sessionsto open the work item in the board detail panel
MR acceptance checklist
- This MR is behind the
duo_agent_sessions_on_boardfeature flag - Tests added for the new component and integration
- Existing specs updated for query shape change (
pageInfo)
Edited by Andrew Fontaine



