@devries-cameron20 / t3code-1 / commits / 02329327c6
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(clients): prompt links find projects cloned from git.cafe (#26042)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 27, 2026 at 12:21 UTC 02329327c64f524df1b6ea8d2d1817637e7f797e
2 files changed +19 -4
packages/client-runtime/src/promptLinks.test.ts
+13
@@ -39,6 +39,19 @@ describe("findPromptLinkProjects", () => {
39 expect(ids("me", "t3code")).toEqual(["fork"]);
40 expect(ids("gitlab", "x")).toEqual([]);
41 });
42 +
43 + it("matches a checkout of the repository's GitCafe mirror", () => {
44 + const projects = [
45 + { id: "gitcafe", repositoryIdentity: identity("git.cafe/pingdotgg/t3code") },
46 + { id: "staging", repositoryIdentity: identity("staging.git.cafe/pingdotgg/t3code") },
47 + { id: "gitlab", repositoryIdentity: identity("gitlab.com/pingdotgg/t3code") },
48 + ];
49 + expect(
50 + findPromptLinkProjects(projects, { owner: "pingdotgg", name: "t3code" }).map(
51 + (project) => project.id,
52 + ),
53 + ).toEqual(["gitcafe", "staging"]);
54 + });
55 });
56
57 describe("pickPromptLinkPullRequestThread", () => {
packages/client-runtime/src/promptLinks.ts
+6 -4
@@ -18,8 +18,9 @@ import {
18 visibleThreadPullRequests,
19 } from "./threadPullRequests.ts";
20
21 -const repositoryKey = (repository: PromptLinkRepository) =>
22 - `github.com/${repository.owner}/${repository.name}`.toLowerCase();
21 +// A link's `owner/name` is GitHub's. GitCafe syncs a repository two-way with GitHub under the
22 +// same path, so a checkout cloned from git.cafe counts as the linked repository.
23 +const PROMPT_LINK_REPOSITORY_HOSTS = ["github.com", "git.cafe", "staging.git.cafe"];
24
25 /**
26 * The repository's projects in the order given. Callers pass projects most recently active
@@ -28,11 +29,12 @@ const repositoryKey = (repository: PromptLinkRepository) =>
29 export function findPromptLinkProjects<
30 P extends { readonly repositoryIdentity?: RepositoryIdentity | null | undefined },
31 >(projects: ReadonlyArray<P>, repository: PromptLinkRepository): P[] {
31 - const key = repositoryKey(repository);
32 + const path = `${repository.owner}/${repository.name}`.toLowerCase();
33 + const keys = new Set(PROMPT_LINK_REPOSITORY_HOSTS.map((host) => `${host}/${path}`));
34 return projects.filter(
35 (project) =>
36 project.repositoryIdentity != null &&
35 - repositoryGroupingKeyOf(project.repositoryIdentity).toLowerCase() === key,
37 + keys.has(repositoryGroupingKeyOf(project.repositoryIdentity).toLowerCase()),
38 );
39 }
40