fix(pull-requests): route self-hosted GitLab remotes - #6061
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR introduces new runtime behavior: projects previously marked as "unknown" provider now undergo active refinement via network calls to detect self-hosted GitLab instances. While well-tested, this changes the processing flow for pull request listing and enables routing to previously-unused code paths. You can customize Macroscope's approvability policy. Learn more. |
## What's Changed * fix(pull-requests): route self-hosted GitLab remotes by @GuilhermeVieiraDev in pingdotgg/t3code#6061 **Full Changelog**: pingdotgg/t3code@v0.0.34-nightly.20260811.1064...v0.0.34-nightly.20260811.1067 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.34-nightly.20260811.1067
Brings in 7 upstream commits, including two that touch the same code as the pinned-reorder work: Copy Thread ID in the thread context menu (pingdotgg#5574) and shift+click new-thread-in-project (pingdotgg#5994). Merged clean, no conflicts. Also picks up the hourly past-24h usage view (pingdotgg#6170), the GitLab self-hosted remote routing fix (pingdotgg#6061), mobile composer stabilisation (pingdotgg#5986), the App Store release version guard (pingdotgg#6177), and the typography font-size default restore (pingdotgg#6172). pnpm-workspace.yaml, pnpm-lock.yaml and four patches/ files changed, so this needs a fresh install before it builds.
What Changed
Why
Self-hosted GitLab repositories were recorded as unknown and could not be routed to the GitLab pull request provider. This change detects the provider from the repository remote and refines it using the matching remote context, allowing merge requests to be listed correctly without selecting a different configured remote.
UI Changes
Before:

After:

Checklist
Note
Medium Risk
Changes how pull request hosts are resolved for unknown providers and extends source-control handle resolution; behavior is localized to listing/workspace classification with new tests, but incorrect refinement could mis-route API calls to the wrong provider.
Overview
Self-hosted GitLab repos that were stored with provider
unknowncan now show up on the pull request list by resolving the real host kind from each project's remote before workspace projects are classified.Pull request listing runs a new
refineUnknownProjectKindsstep (deduped per provider base URL, concurrent with existing repo limits) that callsSourceControlProviderRegistry.resolveHandlewith the project'sremoteUrl/remoteName. Resolved kinds replaceunknownwhen picking the pull request provider, so merge requests go through GitLab instead of staying unimplemented.Source control registry:
resolveHandleaccepts an optionalcontext. With context, it refines that caller-chosen remote viarefineUnknownRemoteProviderinstead of the cwd detection cache—which could pick a different configured remote (e.g.originon GitHub whileupstreamis self-hosted GitLab).Wiring:
PullRequestServiceLivenow providesSourceControlProviderRegistryLayerLive. Tests cover self-hosted GitLab list refinement and remote-preserving handle resolution.Reviewed by Cursor Bugbot for commit 9d71b19. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix routing for self-hosted GitLab remotes in pull request service
SourceControlProviderRegistry.SourceControlProviderRegistry.resolveHandleto accept an optionalSourceControlProviderContext, bypassing the cache and running provider refinement against the supplied context instead of auto-detecting.SourceControlProviderRegistryLayerLiveinto thePullRequestServicelayer composition in server.ts.📊 Macroscope summarized 9d71b19. 3 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.