@devries-cameron20 / t3code-1 / commits / 2131698181
Fork 0

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

feat(mobile): pull request menu can copy or share the link (#21250)

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

Julius Marminge committed Oct 18, 2026 at 11:28 UTC 2131698181bd48a1d227553b9aa9e9c9fc9dd5fa
4 files changed +56 -14
apps/mobile/src/components/ui/AppSymbol.tsx
+2
@@ -103,6 +103,7 @@ import IconPlus from "@tabler/icons-react-native/IconPlus";
103 import IconQrcode from "@tabler/icons-react-native/IconQrcode";
104 import IconRefresh from "@tabler/icons-react-native/IconRefresh";
105 import IconSearch from "@tabler/icons-react-native/IconSearch";
106 +import IconShare from "@tabler/icons-react-native/IconShare";
107 import IconServer from "@tabler/icons-react-native/IconServer";
108 import IconSettings from "@tabler/icons-react-native/IconSettings";
109 import IconSparkles from "@tabler/icons-react-native/IconSparkles";
@@ -244,6 +245,7 @@ const ANDROID_ICON_BY_SF_SYMBOL = {
245 "sidebar.left": IconLayoutSidebar,
246 "sidebar.right": IconLayoutSidebarRight,
247 "slider.horizontal.3": IconAdjustmentsHorizontal,
248 + "square.and.arrow.up": IconShare,
249 "square.and.pencil": IconEdit,
250 "square.on.square": IconCopy,
251 "square.grid.2x2": IconApps,
apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx
+32 -6
@@ -48,6 +48,7 @@ import { useAtomRefresh } from "@effect/atom-react";
48 import { pullRequestReviewKey } from "./pullRequestReviewDrafts";
49 import { type PullRequestDetail, type PullRequestListEntry } from "@t3tools/contracts";
50 import { PullRequestOverviewLoading } from "./PullRequestOverviewLoading";
51 +import { copyPullRequestLink, sharePullRequestLink } from "./pullRequestLink";
52 import { pullRequestStatus } from "./pullRequestStatus";
53 import { useCallback, useEffect, useMemo, useRef, useState } from "react";
54 import {
@@ -420,12 +421,24 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
421 },
422 ]
423 : []),
423 - ...(pr
424 + ...(identity
425 ? [
426 {
426 - accessibilityLabel: openOnProviderLabel(pr.provider),
427 + accessibilityLabel: openOnProviderLabel(identity.provider),
428 icon: "arrow.up.right" as const,
428 - onPress: () => void Linking.openURL(pr.url),
429 + onPress: () => void Linking.openURL(identity.url),
430 + },
431 + {
432 + accessibilityLabel: "Copy link",
433 + icon: "link" as const,
434 + overflowOnly: true,
435 + onPress: () => copyPullRequestLink(identity),
436 + },
437 + {
438 + accessibilityLabel: "Share…",
439 + icon: "square.and.arrow.up" as const,
440 + overflowOnly: true,
441 + onPress: () => sharePullRequestLink(identity),
442 },
443 ]
444 : []),
@@ -470,12 +483,25 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
483 <Toolbar.Label>Add comment</Toolbar.Label>
484 </Toolbar.MenuAction>
485 ) : null}
473 - {pr ? (
486 + {identity ? (
487 <Toolbar.MenuAction
488 icon="arrow.up.right"
476 - onPress={() => void Linking.openURL(pr.url)}
489 + onPress={() => void Linking.openURL(identity.url)}
490 + >
491 + <Toolbar.Label>{openOnProviderLabel(identity.provider)}</Toolbar.Label>
492 + </Toolbar.MenuAction>
493 + ) : null}
494 + {identity ? (
495 + <Toolbar.MenuAction icon="link" onPress={() => copyPullRequestLink(identity)}>
496 + <Toolbar.Label>Copy link</Toolbar.Label>
497 + </Toolbar.MenuAction>
498 + ) : null}
499 + {identity ? (
500 + <Toolbar.MenuAction
501 + icon="square.and.arrow.up"
502 + onPress={() => sharePullRequestLink(identity)}
503 >
478 - <Toolbar.Label>{openOnProviderLabel(pr.provider)}</Toolbar.Label>
504 + <Toolbar.Label>Share…</Toolbar.Label>
505 </Toolbar.MenuAction>
506 ) : null}
507 {showsDeleteBranch ? (
apps/mobile/src/features/pull-requests/pullRequestLink.ts new
+18
@@ -0,0 +1,18 @@
1 +import { Platform, Share } from "react-native";
2 +import { copyTextWithHaptic } from "../../lib/copyTextWithHaptic";
3 +
4 +interface PullRequestLink {
5 + readonly url: string;
6 + readonly title: string;
7 +}
8 +
9 +export function copyPullRequestLink(pr: PullRequestLink) {
10 + copyTextWithHaptic(pr.url, { target: "pull request link" });
11 +}
12 +
13 +export function sharePullRequestLink(pr: PullRequestLink) {
14 + // Android ignores `url`; iOS turns a `message` URL into plain text instead of a link preview.
15 + Share.share(
16 + Platform.OS === "ios" ? { url: pr.url, title: pr.title } : { message: pr.url, title: pr.title },
17 + ).catch((cause: unknown) => console.error("Failed to share pull request link.", cause));
18 +}
apps/mobile/src/features/pull-requests/usePullRequestListActions.ts
+4 -8
@@ -3,10 +3,9 @@ import { RegistryContext, useAtomValue } from "@effect/atom-react";
3 import { useNavigation } from "@react-navigation/native";
4 import { executeAtomQuery, squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime";
5 import type { EnvironmentId, PullRequestAction } from "@t3tools/contracts";
6 -import * as Clipboard from "expo-clipboard";
6 import { Atom } from "effect/reactivity";
7 import { use, useCallback, useMemo, useRef, useState } from "react";
9 -import { Linking, Platform, Share } from "react-native";
8 +import { Linking, Platform } from "react-native";
9 import type { MenuProps } from "../../components/ui/Menu.types";
10 import { composerPullRequests } from "../../state/pull-requests";
11 import { useAtomCommand } from "../../state/use-atom-command";
@@ -16,6 +15,7 @@ import {
15 PR_ACTION_LABELS,
16 } from "./pullRequestActions";
17 import { scopedPullRequestListKey, type EnvironmentPullRequestListEntry } from "./pullRequestList";
18 +import { copyPullRequestLink, sharePullRequestLink } from "./pullRequestLink";
19 import { pullRequestTarget } from "./usePullRequestDiff";
20 import { useAndroidWorkspaceSelection } from "../workspace/useAndroidWorkspaceSelection";
21
@@ -122,7 +122,7 @@ export function usePullRequestListActions(
122 return;
123 }
124 if (action === "copy") {
125 - void Clipboard.setStringAsync(entry.url);
125 + copyPullRequestLink(entry);
126 return;
127 }
128 if (action === "provider") {
@@ -130,11 +130,7 @@ export function usePullRequestListActions(
130 return;
131 }
132 if (action === "share") {
133 - void Share.share(
134 - Platform.OS === "ios"
135 - ? { url: entry.url, title: entry.title }
136 - : { message: entry.url, title: entry.title },
137 - );
133 + sharePullRequestLink(entry);
134 return;
135 }
136 const supported = (["close", "reopen", "ready", "draft"] as const).find(