Feat: Maintenance - update user endpoint in sessions

What does this MR do and why?

This is the frontend MR to integrate the user endpoint instead of userId from the duoWorkflows query. This is mostly maintenance cleanup as this will help us optimize from doing too many unnecessary API calls - as well as improves the loading/reactive experience for the end user.

References

Related GitLab Work Item: #600286 (closed)

Screenshots or screen recordings

Project Page Side Panel
Screenshot_2026-05-19_at_11.40.55_AM Screenshot_2026-05-19_at_11.41.39_AM
Screenshot_2026-05-19_at_11.41.05_AM Screenshot_2026-05-19_at_11.41.49_AM
Merge Request Work Item
Screenshot_2026-05-19_at_11.40.30_AM Screenshot_2026-05-19_at_11.39.57_AM

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
  • Make sure you are in SaaS mode with export GITLAB_SIMULATE_SAAS=1 set in your env.runit file in your local gdk.
  • Enable your AI settings:
    • http://gdk.test:3000/<YOUR_GROUP>/<YOUR_PROJECT>/edit#js-gitlab-duo-settings to enable by project
    • http://gdk.test:3000/groups/<YOUR_GROUP>/-/settings/gitlab_duo/configuration to enable by group (SaaS)
    • http://gdk.test:3000/groups/<YOUR_GROUP>/-/edit#js-gitlab-duo-settings to enable group (SM)
    • http://gdk.test:3000/admin/gitlab_duo/configuration to enable at instance (SM)

To Test in Agent Sessions page

  1. Navigate to a project with that has AI features enabled.
  2. In the left side panel, you will see Automate with a tanuki icon. Select Sessions from the dropdown.
  3. Test details view (see below for test cases)

To Test in Side Panel

  1. Make sure AI features are enabled.
  2. Open the side panel and open Sessions.
  3. Test details view (see below for test cases)

To Test in MR Sessions Widget

  1. To test this locally, go to any MR in which you have triggered a Session from (Ex: Using Fix Pipeline with Duo with create a tie)
  2. Test sessions widget (see below for test cases)

To Test in Work Item Sessions Widget

  1. To test this locally, go to any Work Item in which you have triggered a Session from (Ex: Using Generate MR with Duo with create a tie)
  2. Test sessions widget (see below for test cases)

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 User Approval (The Actual Testing)

Widget Testing

  1. Go to any Work Item or Merge Request (see above) that has a Session tie
  2. Validate the User Avatar still works on each listed Session.

Sessions Details Testing

  1. Go to any Session (in Side Panel or on Project Page)
  2. Validate the Information view

If you would like to regression test this, here are a few simple steps:

  1. Go to the Side Panel > Sessions and view the Information details view (you will need to select the Information icon in Side Panel)
  2. Validate the user field displays the User Avatar component appropriately
  3. Now to go any Failed Session.
  4. Validate the user field displays the User Avatar component appropriately on the created message state.

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 #600286 (closed)

Edited by Lindsey Shelton

Merge request reports

Loading