You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(gitlab): group work item links, such as epics, are no longer read as issues - #43028
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
After the fix, the project link in the same message (gitlab-org/cli/-/work_items/8806) still opens the issue panel.
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.
… 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>
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.
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: 4
Check name
Status
Explanation
Title check
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
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
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
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:XS0-9 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 namedgroups/<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_PATHin the GitLab definition no longer matches a path that starts withgroups/.groupsis a name GitLab reserves at the top level, so no project lives below it. These URLs now parse asnulland open as ordinary links; the agent tools answer "This is not a recognised issue URL." straight away.A subgroup or project named
groupsfurther 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_itemsandISSUE_PATH; nothing covers this. The four open PRs that touch this file change other lines.Left alone on purpose:
repositoryUrlFromPagealso 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.
https://gitlab.com/groups/gitlab-org/-/epics/7023answers 302 to it. The read T3 Code sends for it,GET /api/v4/projects/groups%2Fgitlab-org/issues?iids[]=7023, answers404 Project Not Found.groupsis inTOP_LEVEL_ROUTESin GitLab'slib/gitlab/path_regex.rband on its reserved names page.https://gitlab.com/gitlab-org/cli.git, and a message holding the epic link and a project work item link.After the fix, the project link in the same message (
gitlab-org/cli/-/work_items/8806) still opens the issue panel.parseIssueUrl:/groups/(plain, with a#noteanchor, a trailing slash, a nested group, self-managed hosts with and without a port), all going from an issue ingroups/…tonull. Unchanged: project issues, work items and incidents,acme/groups/…,groupsy/web, merge requests.groups/acme, key12) and passes here;sourceControlDefinitions.test.tspasses 34/34.vp run check:changedpasses: format, lint, knip, typecheck of 11 packages, and tests.glabon this machine, so the panel in the "before" capture shows its "tool is not installed" text; withglabsigned 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