The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 04:15 UTC
fix(server): a repository on an unrecognized host no longer fails every PR status lookup (#19030)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
AdEx-Partners-DE committed
Oct 18, 2026 at 21:16 UTC
e0de586a077cd8de5c95664ca7dc20f5c19a3503
2 files changed
+26
-6
apps/server/src/sourceControl/SourceControlProviderRegistry.test.ts
+15
@@ -207,6 +207,21 @@ it.effect("includes the request cwd when an unregistered provider is used", () =
207
}),
208
);
209
210
+it.effect("lists no change requests for a repository on an unrecognized host", () =>
211
+ Effect.gen(function* () {
212
+ const registry = yield* makeRegistry({
213
+ remotes: [{ name: "origin", url: "https://git.example.internal/team/repo.git" }],
214
+ });
215
+ const provider = yield* registry.resolve({ cwd: "/repo" });
216
+
217
+ assert.strictEqual(provider.kind, "unknown");
218
+ assert.deepStrictEqual(
219
+ yield* provider.listChangeRequests({ cwd: "/repo", headSelector: "master", state: "all" }),
220
+ [],
221
+ );
222
+ }),
223
+);
224
+
225
it.effect("retains VCS detection failures with structured cwd context", () =>
226
Effect.gen(function* () {
227
const cause = new VcsRepositoryDetectionError({
apps/server/src/sourceControl/SourceControlProviderRegistry.ts
+11
-6
@@ -74,13 +74,18 @@ function unsupportedProvider(
74
): SourceControlProvider.SourceControlProvider["Service"] {
75
return SourceControlProvider.SourceControlProvider.of({
76
kind,
77
+ // A remote on a host no provider recognizes (or no remote at all) has no change
78
+ // requests T3 could know about. Answering with none keeps the status poller from
79
+ // failing, and warning, on every refresh of such a repository.
80
listChangeRequests: (input) =>
78
- new SourceControlProviderError({
79
- provider: kind,
80
- operation: "listChangeRequests",
81
- cwd: input.cwd,
82
- detail: `No ${kind} source control provider is registered.`,
83
- }),
81
+ kind === "unknown"
82
+ ? Effect.succeed([])
83
+ : new SourceControlProviderError({
84
+ provider: kind,
85
+ operation: "listChangeRequests",
86
+ cwd: input.cwd,
87
+ detail: `No ${kind} source control provider is registered.`,
88
+ }),
89
getChangeRequest: (input) =>
90
new SourceControlProviderError({
91
provider: kind,