Skip to content

fix(gitlab): incident links are read as issue links - #42605

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

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
Michel-Liao:fix/gitlab-incident-issue-links

Conversation

@Michel-Liao

Copy link
Copy Markdown
Contributor

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:

  • 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.

  • GitLab uses this URL shape. A live public incident: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/incident/19934. GitLab's config/routes/issues.rb defines issues/incident/:id(/:incident_tab), and incidents_list.vue builds each row's link from it.
  • 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.
  • Before and after, calling the real parseIssueUrl:
base (4e6b1fa771)
https://gitlab.com/gitlab-com/gl-infra/production/-/issues/19934
  -> {"forge":"gitlab","host":"gitlab.com","scope":"gitlab-com/gl-infra/production","key":"19934"}
https://gitlab.com/gitlab-com/gl-infra/production/-/issues/incident/19934
  -> null
https://gitlab.com/gitlab-com/gl-infra/production/-/issues/incident/19934/timeline
  -> null

this branch
https://gitlab.com/gitlab-com/gl-infra/production/-/issues/19934
  -> {"forge":"gitlab","host":"gitlab.com","scope":"gitlab-com/gl-infra/production","key":"19934"}
https://gitlab.com/gitlab-com/gl-infra/production/-/issues/incident/19934
  -> {"forge":"gitlab","host":"gitlab.com","scope":"gitlab-com/gl-infra/production","key":"19934"}
https://gitlab.com/gitlab-com/gl-infra/production/-/issues/incident/19934/timeline
  -> {"forge":"gitlab","host":"gitlab.com","scope":"gitlab-com/gl-infra/production","key":"19934"}
  • 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.

🤖 Generated with Claude 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>
@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 de9275b and ecfe1fa.

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 pattern now accepts issue paths with an /incident segment. A server test checks that an incident URL parses with issue key 12.

Changes: GitLab issue URL parsing

Layer / File(s) Summary
Incident issue path matching
packages/source-control-gitlab/src/shared/definition.ts, apps/server/src/sourceControl/sourceControlDefinitions.test.ts
ISSUE_PATH accepts an optional /incident segment. A server test checks that a GitLab incident URL parses with issue key 12.

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

Change: Bug fix

Suggested labels: bugfix

Suggested reviewers: juliusmarminge, macroscopeapp

Merge Risk: Minimal · previous review de927

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 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 "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
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 87479a6 and de9275b.

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

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.

Evidence Before — 6632511cd8 After — ecfe1fa513
Scenario Failed: preview triggers [false,false,true] Passed: [true,true,true]
Incident click Before: incident remains external After: loaded incident panel
Incident timeline click Before: timeline remains external After: timeline opens same incident
Control Before: control loads incident After: control loads incident
Recording Before recording After recording

Scenario driver · GitLab seed script

Not shown:

  • 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.

@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 03fa7cf 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
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Nov 25, 2026
**v0.1.12-nightly.20261125.5230** · 41 changes from 11 contributors

- **Richer workflow questions.** Workflow questions can include described choices, required reasons, links, and records of who answered and when.
- **Thread actions in command palette.** Pin, snooze, settle, archive, and manage the current thread from the command palette.
- **Withdraw workflow questions.** Workflows can withdraw waiting questions without cancelling the run.
- **Antigravity swarm workers.** See Antigravity swarm workers as subagents, including who is working and what they found.
- **Faster thread switching.** Thread timelines now appear in the first frame instead of after a noticeable delay.
- **Browser select menus.** Native dropdown menus now open in streamed browser tabs so you can choose an option.
- **Permanent thread deletion.** Deleting a thread now removes its conversation history instead of only hiding it.

### Plus 32 more bug fixes.

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(cli): exclude spans before the trace summary window by @jadelike-wine in pingdotgg/t3code#42571
* fix(grok): expose context usage by @gujunxiang in pingdotgg/t3code#42568
* fix(web): timeline minimap previews no longer cut an emoji in half by @only21mil in pingdotgg/t3code#42575
* fix(web): Option and Cmd arrows reach full-screen terminal apps by @Mnigos in pingdotgg/t3code#42574
* fix(web): element context preview no longer ends in a split surrogate by @only21mil in pingdotgg/t3code#42585
* fix(server): Antigravity sends undecodable text attachments as a path instead of failing the turn by @juliusmarminge in pingdotgg/t3code#42594
* fix(resource-monitor): Windows stops reading memory and command lines of untracked processes by @juliusmarminge in pingdotgg/t3code#42577
* fix(server): ODT attachments no longer start with text from number styles by @only21mil in pingdotgg/t3code#42592
* feat(server): workflow questions take described choices, required reasons, links, and keep who answered by @juliusmarminge in pingdotgg/t3code#42515
* fix(web): citation comment box stays open when its cited row scrolls out by @juliusmarminge in pingdotgg/t3code#42603
* fix(web,mobile): author avatars keep emoji initials whole by @only21mil in pingdotgg/t3code#42598
* fix(gitlab): incident links are read as issue links by @Michel-Liao in pingdotgg/t3code#42605
* fix(server): workflow schedules given as bigint nanoseconds no longer crash by @only21mil in pingdotgg/t3code#42607
* fix(pi): reject generated text from failed responses by @StiensWout in pingdotgg/t3code#42602
* fix(preview): streamed browser tabs show native select menus by @juliusmarminge in pingdotgg/t3code#31561
* fix(web): long Workflows links no longer end in a broken character by @only21mil in pingdotgg/t3code#42617
* fix(server): filter open device sessions by the selected host by @AppsAtMe in pingdotgg/t3code#42600
* fix(antigravity): link directly to Google account verification on failed turns by @t3dotgg in pingdotgg/t3code#41210
* fix(server): Needs you lists paused runs older than the newest 500 by @KyrosHendrix in pingdotgg/t3code#42618
* feat(server): CI runners don't need telemetry by @t3dotgg in pingdotgg/t3code#42630
* fix: screenshots after a caption render full size instead of as chips by @juliusmarminge in pingdotgg/t3code#42627
* fix(pi): rewind turns after an extension switches sessions by @StiensWout in pingdotgg/t3code#42616
* fix(mobile): Compose without a project opens the picker in one push by @juliusmarminge in pingdotgg/t3code#42593
* fix(web): project name field restores the saved name when cleared by @only21mil in pingdotgg/t3code#42622
* fix(mobile): a share sent while a new-task draft is open joins that draft by @juliusmarminge in pingdotgg/t3code#42597
* fix(telemetry): honor DO_NOT_TRACK by @t3dotgg in pingdotgg/t3code#42629
* fix(server): device host errors no longer cut an emoji in half by @only21mil in pingdotgg/t3code#42628
* fix(pi): let background subagents finish after coordinator errors by @StiensWout in pingdotgg/t3code#42624
* fix(server): deleting a thread actually removes its history by @t3dotgg in pingdotgg/t3code#42119
* fix(server): unreadable sessions no longer block older history by @StiensWout in pingdotgg/t3code#42613
* fix(server): skip incomplete Pi records during project discovery by @StiensWout in pingdotgg/t3code#42636
* fix(server): restore the default provider name when clearing a label by @StiensWout in pingdotgg/t3code#42632
* test(provider-testing): replay workspaces start no background git maintenance by @juliusmarminge in pingdotgg/t3code#42651
* fix(antigravity): /swarm workers show as subagents by @t3dotgg in pingdotgg/t3code#42649
* feat(web): settle, pin, snooze and more for the current thread from cmd+k by @t3dotgg in pingdotgg/t3code#40742
* feat(server): withdraw a waiting workflow question without cancelling its run by @juliusmarminge in pingdotgg/t3code#42506
* fix(web): fade project picker tooltips in place on scroll by @Yash-Singh1 in pingdotgg/t3code#42657
* fix(server): shells with a backslash in their name no longer get zsh flags on Linux and macOS by @only21mil in pingdotgg/t3code#42648
* perf(web): thread switches paint the timeline in their first frame by @juliusmarminge in pingdotgg/t3code#42582
* fix(server): t3_background_wait error says Workflow runs already keep the thread working by @juliusmarminge in pingdotgg/t3code#42661
* fix(server): preserve spaces and tabs in checkpoint LFS storage by @jadelike-wine in pingdotgg/t3code#42634

## New Contributors
* @gujunxiang made their first contribution in pingdotgg/t3code#42568
* @AppsAtMe made their first contribution in pingdotgg/t3code#42600

**Full Changelog**: pingdotgg/t3code@v0.1.12-nightly.20261125.5222...v0.1.12-nightly.20261125.5230

</details>


Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.12-nightly.20261125.5230
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