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 |
|---|---|
![]() |
![]() |
![]() |
![]() |
| Merge Request | Work Item |
|---|---|
![]() |
![]() |
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
SaaSmode withexport GITLAB_SIMULATE_SAAS=1set in yourenv.runitfile in your local gdk. - Enable your AI settings:
http://gdk.test:3000/<YOUR_GROUP>/<YOUR_PROJECT>/edit#js-gitlab-duo-settingsto enable by projecthttp://gdk.test:3000/groups/<YOUR_GROUP>/-/settings/gitlab_duo/configurationto enable by group (SaaS)http://gdk.test:3000/groups/<YOUR_GROUP>/-/edit#js-gitlab-duo-settingsto enable group (SM)http://gdk.test:3000/admin/gitlab_duo/configurationto enable at instance (SM)
To Test in Agent Sessions page
- Navigate to a project with that has AI features enabled.
- In the left side panel, you will see
Automatewith a tanuki icon. SelectSessionsfrom the dropdown. - Test details view (see below for test cases)
To Test in Side Panel
- Make sure AI features are enabled.
- Open the side panel and open Sessions.
- Test details view (see below for test cases)
To Test in MR Sessions Widget
- To test this locally, go to any MR in which you have triggered a Session from (Ex: Using
Fix Pipeline with Duowith create a tie) - Test sessions widget (see below for test cases)
To Test in Work Item Sessions Widget
- To test this locally, go to any Work Item in which you have triggered a Session from (Ex: Using
Generate MR with Duowith create a tie) - Test sessions widget (see below for test cases)
Adding Sessions
- 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 Duobutton. It should trigger a new session that you can open up. - 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
- Go to any Work Item or Merge Request (see above) that has a Session tie
- Validate the
User Avatarstill works on each listed Session.
Sessions Details Testing
- Go to any Session (in Side Panel or on Project Page)
- Validate the Information view
If you would like to regression test this, here are a few simple steps:
- Go to the Side Panel > Sessions and view the
Informationdetails view (you will need to select the Information icon in Side Panel) - Validate the
userfield displays theUser Avatarcomponent appropriately - Now to go any
FailedSession. - Validate the
userfield displays theUser Avatarcomponent appropriately on thecreatedmessage 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





