Link group-level Duo sessions in the agent platform UI
What does this MR do and why?
Group-level Duo sessions, for example every session started from GitLab Duo for Slack, have no link in the GitLab UI: session links are built from the project path, so sessions without a project render as plain text.
This MR builds on !258889 (merged) (merged), which exposes webPath and namespace on DuoWorkflow for project and group sessions, and switches every session link to those fields:
- Session list rows (
agent_flow_list_item.vue) - Duo panel inbox rows (
inbox_row.vue) - Merge request and pipeline session widgets (
agent_session_row.vue) - Session page sidebar and details overlay (
agent_flow_details_panel.vue,agent_flow_details_overlay.vue), which readwebPathandnamespacefrom the Apollo cache with a cache-only query instead of receiving them as props
The sidebar Group row falls back to the session's namespace, so group sessions show their group instead of None.
Feature flag
Links to group-level sessions are behind the dap_group_session_links feature flag (wip, disabled by default), because the group sessions index page does not exist yet. With the flag off, a session without a project renders its ID as plain text, as on master. With the flag on, it links to its webPath. The flag applies to the session list rows, Duo panel inbox rows, and the session page sidebar and details overlay.
Not behind the flag:
- Project sessions link to their
webPathin either state; the URL is the same as before. - The Group row fallback to the session's namespace.
- The merge request and pipeline widgets, which only list project sessions.
Compatibility
The new GraphQL nodes (webPath on DuoWorkflow, and the namespace subtree in the session page query) are tagged @gl_introduced(version: "19.6.0") per multi-version compatibility. A backend without them returns null instead of an undefinedField error; in that window the session ID renders as plain text and the Group row keeps its project fallback. This lets the MR ship in 19.6 alongside the backend MR; Keeps::CleanupGlIntroduced removes the directives later.
References
- Issue: #631621 (closed)
- Backend MR (merged): !258889 (merged)
- Related: !258011 (merged)
Screenshots or screen recordings
Before is master. After is this MR with dap_group_session_links enabled. With the flag disabled, the group session IDs render as plain text, as in Before. The session ID is styled like plain text, so the screenshots hover over it to show the link.
| Before | After | |
|---|---|---|
| Session page sidebar, group session | ![]() |
![]() |
| Session page sidebar, subgroup session | ![]() |
![]() |
| GitLab Duo panel, Session details | ![]() |
![]() |
How to set up and validate locally
Setup
-
Check out this branch. The backend MR is already in
master. -
Use the
gitlab-duogroup and thegitlab-duo/testproject from the default GDK seed data, plus a subgroup ofgitlab-duo(the seed data has none; create one, for examplegitlab-duo/link-test). -
Create one group session and one subgroup session through the API (group sessions can't be created from the UI yet, except through Slack):
export TOKEN=<personal access token with api scope> export SUBGROUP_PATH=gitlab-duo%2Flink-test # URL-encoded path of your subgroup GROUP_ID=$(curl -s -H "PRIVATE-TOKEN: $TOKEN" "http://gdk.test:3000/api/v4/groups/gitlab-duo" | jq .id) SUBGROUP_ID=$(curl -s -H "PRIVATE-TOKEN: $TOKEN" "http://gdk.test:3000/api/v4/groups/$SUBGROUP_PATH" | jq .id) for ns in $GROUP_ID $SUBGROUP_ID; do curl -s -X POST -H "PRIVATE-TOKEN: $TOKEN" "http://gdk.test:3000/api/v4/ai/duo_workflows/workflows" \ --data "namespace_id=$ns&goal=Link test&workflow_definition=slack_assistant/v1&environment=web" | jq '{id, web_url}' doneBoth
web_urlvalues are under/groups/gitlab-duo/-/automate/agent-sessions/<id>, the subgroup session included, because the session page only exists on top-level groups. Use a non-chat flow such asslack_assistant/v1(session lists hide Duo Chat sessions); the sessions don't need to start. -
Leave the
dap_group_session_linksfeature flag disabled (the default) for the first checks.
Checks
Hover a session ID to see its URL in the status bar, or Cmd/Ctrl-click it.
With dap_group_session_links disabled
- Group session page. Open the group session's
web_url. In the sidebar under Identity, Session is plain text and Group showsGitLab Duoinstead ofNone. - GitLab Duo panel. Open GitLab Duo sessions in the right sidebar. A group session row has no URL on hover, and a plain click still opens the session in the panel. Expand Session details: Session ID is plain text.
- Project sessions still link. Open a project session in
gitlab-duo/test: Session links to/gitlab-duo/test/-/automate/agent-sessions/<id>.
With dap_group_session_links enabled
Enable the flag in a Rails console (bin/rails console) and reload the page:
Feature.enable(:dap_group_session_links)- Group session page. Open the group session's
web_url. In the sidebar under Identity, Session links to this page and Group showsGitLab Duoinstead ofNone. - Subgroup session page. Open the subgroup session's
web_url. Session links to/groups/gitlab-duo/-/automate/agent-sessions/<id>(through the top-level group) and Group shows the subgroup. - GitLab Duo panel. Open GitLab Duo sessions in the right sidebar. Hovering a group session row shows
/groups/gitlab-duo/-/automate/agent-sessions/<id>; Cmd/Ctrl-click opens the session page in a new tab, a plain click still opens the session in the panel. Expand Session details at the bottom: Session ID is a link. - Project sessions are unchanged. Open
http://gdk.test:3000/gitlab-duo/test/-/automate/agent-sessionsand a project session: links still point to/gitlab-duo/test/-/automate/agent-sessions/<id>and the sidebar shows the project and its group. - Merge request and pipeline widgets. On a merge request in
gitlab-duo/testwith Duo sessions (and a pipeline with sessions, if available), the session IDs in the widget link to the session pages.
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.





