Loading
Collapse agent sessions widget when there are no sessions
What does this MR do and why?
This is a follow-up to !259696 (merged).
After that MR, the agent sessions widget on work items and merge requests opens expanded when there are no sessions, showing only the "No agent sessions" message. This MR keeps the widget collapsed in that case so it takes up less space.
- With zero sessions, the widget now shows only its header, collapsed.
- The "No agent sessions" message still appears when the user expands the widget.
- The error alert from !259696 (merged) still shows expanded.
- Sessions that need input still show expanded. Other sessions still show collapsed.
- The pipeline sessions widget does not change. It does not use
showEmptyState, so it stays hidden when there are no sessions.
The change is one condition in the shared agent_sessions_list.vue component.
While the sessions query is loading on work items and merge requests, the widget now stays collapsed instead of showing an expanded loading skeleton. If the results include sessions that need input, the widget expands.
References
- Follow-up to !259696 (merged)
- Related issue: #629856 (closed)
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
For DAP/General Setup
- General DAP: https://docs.gitlab.com/development/duo_agent_platform/
- Assigning Duo to a group: https://docs.gitlab.com/development/ai_features/#run-gitlabduosetup-script
- The
gitlab:duo:setupscript creates agitlab-duo/testproject with an issue and a merge request you can use below.
For this testing
- Sessions present: open the work item and the merge request that have sessions. The Sessions widget lists them 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.
Edited by Emily Bauman



