Loading
Feat: Add new Note Session Status Bar component to Merge Request comments
What does this MR do and why?
This MR adds the "Session Bar" to the Notes/Comments components for Merge Requests. This does not yet remove the comment as that will have to be in a follow up (as this MR is getting rather large). I have also split off the Work Items part to this MR !250297 (merged) so this one can move forward.
References
- Related GitLab Work Item (Existing Comments): #605532 (closed)
- Related GitLab Work Item (New Comments): #605132 (closed)
- Prerequisite MR (GraphQL fields): !249833 (merged)
Screenshots or screen recordings
Work Items and Merge Request comments should look the same. This MR focuses only on the merge request comments and setting up the session bar component.
New Comments:
| Status | Before | After | After (Hover) |
|---|---|---|---|
| Running | ![]() |
![]() |
![]() |
| Awaiting Input | ![]() |
![]() |
![]() |
| Paused | ![]() |
![]() |
![]() |
| Failed/Stopped | ![]() |
![]() |
![]() |
| Finished | ![]() |
![]() |
N/A |
| Dark Mode (no hover) | Dark Mode (hover) |
|---|---|
![]() |
![]() |
Existing Comments:
| Status | Before | After | After (Hover) |
|---|---|---|---|
| Running | ![]() |
![]() |
![]() |
| Awaiting Input | ![]() |
![]() |
![]() |
| Paused | ![]() |
![]() |
|
| Failed/Stopped | ![]() |
![]() |
![]() |
| Finished | ![]() |
![]() |
N/A |
| Dark Mode (no hover) | Dark Mode (hover) |
|---|---|
![]() |
![]() |
| Screen Recording |
|---|
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. - Turn on the following feature flags (if necessary):
duo_workflow,duo_workflow_in_ci,ai_flow_triggers.
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 Comments (The Actual Testing)
- Make sure you are in a Duo enabled projects where Sessions permissions have been set.
Test New Comments
- Go to any Work Item (Left rail: Work items, then select a Work Item)
- In the comments area, type a new comment and tag an agent (ex:
@duo-developer could you count to 10) - See the new Session status bar displays when a Session starts (ignore the comment status for the time being).
- Validate a new Session has started in your Side Panel sessions tab.
- Click the Session bar and validate a new tab opens with the Sessions page (avoided going to Side Panel as any user could click this and Side Panel is specific only to the user)
- When the Session completes, the bar goes away. If the Session fails, the bar will still display with an error status. If the Session is awaiting input, the bar will still display with awaiting input message (follow up, add waiting reasoning).
Test Existing Comments
- Go to any Work Item (Left rail: Work items, then select a Work Item)
- In the comments area, find an existing comment and tag an agent in a thread (ex:
@duo-developer could you count to 10) - See the new Session status bar displays when a Session starts (ignore the comment status for the time being).
- Validate a new Session has started in your Side Panel sessions tab.
- Click the Session bar and validate a new tab opens with the Sessions page (avoided going to Side Panel as any user could click this and Side Panel is specific only to the user)
- When the Session completes, the bar goes away. If the Session fails, the bar will still display with an error status. If the Session is awaiting input, the bar will still display with awaiting input message (follow up, add waiting reasoning).
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 #605532 (closed)
Edited by Lindsey Shelton
























