The best way to control Claude Code, Codex and more from any computer or phone
refactor(mobile): share pull request actions (#21944)
Julius Marminge committed
Oct 19, 2026 at 15:04 UTC
2fa1cb43b72a96d67bba81a81871849af0e2776b
6 files changed
+34
-67
apps/mobile/src/features/pull-requests/PullRequestFiles.tsx
+6
-13
@@ -1,4 +1,3 @@
1
-import { AppActivityIndicator } from "../../components/ui/AppActivityIndicator";
1
import { PullRequestSectionHeading } from "./PullRequestSectionHeading";
2
import { AnimatedLegendList } from "@legendapp/list/reanimated";
3
import Animated from "react-native-reanimated";
@@ -256,19 +255,13 @@ export function usePullRequestFilesContent(props: {
255
footer: (
256
<>
257
{result.nextCursor ? (
259
- <Pressable
258
+ <Button
259
+ label={result.error ? "Retry loading files" : "Load more files"}
260
+ tone="secondary"
261
onPress={result.error ? result.refresh : result.loadMore}
261
- accessibilityRole="button"
262
- className="min-h-11 items-center justify-center rounded-xl bg-grouped-card px-4 py-3"
263
- >
264
- {result.isPending ? (
265
- <AppActivityIndicator />
266
- ) : (
267
- <Text className="text-sm font-t3-medium">
268
- {result.error ? "Retry loading files" : "Load more files"}
269
- </Text>
270
- )}
271
- </Pressable>
262
+ loading={result.isPending}
263
+ fullWidth
264
+ />
265
) : null}
266
{viewed.error ? (
267
<Text className="py-2 text-xs text-danger-foreground">{viewed.error}</Text>
apps/mobile/src/features/pull-requests/PullRequestMergeControls.tsx
+1
-7
@@ -280,13 +280,7 @@ export function PullRequestMergeControls(props: {
280
</Text>
281
) : null}
282
{stack.error && stack.supportsStackActions ? (
283
- <Pressable
284
- accessibilityRole="button"
285
- onPress={stack.refresh}
286
- className="min-h-11 justify-center px-1"
287
- >
288
- <Text className="text-sm text-primary-text">Retry stack lookup</Text>
289
- </Pressable>
283
+ <Button label="Retry stack lookup" tone="text" onPress={stack.refresh} />
284
) : null}
285
</View>
286
);
apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx
+3
-7
@@ -1213,13 +1213,9 @@ export function PullRequestFileRouteScreen({
1213
</View>
1214
) : null}
1215
{result.error && result.nextCursor ? (
1216
- <Pressable
1217
- accessibilityRole="button"
1218
- onPress={result.refresh}
1219
- className="min-h-11 items-center justify-center py-2"
1220
- >
1221
- <Text className="text-sm font-t3-medium">Retry loading remaining files</Text>
1222
- </Pressable>
1216
+ <View className="self-center">
1217
+ <Button label="Retry loading remaining files" tone="text" onPress={result.refresh} />
1218
+ </View>
1219
) : null}
1220
{parsed.kind === "files" && parsed.notice ? (
1221
<Text className="px-4 py-2 text-2xs text-foreground-muted">{parsed.notice}</Text>
apps/mobile/src/features/pull-requests/PullRequestsScreen.tsx
+8
-9
@@ -1,3 +1,4 @@
1
+import { Button } from "../../components/ui/Button";
2
import {
3
applyPullRequestDraftFilterChange,
4
parsePullRequestQuery,
@@ -10,7 +11,6 @@ import { useAtomValue } from "@effect/atom-react";
11
import {
12
Keyboard,
13
Platform,
13
- Pressable,
14
RefreshControl,
15
ScrollView,
16
View,
@@ -327,15 +327,14 @@ export function PullRequestsScreen(
327
/>
328
</View>
329
) : result.loadMoreError ? (
330
- <Pressable
331
- accessibilityRole="button"
332
- accessibilityLabel="Retry loading more pull requests"
333
- onPress={() => void result.loadMore(true)}
334
- className="items-center gap-2 px-8 py-4"
335
- >
330
+ <View className="items-center gap-2 px-8 py-4">
331
<Text className="text-xs text-foreground-muted">{result.loadMoreError}</Text>
337
- <Text className="text-sm font-t3-medium text-link">Try again</Text>
338
- </Pressable>
332
+ <Button
333
+ label="Try again"
334
+ accessibilityLabel="Retry loading more pull requests"
335
+ onPress={() => void result.loadMore(true)}
336
+ />
337
+ </View>
338
) : undefined
339
}
340
ListEmptyComponent={
apps/mobile/src/features/pull-requests/guide/GuideNotice.tsx
+12
-23
@@ -1,4 +1,5 @@
1
-import { Pressable, View } from "react-native";
1
+import { Button } from "../../../components/ui/Button";
2
+import { View } from "react-native";
3
import Animated, { FadeIn, ReduceMotion } from "react-native-reanimated";
4
import { AppText as Text } from "../../../components/ui/AppText";
5
import { SymbolView } from "../../../components/ui/AppSymbol";
@@ -40,28 +41,16 @@ export function GuideNotice({ state }: { readonly state: ReturnType<typeof useRe
41
</View>
42
<View className="min-h-12 flex-row items-center justify-between gap-3">
43
{state.canWrite || busy || notice.kind === "unavailable" ? (
43
- <Pressable
44
- accessibilityRole="button"
45
- accessibilityState={{ disabled: busy, busy }}
46
- disabled={busy}
47
- style={{ width: 152 }}
48
- className={
49
- compact
50
- ? "min-h-12 items-center justify-center rounded-full bg-secondary px-4 active:opacity-70"
51
- : "min-h-12 items-center justify-center rounded-full bg-foreground px-4 active:opacity-70"
52
- }
53
- onPress={() => (notice.kind === "unavailable" ? state.refresh() : void state.write())}
54
- >
55
- <Text
56
- className={
57
- compact
58
- ? "text-center font-t3-medium text-secondary-foreground"
59
- : "text-center font-t3-medium text-screen"
60
- }
61
- >
62
- {notice.action}
63
- </Text>
64
- </Pressable>
44
+ <View className="w-40">
45
+ <Button
46
+ label={notice.action}
47
+ tone={compact ? "secondary" : "contrast"}
48
+ disabled={busy}
49
+ onPress={() => (notice.kind === "unavailable" ? state.refresh() : void state.write())}
50
+ fullWidth
51
+ loading={busy}
52
+ />
53
+ </View>
54
) : (
55
<Text className="text-xs text-foreground-muted">
56
{notice.kind === "failed"
apps/mobile/src/features/pull-requests/guide/GuideOutline.tsx
+4
-8
@@ -1,3 +1,4 @@
1
+import { Button } from "../../../components/ui/Button";
2
import type { PullRequestReviewGuide } from "@t3tools/contracts";
3
import { stopFilePaths } from "@t3tools/client-runtime/review-guide-tour";
4
import { Pressable, View } from "react-native";
@@ -100,14 +101,9 @@ export function GuideOutline({
101
);
102
})}
103
{guide.stops.length ? (
103
- <Pressable
104
- accessibilityRole="button"
105
- onPress={() => onOpen(0)}
106
- className="min-h-11 flex-row items-center justify-end gap-2 active:opacity-60"
107
- >
108
- <Text className="text-sm font-t3-medium">Start tour</Text>
109
- <SymbolView name="arrow.right" size={17} tintColorClassName="accent-foreground" />
110
- </Pressable>
104
+ <View className="self-end">
105
+ <Button label="Start tour" tone="text" onPress={() => onOpen(0)} icon="arrow.right" />
106
+ </View>
107
) : null}
108
</View>
109
);