GeezerVison is showing github.com — fix(gitlab): mark threads outdated after their diff line changes by shivamhwp · Pull Request #30451 · pingdotgg/t3code
Conversation
shivamhwp
commented
Nov 3, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
[GPT-6.1 Sol][Codex] on behalf of shivam.
GitLab review threads stayed current after a push changed their line because the adapter always returned isOutdated: false. Closes #30422.
Compare each discussion's position refs with fresh merge-request diff refs, fetched alongside the discussions. Changed lines become outdated; untouched lines stay current. Missing or unreadable refs keep threads current, while authentication, missing-tool and rate-limit failures retain the existing error handling. This adds one uncached API request per activity read and leaves the detail cache and client contracts unchanged.
This qualifies for the focused obvious-bug exception in CONTRIBUTING.md: it restores the existing outdated-thread behavior for GitLab, with no new workflow or product-default change. Related implementation: #30423.
Verification at 72fe517d561e90231a310d705e7bb6e063a92faf, merged with main 25b53299b75d4d8d1d0667ad47e9cfed3749776e:
vp run check:changed 25b53299b75d4d8d1d0667ad47e9cfed3749776e exited 0 on corex Linux: format, lint, both knip passes, 11 affected package typechecks and 117 tests across 4 files. The complete GitLab package suite also exited 0: 10 files, 175 tests. Current CI checks.
- The existing discussion test fails on main and passes after the fix. It covers a push changing one thread's line, an untouched thread, incomplete positions, missing/malformed current refs, and propagation of critical CLI failures.
- Independent Codex review found an overly broad error fallback. That finding was fixed and independently rechecked. A fresh integration review at
72fe517 found no new issues and confirmed no test assertions were lost. No unresolved review findings remain.
- Linux web verification below uses real GitLab merge requests, positioned discussions and Git pushes through official
glab 1.128.0 and Git. Both the Timeline and Summary views show only the changed thread as outdated after refreshing the fixed build.
Before, main df0cc36dea0c36d155b39f58e33fef66b426be19: both threads start current. The terminal commits and pushes a change to line 5, leaving line 12 unchanged. After Refresh, both still appear current.
live-main-df0cc36.mp4

After, 8a773f0779887c68dbca16b6c25cd438c17feb8a: the equivalent push and Refresh mark line 5 Outdated while line 12 stays current.
live-fixed-8a773f0.mp4

Commit and capture provenance
Recorded on corex Linux in T3's Browser panel, Chrome 156, at 1440×900 CSS pixels. Both builds ran from source with vp run dev, separate isolated T3 homes, and clean source checkouts. The Replay provider only supplied the chat thread; GitLab responses, discussion positions and pushes were real.
The disposable self-hosted server was official GitLab CE 19.5.3, revision 0d4c9a9a2fa, image platform digest sha256:6863d156a1a477bd6f69fc674b671d0163cd8b06bf63bb17cc4a4a803b78b27c. Its manifest, config and layer SHA256 digests were verified. It used a disposable local account and HTTP over loopback. glab's API-host setting supplied port 51888.
| Build |
T3 source commit |
Capture UTC on 2026-11-05 |
Real GitLab MR |
| Before |
df0cc36dea0c36d155b39f58e33fef66b426be19 |
19:16:08.715 to 19:16:45.217 |
root/t3-outdated-verification!1 |
| After |
8a773f0779887c68dbca16b6c25cd438c17feb8a |
19:19:34.426 to 19:20:27.979 |
root/t3-outdated-verification!2 |
Both MRs started with source commit c129e7fec6ecb47ee75bd7a6253f4939c39d3fc6 and base/start commit a0a88e3cc6e5e34322b9b5f75a73a27614303e79. The real pushes produced ec279336e3d3cfa9b16ed03227def3ef5b8925d0 for the baseline MR and 2f6a36d5f8d19fb40dd6db19bc7572bec6406318 for the fixed MR. Only line 5 changed in each push.
After each push, glab api confirmed that the changed thread's position retained head c129e7fec6ecb47ee75bd7a6253f4939c39d3fc6, while the untouched thread's position advanced to its MR's new head. These are the refs the adapter compared. The recordings show the push output and explicit Refresh in the same Timeline view. The screenshots are the resulting states.
Base integration at 72fe517d561e90231a310d705e7bb6e063a92faf with main 25b53299b75d4d8d1d0667ad47e9cfed3749776e: retained upstream author-profile links, merge-message cleanup, and file/image review threads. The only conflict was in the discussion test. The resolution preserves the changed/untouched/incomplete-position cases and the upstream file/image path and null-line assertions. The GitLab package suite passes all 175 tests across 10 files on this tree. The listDiscussions function is byte-for-byte identical to the recorded 8a773f0 build, SHA256 fac1bc8eb16a321dcdfe851582c2e830ad24ddcbda5a4a09b7ffb96b5b3ecf83. The newly integrated discussion kinds have focused test coverage rather than a new recording.
Local output at the integrated head
corex Linux, source tree 72fe517d561e90231a310d705e7bb6e063a92faf
vp test run packages/source-control-gitlab/src/
Test Files 10 passed (10)
Tests 175 passed (175)
vp run check:changed 25b53299b75d4d8d1d0667ad47e9cfed3749776e
check:changed: 3 files since 25b53299b75d
pass format
pass lint
pass knip 1/2
pass knip 2/2
pass typecheck (11 packages)
pass test (4 files), 117 tests
exit 0
Not shown: hosted gitlab.com, native Electron and mobile clients, and remote/relay/tunnel connections. No client or contract code changed. A push between the concurrent reads can briefly classify against different revisions; the next refresh corrects it.
Implemented by Claude Opus 5.5 and GPT-6.1 Sol through T3 Code. Verified and reviewed by GPT-6.1 Sol through the Codex harness.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
macroscopeapp
Bot
commented
Nov 3, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 72fe517
Macroscope's review found this PR approvable — GitLab threads now use fresh diff revisions to identify outdated discussions after pushes. The change is read-only, preserves current status when revision data is unavailable, and does not alter stored comments or resolution state.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 3, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
GitLab discussion decoding now captures complete diff refs for each discussion. Discussion listing compares those refs with the current merge-request refs and marks threads outdated when any SHA differs. Tests cover ref changes, unavailable refs, and error handling.
Changes: GitLab discussion freshness
| Layer / File(s) |
Summary |
Decode discussion diff refs packages/source-control-gitlab/src/server/gitLabMergeRequestJson.ts |
The decoder accepts nullable position SHA fields and records complete baseSha, startSha, and headSha values by discussion ID. |
Compare refs when listing discussions packages/source-control-gitlab/src/server/GitLabPullRequestCli.ts, packages/source-control-gitlab/src/server/GitLabPullRequestCli.test.ts |
Discussion listing collects per-thread refs across pages and compares them with current merge-request refs. It marks a thread outdated when any SHA differs. Tests cover changed or unavailable refs and propagated CLI, authentication, and rate-limit errors. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Sequence Diagram(s)
sequenceDiagram
participant GitLabPullRequestCli
participant GitLabDiscussions
participant MergeRequestDetails
GitLabPullRequestCli->>GitLabDiscussions: Fetch and decode discussion pages
GitLabDiscussions-->>GitLabPullRequestCli: Return threads and diff refs by thread ID
GitLabPullRequestCli->>MergeRequestDetails: Read current merge-request diff refs
MergeRequestDetails-->>GitLabPullRequestCli: Return current base, start, and head SHAs
GitLabPullRequestCli->>GitLabPullRequestCli: Compare refs and mark outdated threads
Loading
Suggested reviewers: juliusmarminge
Merge Risk: Minimal · up to 72fe5
-
The change appears mergeable after normal checks; the supplied evidence identifies no actionable issue with marking changed GitLab discussion lines outdated.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly describes the GitLab outdated-thread fix. |
| Description check |
 |
The description covers the problem, change, scope, verification, and agent attribution. It omits the template's section headings; adding them would improve readability. |
| Linked Issues check |
 |
Issue #30422 requires GitLab threads on changed diff lines to become outdated and threads on untouched lines to stay current. GitLabPullRequestCli.ts reads current merge-request diff refs beside dis… |
| Out of Scope Changes check |
 |
The whole-PR diff changes only the GitLab discussion decoder, GitLab discussion listing logic, and its tests. The decoder stores position refs. The listing logic performs the required fresh ref read a… |
Full details: Linked Issues check
-
Explanation
Issue #30422 requires GitLab threads on changed diff lines to become outdated and threads on untouched lines to stay current. GitLabPullRequestCli.ts reads current merge-request diff refs beside discussions and compares baseSha, startSha, and headSha for each thread. gitLabMergeRequestJson.ts decodes the discussion position refs and preserves them across pagination. Missing or incomplete refs keep threads current. The updated test covers changed, untouched, file, image, and unreadable-reference cases. It also covers propagation of CLI-unavailable, authentication, and rate-limit failures. The existing isOutdated behavior therefore supplies the issue's mobile-diff exclusion.
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff changes only the GitLab discussion decoder, GitLab discussion listing logic, and its tests. The decoder stores position refs. The listing logic performs the required fresh ref read and applies the outdated flag. The tests support the issue behavior and required error handling. No unrelated client, contract, cache, or product-default changes are present.
Finishing Touches
-
Generate unit tests (beta)
-
- 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 8a773f0 and 72fe517.
Files selected for processing: 3
-
packages/source-control-gitlab/src/server/GitLabPullRequestCli.test.ts
packages/source-control-gitlab/src/server/GitLabPullRequestCli.ts
packages/source-control-gitlab/src/server/gitLabMergeRequestJson.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Closing: fixed on main by #30423.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
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.
|