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

Screenshots or screen recordings

Before After
Screenshot 2026-10-08 at 9.43.38 AM.png Screenshot 2026-10-08 at 9.43.33 AM.png
Screenshot 2026-10-08 at 9.45.36 AM.png Screenshot 2026-10-08 at 9.45.29 AM.png

How to set up and validate locally

For DAP/General Setup

For this testing

  1. Sessions present: open the work item and the merge request that have sessions. The Sessions widget lists them as before.
  2. 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

Merge request reports

Loading
Loading