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_id is present
    • Clicking it emits SHOW_SESSION on the side panel event hub. The panel router handles that event and routes the Duo side panel to the session.
  • 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.duoChatAvailable and renders nothing when it is false. This hides the button from signed-out visitors (currentUser is null) and from users without Duo access

References

Screenshots or screen recordings

MR overview tab

MR changes tab

Screenshot_2026-08-12_at_10.51.50_AM

When viewing as a user without access to Duo

(no button)

Screenshot_2026-08-12_at_10.32.04_AM

How to set up and validate locally

  1. 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
  2. Prerequisite: Have GitLab Runner working
  3. Navigate to an open MR and @mention Duo Developer to start a session (ex. ask it to make a duplicate MR of the one you're looking at)
  4. See that the "View session" button renders and when clicked, opens the session details in the side panel
  5. Go to the diffs tab and @mention Duo Developer again, repeat step 4 for both regular diffs and rapid diffs turned on
  6. 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

Merge request reports

Loading
Loading