Update agent session commit badge

What does this MR do and why?

This is a follow-up to the blame gutter agent session icon. The linked issue asks for the agent session icon on the project commits list to match it.

  • Replaces the blue info badge with a plain 16px session-ai icon in the subtle text colour. It gets darker on hover.
  • The icon now links to the agent session. A normal click opens the session in the GitLab Duo side panel. On pages without the Duo panel, the click follows the link instead.
  • The link comes from the Duo-Session: trailer that Duo adds to agent commits. The commits query already fetches the commit description, which contains the trailer, so there is no GraphQL change.
  • The trailer is user-editable text, so it is treated as untrusted. The icon only links to a same-origin /-/automate/agent-sessions/:id URL. If the trailer is missing or doesn't pass, the plain icon is shown without a link.
  • The badge moved from CE to EE (ee/app/assets/javascripts/commit/components/agent_session_badge.vue) and is loaded with the ee_component/ alias. Agent sessions only exist in EE (has_agent_session? always returns false in CE), so nothing changes in CE.

References

Screenshots or screen recordings

Before After
commits-agent-session-before commits-agent-session-after

2026-10-01_11.27.12

How to set up and validate locally

  1. Use a GDK with an Ultimate license.
  2. Pick a project and enable agent session tracking in the Rails console: Project.find_by_full_path('<path>').project_setting.update!(dap_session_tracking_enabled: true)
  3. Create a commit whose message ends with a trailer pointing at an agent session on your GDK, for example Duo-Session: http://gdk.test:3000/<project-path>/-/automate/agent-sessions/<id>.
  4. Go to the project's Commits page (Code > Commits) for that branch.
  5. Check that the icon is the subtle session icon, gets darker on hover, and shows the tooltip.
  6. Click the icon. The session opens in the GitLab Duo side panel.
Edited by Jacques Erasmus

Merge request reports

Loading
Loading