Session details: add feature flag and agent, model metadata rows
What does this MR do and why?
Resolves #636551 (closed) and #636554 (closed)
This change is behind the feature flag :session_details_enhancements
First slice of #635907, where SCM, AI Governance and AI:Execution agreed to land on one session view built on the existing session details component. This MR introduces the flag that gates every addition and its first consumer: the agent and model of a session in the metadata panel, on the session page and in the Duo side panel.
agentName already exists on DuoWorkflow; it only needed requesting. The Agent row renders only when the name differs from the flow that ran, since catalog-item sessions report the same name for both. Source (where the session ran) is held for a follow-up until design settles on user-facing names.
Changes
session_details_enhancements(wip, default off), pushed fromee/lib/ee/gitlab/gon_helper.rbso the Duo side panel sees it on every page.get_agent_flow.query.graphqlrequestsagentName. The shared flow fragment is untouched so list and inbox rows do not fetch it.SESSION_DETAILS_LABELSholds the Agent and Model strings once for both components.agent_flow_details_panel.vueandagent_flow_details_overlay.vuegain an Agent row and relabel Default model to Model, behind the flag.- Specs for both components cover the flag on and off, no agent name, and agent equal to the flow; the gon helper spec covers the pushed flag; the parent component specs and shared mocks carry the new prop.
References
- Parent: #635907
- Flag rollout: #636844
- Design reference: https://claude.ai/artifact/GBYMouksa34VLT8NV8iRF8?sk=3UOzTUR2v8UK3AmQyDkYIQ#page-d206f066d42d
- Next slices stacking on this flag: #636552, #636553, #636555
Screenshots or screen recordings
Session page rail, flag off and on, on a session run by a foundational agent (Agent differs from Flow).
| Before | After |
|---|---|
![]() |
![]() |
Duo side panel with Session details expanded, flag off and on, on a catalog-flow session (Agent equals Flow, so no Agent row).
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Enable the flag in the Rails console:
Feature.enable(:session_details_enhancements) - Seed sessions if you have none:
bundle exec rake "gitlab:duo_workflow:populate[10,10,root,<group>/<project>,web]" - Seeded sessions have no model and their agent equals their flow. Give one a model, and make another a foundational agent session so the Agent row renders:
w = Ai::DuoWorkflows::Workflow.last w.update!(model_metadata_json: { name: 'claude_sonnet_4_6', identifier: 'claude-sonnet-4-6-20260514' }.to_json) Ai::DuoWorkflows::Workflow.last(2).first.update!(workflow_definition: 'duo_planner/v1') - Visit
/<group>/<project>/-/automate/agent-sessions/<id>. The planner session shows Agent under Identity; both show Model instead of Default model. - Open the Duo side panel, pick a session from the Sessions tab and expand Session details. The same rows appear.
- Disable the flag and reload. Both surfaces render as before.
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.
This MR was authored with the assistance of an AI coding agent and reviewed by @zcuddy before submission.



