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): incident links are read as issue links - #42605
GitLab gives an incident (an issue of type incident) its own address: https://gitlab.com/group/project/-/issues/incident/<iid>. That is the link GitLab's Incidents list puts on every row. T3 Code does not read it as an issue link:
The agent issue tools answer it with "This is not a recognised issue URL." (IssueService.resolveUrl), and a workflow given the link reports "Could not find the issue at …".
In chat, on web and mobile, the link opens as an ordinary web link instead of the issue, because resolveIssueLinkTarget returns null.
The same incident already works everywhere else in T3 Code: it is listed and read through the issues API, and its plain /-/issues/<iid> address is recognised. Only this URL shape is missed, because the GitLab definition's ISSUE_PATH accepts /-/issues/<iid> and /-/work_items/<iid> only.
Change
ISSUE_PATH now also accepts the incident segment between issues and the number. An incident tab after the number (/timeline, /metrics, /alerts) is covered by the suffix the pattern already allowed. parseIssueUrl is the only place that matches GitLab issue URLs; the issue tools, workflows, and web and mobile chat links all go through it.
Scope
A one-pattern fix for an obvious bug, so there is no separate issue. It is the same kind of fix as #40271 (a Forgejo URL shape) and #40436 (an Azure DevOps URL shape). I searched open and closed PRs and issues for GitLab incidents, issues/incident and ISSUE_PATH; nothing covers this.
Verification
I found this by collecting URL shapes GitLab emits today and running them through the GitLab definition.
The incident is an ordinary issue to the API T3 Code reads.GET /api/v4/projects/gitlab-com%2Fgl-infra%2Fproduction/issues?iids[]=19934 returns one row with "iid": 19934, "issue_type": "incident". That is the request GitLabIssueTracker sends through glab api, and its decoder accepts the payload.
Old and new definition on 204 URLs and remotes (GitLab, Bitbucket and Forgejo shapes, 12 recogniser results each): 9 results differ, all parseIssueUrl going from null to the right project and number for incident URLs (plain, with a tab, a #note anchor, a query string, self-managed hosts). Still refused: /-/issues/incident with no number, /incident/new, /incident/0, /incident/5x, /-/issues/incidents/5, /-/work_items/incident/5, /-/merge_requests/incident/5, and the same path on other forges' hosts. A project named incident parses as before.
Test: the new table row fails on the base (reads https://gitlab.com/acme/web/-/issues/incident/12 as an issue on its host: expected undefined to be 'gitlab') and passes here; sourceControlDefinitions.test.ts passes 33/33.
vp run check:changed passes: format, lint, knip, typecheck of 11 packages, and tests.
Not checked: the issue panel in a running client and a live glab read (I have no glab sign-in on this machine). The path past parseIssueUrl was read, not run, apart from the public API request above.
Written by Claude Fable 5.2 in Claude Code, run from T3 Code.
GitLab's Incidents list links each incident to
/group/project/-/issues/incident/<iid>. T3 Code read only /-/issues/<iid>
and /-/work_items/<iid> as issues, so the issue tools answered an
incident link with "This is not a recognised issue URL" and an incident
link in chat opened as an ordinary web link instead of the issue, even
though the same incident is listed and read through the issues API.
The GitLab issue route now accepts the incident segment, with or without
an incident tab after the number.
Claude Fable 5.2 in Claude Code, running in T3 Code.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
GitLab incident links will now be recognized as issue links. The change is small, reversible, and covered by a parsing test. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(gitlab): incident links are read as issue links" describes the main change: GitLab incident URLs (/-/issues/incident/) are now parsed as issue links by ISSUE_PATH. It follows conve…
Description check
The description follows the template. It has Problem, Change, Scope, and Verification sections with concrete content. Problem explains the bug and expected behavior. Change explains the ISSUE_PATH upd…
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 "fix(gitlab): incident links are read as issue links" describes the main change: GitLab incident URLs (/-/issues/incident/<iid>) are now parsed as issue links by ISSUE_PATH. It follows conventional commit format and matches the raw summary and objectives.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections with concrete content. Problem explains the bug and expected behavior. Change explains the ISSUE_PATH update. Scope justifies no separate issue and links related fixes. Verification lists the tests run, before/after results, and what was not checked. The template's optional agent-model line is present. Screenshots are not needed because the change has no UI diff.
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.
Environment: Linux web dev app, headless Chromium, 1280×800, dark theme, fresh isolated databases, Replay (dev), real synthetic GitLab incident and existing glab login. Links were seeded in a user message through the shared chat markdown renderer.
Steps: expand the message; click Incident (/issues/incident/1), Incident timeline (/issues/incident/1/timeline), then Issue control (/issues/1). On base, incident links stayed external and only the control opened an issue panel. On head, all three were issue preview triggers and opened the same loaded incident.
Direct agent read_issue behavior: outside MCP clients returned 'MCP credential does not grant the issues capability' on both commits; the replay thread credential was unavailable to the driver. Browser parsing, preview triggers, and issue-panel loading were verified for both incident URL forms.
Claude-generated assistant replies were not used; equivalent links were seeded in a user message rendered by the shared chat markdown component.
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 gives an incident (an issue of type
incident) its own address:https://gitlab.com/group/project/-/issues/incident/<iid>. That is the link GitLab's Incidents list puts on every row. T3 Code does not read it as an issue link:IssueService.resolveUrl), and a workflow given the link reports "Could not find the issue at …".resolveIssueLinkTargetreturnsnull.The same incident already works everywhere else in T3 Code: it is listed and read through the issues API, and its plain
/-/issues/<iid>address is recognised. Only this URL shape is missed, because the GitLab definition'sISSUE_PATHaccepts/-/issues/<iid>and/-/work_items/<iid>only.Change
ISSUE_PATHnow also accepts theincidentsegment betweenissuesand the number. An incident tab after the number (/timeline,/metrics,/alerts) is covered by the suffix the pattern already allowed.parseIssueUrlis the only place that matches GitLab issue URLs; the issue tools, workflows, and web and mobile chat links all go through it.Scope
A one-pattern fix for an obvious bug, so there is no separate issue. It is the same kind of fix as #40271 (a Forgejo URL shape) and #40436 (an Azure DevOps URL shape). I searched open and closed PRs and issues for GitLab incidents,
issues/incidentandISSUE_PATH; nothing covers this.Verification
I found this by collecting URL shapes GitLab emits today and running them through the GitLab definition.
config/routes/issues.rbdefinesissues/incident/:id(/:incident_tab), andincidents_list.vuebuilds each row's link from it.GET /api/v4/projects/gitlab-com%2Fgl-infra%2Fproduction/issues?iids[]=19934returns one row with"iid": 19934, "issue_type": "incident". That is the requestGitLabIssueTrackersends throughglab api, and its decoder accepts the payload.parseIssueUrl:parseIssueUrlgoing fromnullto the right project and number for incident URLs (plain, with a tab, a#noteanchor, a query string, self-managed hosts). Still refused:/-/issues/incidentwith no number,/incident/new,/incident/0,/incident/5x,/-/issues/incidents/5,/-/work_items/incident/5,/-/merge_requests/incident/5, and the same path on other forges' hosts. A project namedincidentparses as before.reads https://gitlab.com/acme/web/-/issues/incident/12 as an issue on its host: expected undefined to be 'gitlab') and passes here;sourceControlDefinitions.test.tspasses 33/33.vp run check:changedpasses: format, lint, knip, typecheck of 11 packages, and tests.glabread (I have noglabsign-in on this machine). The path pastparseIssueUrlwas read, not run, apart from the public API request above.Written by Claude Fable 5.2 in Claude Code, run from T3 Code.
🤖 Generated with Claude Code