Show linked pipelines in session details

What does this MR do and why?

Adds pipelines to the "Linked items" section in session details

  • Queries pipelineLinks on the session and passes them into the linked items section
  • Renders pipelines as badges in the Source and Created rows, alongside the existing work item, merge request, and note badges.
  • Clicking on the badge navigates to the pipeline page, same as the other badges
  • Uses the pipeline icon from the GitLab icon library
  • Wires up the Created row even though the backend cannot populate it yet
    • For feature parity with the other items that can be linked
    • context: Ai::DuoWorkflows::WorkflowPipeline's link_type enum currently only has source, so the generated GraphQL enum DuoWorkflowPipelineLinkType only exposes SOURCE, and pipelines only ever appear in the Source row today.
    • The frontend already maps CREATED links too, so a future created link type on the backend will surface badges with no frontend change needed. The query requests pipelineLinks with no linkType argument, so it already fetches every link type the backend returns.

References

Screenshots or screen recordings

Full page view Side panel
Screenshot_2026-09-21_at_12.47.31_PM Screenshot_2026-09-21_at_12.47.46_PM

How to set up and validate locally

  1. Prerequisite: Have GitLab Duo set up in your GDK
    • Have a Duo-enabled group and project in your GDK created by the Duo setup above
  2. Prerequisite: Have GitLab Runner working
  3. View a session that was triggered by a pipeline. If you don't already have one, you can produce one:
    • Enable the "Fix CI/CD Pipeline" flow at /<project full path>/-/automate/flows
    • Open a merge request whose pipeline fails. A job with script: exit 1 works. Give it a rules entry matching $CI_PIPELINE_SOURCE == "merge_request_event" so the job runs in the merge request pipeline, since the merge request widget keys off the merge request's head pipeline.
    • Click "Fix pipeline with Duo" in the merge request's pipeline widget. That button only renders when the head pipeline has failed.
  4. Open the session at /<project full path>/-/automate/agent-sessions/<session id>.
  5. Confirm the Linked items section shows a Source row containing a pipeline badge with the pipeline icon, reading the pipeline reference and name, and linking to the pipeline. A pipeline with no name shows just the reference. There is no feature flag, the change renders by default on this branch.

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 Allison Villa

Merge request reports

Loading
Loading