Loading
Add a View session button to agent replies in MRs
What does this MR do and why?
- Adds a "View session" button to agent reply comments in MRs that opens the related Duo session in the side panel
- The button renders when the note's
duo_session_idis present - Clicking it emits
SHOW_SESSIONon the side panel event hub. The panel router handles that event and routes the Duo side panel to the session.
- The button renders when the note's
- Covered in both regular comments (
app/assets/javascripts/notes/components/note_actions.vue) and rapid diffs discussions (app/assets/javascripts/rapid_diffs/app/discussions/note_actions.vue) - The new view session component queries
currentUser.duoChatAvailableand renders nothing when it is false. This hides the button from signed-out visitors (currentUseris null) and from users without Duo access
References
- Related to FE: Add session link to agent reply comments (MRs) (#606457 - closed) • Allison Villa • 19.4
- Related backend issue: BE: Add session link to agent reply comments (M... (#606456 - closed) • Allison Villa • 19.3 • Needs attention
Screenshots or screen recordings
MR overview tab
MR changes tab
When viewing as a user without access to Duo
(no button)
How to set up and validate locally
- Prerequisite: Have GitLab Duo set up in your GDK
- Have a Duo-enabled group and project in your GDK created by the Duo setup above
- Prerequisite: Have GitLab Runner working
- Navigate to an open MR and
@mentionDuo Developer to start a session (ex. ask it to make a duplicate MR of the one you're looking at) - See that the "View session" button renders and when clicked, opens the session details in the side panel
- Go to the diffs tab and
@mentionDuo Developer again, repeat step 4 for both regular diffs and rapid diffs turned on - Sign out or impersonate a user without Duo access and view the same MR. Verify that the "View session" button does not appear on any of those comments
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 Allison Villa

