Skip to content

fix(gitlab): group work item links, such as epics, are no longer read as issues - #43028

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
Michel-Liao:fix/gitlab-group-work-item-links
Nov 25, 2026
Merged

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
Michel-Liao:fix/gitlab-group-work-item-links

Conversation

@Michel-Liao

Copy link
Copy Markdown
Contributor

Problem

GitLab.com serves epics, and any other group-level work item, at https://gitlab.com/groups/<group>/-/work_items/<iid>. The older /groups/<group>/-/epics/<iid> address redirects there. T3 Code reads that URL as issue <iid> in a project named groups/<group>.

With any GitLab project on that host open, clicking an epic link in chat opens the issue panel instead of the link. The panel asks GitLab for projects/groups%2F<group>/issues, a project that cannot exist, so it can only show "Could not load this issue". The epic never opens unless the user knows to Cmd/Ctrl-click. Hovering the link sends the same request for the preview. The agent issue tools and workflows resolve the URL the same way and fail on the read.

Change

ISSUE_PATH in the GitLab definition no longer matches a path that starts with groups/. groups is a name GitLab reserves at the top level, so no project lives below it. These URLs now parse as null and open as ordinary links; the agent tools answer "This is not a recognised issue URL." straight away.

A subgroup or project named groups further down the path (acme/groups/web) is still read as before.

Scope

A one-pattern fix for an obvious bug, so there is no separate issue. It follows #42605 on the same pattern. I searched open and closed PRs and issues for group work items, epics, work_items and ISSUE_PATH; nothing covers this. The four open PRs that touch this file change other lines.

Left alone on purpose: repositoryUrlFromPage also treats a pasted group page as a repository page. That is a different feature and a separate problem.

Verification

I found this by running URL shapes that GitLab emits today through the definitions.

  • The URL shape is real. A live public epic: https://gitlab.com/groups/gitlab-org/-/work_items/7023 ("Dogfooding Incidents"). https://gitlab.com/groups/gitlab-org/-/epics/7023 answers 302 to it. The read T3 Code sends for it, GET /api/v4/projects/groups%2Fgitlab-org/issues?iids[]=7023, answers 404 Project Not Found. groups is in TOP_LEVEL_ROUTES in GitLab's lib/gitlab/path_regex.rb and on its reserved names page.
  • In the web app, before and after. An isolated dev instance with one project whose remote is https://gitlab.com/gitlab-org/cli.git, and a message holding the epic link and a project work item link.
Before: clicking the epic link opens the issue panel After: the same click opens the epic
before after

After the fix, the project link in the same message (gitlab-org/cli/-/work_items/8806) still opens the issue panel.

  • Calling the real parseIssueUrl:
base (dc5ae5ce63)
https://gitlab.com/groups/gitlab-org/-/work_items/7023
  -> {"host":"gitlab.com","scope":"groups/gitlab-org","key":"7023"}
https://gitlab.com/groups/gitlab-org/quality/-/work_items/491
  -> {"host":"gitlab.com","scope":"groups/gitlab-org/quality","key":"491"}
https://gitlab.com/gitlab-org/cli/-/work_items/8806
  -> {"host":"gitlab.com","scope":"gitlab-org/cli","key":"8806"}
https://gitlab.com/acme/groups/web/-/work_items/3
  -> {"host":"gitlab.com","scope":"acme/groups/web","key":"3"}

this branch
https://gitlab.com/groups/gitlab-org/-/work_items/7023
  -> null
https://gitlab.com/groups/gitlab-org/quality/-/work_items/491
  -> null
https://gitlab.com/gitlab-org/cli/-/work_items/8806
  -> {"host":"gitlab.com","scope":"gitlab-org/cli","key":"8806"}
https://gitlab.com/acme/groups/web/-/work_items/3
  -> {"host":"gitlab.com","scope":"acme/groups/web","key":"3"}
  • Old and new definition on 301 URLs and remotes, every recogniser of every forge: the only results that differ are issue parses of 7 URLs, all below /groups/ (plain, with a #note anchor, a trailing slash, a nested group, self-managed hosts with and without a port), all going from an issue in groups/… to null. Unchanged: project issues, work items and incidents, acme/groups/…, groupsy/web, merge requests.
  • Test: the new row in the "does not read … as an issue" table fails on the base (the URL parses to scope groups/acme, key 12) and passes here; sourceControlDefinitions.test.ts passes 34/34.
  • vp run check:changed passes: format, lint, knip, typecheck of 11 packages, and tests.
  • Not checked: I have no glab on this machine, so the panel in the "before" capture shows its "tool is not installed" text; with glab signed in, the request behind it is the 404 above. Mobile and the agent tools were read, not run. I did not test a self-managed GitLab; the group work item route exists on the public ones I looked at, but they have no epics to open. GitLab mounted below a path (/gitlab/groups/...) is still read as before.

Written by Claude Fable 5.2 in Claude Code, run from T3 Code.

🤖 Generated with Claude Code

… as issues

GitLab.com serves epics at `/groups/<group>/-/work_items/<iid>`, and
redirects the older `/-/epics/<iid>` address there. The issue route read
that as issue `<iid>` in a project named `groups/<group>`, so with any
GitLab project open the link opened the issue panel, which asked GitLab
for `projects/groups%2F<group>/issues` and could not load anything.

`groups` is a name GitLab reserves at the top level, so no project lives
below it. The issue route now leaves those URLs alone and they open as
ordinary links. A subgroup named `groups` is still read as before.

Claude Fable 5.2 in Claude Code, running in T3 Code.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 25, 2026
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8d210e5 and b815ca0.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The GitLab issue URL parser now excludes paths that begin with /groups/. A test includes a group work-item URL as an input expected not to parse as an issue.

Changes: GitLab issue URL parsing

Layer / File(s) Summary
Path filtering and test coverage
packages/source-control-gitlab/src/shared/definition.ts, apps/server/src/sourceControl/sourceControlDefinitions.test.ts
ISSUE_PATH excludes paths beginning with groups while retaining project issue, incident, and work-item paths. The test expects a group work-item URL to return null.

Estimated code review effort: 2 (Simple) | ~7 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · previous review 8d210

Group-level GitLab work-item links now open as ordinary links instead of failing as issues in a nonexistent project. Project issue and work-item links keep working. The change is small and low risk to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: GitLab group work item links, such as epics, are no longer parsed as issues. It follows the conventional commit format with the fix(gitlab) scope. The title is 79 char…
Description check Passed The description follows the template. It covers Problem (epic URLs under /groups/ read as issues in a nonexistent groups/ project), Change (ISSUE_PATH no longer matches paths beginning with gro…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: GitLab group work item links, such as epics, are no longer parsed as issues. It follows the conventional commit format with the fix(gitlab) scope. The title is 79 characters, which is slightly above the usual length, but it stays specific and accurate.

Full details: Description check

Explanation

The description follows the template. It covers Problem (epic URLs under /groups/ read as issues in a nonexistent groups/<group> project), Change (ISSUE_PATH no longer matches paths beginning with groups/), Scope (a one-pattern bug fix with no separate issue, and it cites related PR #42605), and Verification (before/after screenshots, a parseIssueUrl table, a new failing-then-passing test, and check:changed results). It also states what was not checked. The description does not fully follow the template's guidance on the agent-model line, but it names the model at the end. The required sections are all present and substantive.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between dc5ae5c and 8d210e5.

Files selected for processing: 2

  • apps/server/src/sourceControl/sourceControlDefinitions.test.ts
  • packages/source-control-gitlab/src/shared/definition.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 25, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Seed the reported two links in an assistant reply in a GitLab project, click the group work item normally, then click the project work item as a control. Real web app, Chromium, 1280×800, light theme, fresh databases and replayed assistant text on both sides.

Before After
Commit bf961f8121 b815ca0041
Group link Click intercepted; failed issue panel opens. Native anchor click allowed; no issue panel opens.
Group link clicked Before: group link opens failed issue panel After: group link leaves chat without an issue panel
Project control Before: project work item loads successfully After: project work item still loads successfully
Recording Before interaction After interaction

Scenario source · Replay setup patch

The final scenario comparison exited 0: failed on base, passed on head.

Not shown:

  • Hover-only issue-preview network requests were not separately instrumented.
  • The external GitLab destination page was not captured; the scenario verified its native anchor click was unprevented and no issue panel opened.
  • Project /issues/ links were not separately exercised; the reported project /work_items/ control loaded successfully on both commits.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 25, 2026
@juliusmarminge
juliusmarminge merged commit 357ee7e into pingdotgg:main Nov 25, 2026
57 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants