Loading
Feat: Add NoteSessionBar to work item notes
What does this MR do and why?
Add the NoteSessionBar component to work item notes (work_item_note.vue) using the duoTriggeredSession GraphQL field. This is a child MR of !249824 (merged), which focuses on the base note triggering work and merge request note changes.
This MR specifically handles the work item note changes:
- Adds
NoteSessionBarasync component towork_item_note.vue - Adds
hasSessioncomputed property to conditionally render the bar - Updates the EE GraphQL fragment (
work_item_note.fragment.graphql) to includeduoTriggeredSessionfields (id,agentName,statusName) - Updates mock data (
mock_data.js) to includeduoTriggeredSession: nullon all note fixtures - Adds specs for the
NoteSessionBarrendering inwork_item_note_spec.js
References
- Parent Epic: gitlab-org#22699
- FF Work Item: #624349
- Parent Work Item: #614362 (closed)
- Related Work Item: #624326
Screenshots or screen recordings
New Comments:
| Before | After | After (Hover) |
|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Existing Comments:
| Before | After | After (Hover) |
|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
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.
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.
-
- Be sure to enable the following FF
note_agent_session_bar. You can use the following to toggle it on/off: http://gdk.test:3000/rails/features/
- Be sure to enable the following FF
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.
Edited by Lindsey Shelton



















