Feat: Add cancel button to side panel session details

What does this MR do and why?

This is a continuation of the Side Panel Overview/Header section. This adds the Cancel or Stop button for Sessions into the Session Details Header.

This change DOES NOT:

  • Fix the padding issue in the Side Panel (will be a follow up MR to keep the file changes separate)

References

Related GitLab Work Items: #618767 (closed) (Child), #609573 (closed) (Parent)

Screenshots or screen recordings

Before After
Screenshot_2026-08-20_at_10.51.14_PM Screenshot_2026-08-20_at_10.50.13_PM
Screen Recording

How to set up and validate locally

For DAP/General Setup

Adding Sessions

  1. A: If you see no Sessions, you can trigger one that displays a Pipeline/Job by going to an Issue within your Duo enabled project and clicking the Generate MR with Duo button. It should trigger a new session that you can open up.
  2. B: You can also run the following query bundle exec rake "gitlab:duo_workflow:populate[50,20,1,<<YOUR_TEST_GROUP_PATH_HERE>>]" to create new agent sessions. Refresh the page. Make sure the group you are testing in has Duo assigned (see DAP setup above).

Test Session Details (The Actual Testing)

  1. Make sure you are in a Duo enabled projects where Sessions permissions have been set.

Test Cancel State in Header

  1. Trigger a new session. A quick easy way is to tag Duo Developer in a comment/note for Work Items or Merge Requests.
  2. Go to the Side Panel on the right and open the Sessions tab (the double square icon)
  3. Click the freshly generated Session.
  4. While the Session is in a running state - notice the Cancel button is present.
  5. Click the Cancel button and validate it stops the workflow.

For these test cases since this is in the Side Panel, the user should always have permission to cancel the Session.

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.

Related to #618767 (closed)

Edited by Lindsey Shelton

Merge request reports

Loading
Loading