The best way to control Claude Code, Codex and more from any computer or phone
feat(mobile): native-sized pull request action bar (#18527)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 11, 2026 at 22:30 UTC
462e7f4de4fd4ae14d2b4439fd983fa9ced2790e
8 files changed
+29
-63
apps/mobile/deps/react-native-screens-5.0.0-t3.26.tgz
Binary files a/apps/mobile/deps/react-native-screens-5.0.0-t3.26.tgz and /dev/null differ
apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz
Binary files /dev/null and b/apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz differ
apps/mobile/package.json
+1
-1
@@ -126,7 +126,7 @@
126
"react-native-keyboard-controller": "1.22.6",
127
"react-native-reanimated": "4.7.0",
128
"react-native-safe-area-context": "~5.9.1",
129
- "react-native-screens": "file:deps/react-native-screens-5.0.0-t3.26.tgz",
129
+ "react-native-screens": "file:deps/react-native-screens-5.0.0-t3.27.tgz",
130
"react-native-shiki-engine": "^0.3.12",
131
"react-native-svg": "15.15.5",
132
"react-native-webview": "14.0.1",
apps/mobile/src/features/pull-requests/PullRequestControls.tsx
+15
-32
@@ -4,7 +4,7 @@ import { useNavigation } from "@react-navigation/native";
4
import type { PullRequestDetail } from "@t3tools/contracts";
5
import type { ReactNode } from "react";
6
import { Platform, Pressable, View } from "react-native";
7
-import { useSafeAreaFrame, useSafeAreaInsets } from "react-native-safe-area-context";
7
+import { useSafeAreaInsets } from "react-native-safe-area-context";
8
import { AppText as Text } from "../../components/AppText";
9
import { SymbolView, type AppSymbolName } from "../../components/AppSymbol";
10
import { MaterialButton } from "../../components/MaterialButton";
@@ -12,10 +12,7 @@ import { MaterialIconButton } from "../../components/MaterialIconButton";
12
import { MaterialFloatingToolbar } from "./MaterialFloatingToolbar";
13
import { ControlPillMenu } from "../../components/ControlPillMenu";
14
import { NativeHeaderToolbar } from "../../native/StackHeader";
15
-import {
16
- useNativeColumnLayoutMetrics,
17
- useNativeLayoutMetrics,
18
-} from "../../native/native-layout-metrics";
15
+import { useNativeLayoutMetrics } from "../../native/native-layout-metrics";
16
import { type PullRequestParams } from "./usePullRequestDiff";
17
import { usePullRequestPermissions } from "./usePullRequestPermissions";
18
import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
@@ -117,8 +114,6 @@ export function PullRequestActionToolbar(props: {
114
const { draft } = usePullRequestReviewDraft(props.params);
115
const { themeVariables: colors } = useAppearancePreferences();
116
const insets = useSafeAreaInsets();
120
- const frame = useSafeAreaFrame();
121
- const columnMetrics = useNativeColumnLayoutMetrics();
117
const nativeMetrics = useNativeLayoutMetrics();
118
const verticalControls = nativeMetrics !== null && nativeMetrics.verticalBarEdge !== "none";
119
const permissions = usePullRequestPermissions(props.params, props.pr);
@@ -140,20 +135,6 @@ export function PullRequestActionToolbar(props: {
135
if (!props.pr) return null;
136
const primaryDisabled = pendingReview ? false : agent.disabled;
137
const showPrimary = pendingReview || canOpenThread;
143
- // Match the native phone tab controls; the side rail keeps intrinsic sizing.
144
- const controlSize = verticalControls ? undefined : 60;
145
- // Reserve the native outer margins, custom-button padding, and item gaps.
146
- // UIKit needs this space to keep every action out of its overflow menu.
147
- // Duo's side rail uses an intrinsic icon item instead.
148
- const sideControls = Number(showAgentControls) + 1;
149
- const primaryWidth = verticalControls
150
- ? undefined
151
- : Math.max(
152
- 0,
153
- (columnMetrics?.width ?? frame.width - insets.left - insets.right) -
154
- 58 -
155
- sideControls * (60 + 10 + 16),
156
- );
138
if (Platform.OS === "android") {
139
const primary = (
140
<MaterialButton
@@ -230,8 +211,6 @@ export function PullRequestActionToolbar(props: {
211
title={primaryLabel}
212
accessibilityLabel={primaryLabel}
213
variant="prominent"
233
- width={primaryWidth}
234
- height={controlSize}
214
icon={
215
verticalControls
216
? pendingReview
@@ -251,8 +230,6 @@ export function PullRequestActionToolbar(props: {
230
label={primaryLabel}
231
accessibilityLabel={primaryLabel}
232
variant="prominent"
254
- width={primaryWidth}
255
- height={controlSize}
233
icon={
234
verticalControls
235
? pendingReview
@@ -270,8 +247,6 @@ export function PullRequestActionToolbar(props: {
247
const agentControl = showAgentControls ? (
248
<NativeHeaderToolbar.Menu
249
identifier="pull-request-agent"
273
- width={controlSize}
274
- height={controlSize}
250
icon="sparkles"
251
title="AI helpers"
252
accessibilityLabel="PR agent actions"
@@ -310,19 +285,27 @@ export function PullRequestActionToolbar(props: {
285
const filesControl = (
286
<NativeHeaderToolbar.Button
287
identifier="workspace-trailing-action"
313
- width={controlSize}
314
- height={controlSize}
288
icon={{ type: "image", source: require("../../../assets/icons/file-diff.png") }}
289
accessibilityLabel="Changed files"
290
onPress={openFiles}
291
separateBackground
292
/>
293
);
294
+ if (verticalControls)
295
+ return (
296
+ <NativeHeaderToolbar placement="bottom">
297
+ {filesControl}
298
+ {agentControl}
299
+ {primaryControl}
300
+ </NativeHeaderToolbar>
301
+ );
302
return (
303
<NativeHeaderToolbar placement="bottom">
323
- {verticalControls ? filesControl : agentControl}
324
- {verticalControls ? agentControl : primaryControl}
325
- {verticalControls ? primaryControl : filesControl}
304
+ {agentControl}
305
+ <NativeHeaderToolbar.Spacer flexible />
306
+ {primaryControl}
307
+ <NativeHeaderToolbar.Spacer flexible />
308
+ {filesControl}
309
</NativeHeaderToolbar>
310
);
311
}
apps/mobile/src/native/NativeHeaderToolbar.tsx
+1
-11
@@ -41,9 +41,7 @@ type NativeStackHeaderAxisBehavior = Extract<
41
NativeStackHeaderItem,
42
{ type: "button" }
43
>["axisBehavior"];
44
-type NativeToolbarItem =
45
- | (NativeStackHeaderItem & { readonly height?: number })
46
- | HeaderBarButtonSearchBarPlacementItem;
44
+type NativeToolbarItem = NativeStackHeaderItem | HeaderBarButtonSearchBarPlacementItem;
45
type NativeStackOptionsWithToolbar = NativeStackNavigationOptions & {
46
unstable_headerToolbarItems?: () => NativeToolbarItem[];
47
};
@@ -162,8 +160,6 @@ function convertToolbarChild(child: ReactNode): NativeToolbarItem | null {
160
: () => undefined,
161
sharesBackground: !child.props.separateBackground,
162
tintColor: child.props.tintColor as ColorValue | undefined,
165
- width: typeof child.props.width === "number" ? child.props.width : undefined,
166
- height: typeof child.props.height === "number" ? child.props.height : undefined,
163
variant:
164
child.props.variant === "done" || child.props.variant === "prominent"
165
? child.props.variant
@@ -189,8 +185,6 @@ function convertToolbarChild(child: ReactNode): NativeToolbarItem | null {
185
},
186
sharesBackground: !child.props.separateBackground,
187
tintColor: child.props.tintColor as ColorValue | undefined,
192
- width: typeof child.props.width === "number" ? child.props.width : undefined,
193
- height: typeof child.props.height === "number" ? child.props.height : undefined,
188
variant:
189
child.props.variant === "done" || child.props.variant === "prominent"
190
? child.props.variant
@@ -289,8 +283,6 @@ function NativeHeaderToolbarButton(_props: {
283
readonly tintColor?: ColorValue;
284
readonly variant?: "plain" | "done" | "prominent";
285
readonly identifier?: string;
292
- readonly width?: number;
293
- readonly height?: number;
286
}) {
287
return null;
288
}
@@ -308,8 +300,6 @@ function NativeHeaderToolbarMenu(_props: {
300
readonly tintColor?: ColorValue;
301
readonly title?: string;
302
readonly variant?: "plain" | "done" | "prominent";
311
- readonly width?: number;
312
- readonly height?: number;
303
}) {
304
return null;
305
}
apps/mobile/src/native/V5StackHeader.ios.tsx
+2
-9
@@ -21,7 +21,7 @@ import {
21
22
type HeaderItem = NonNullable<NonNullable<StackHeaderConfigProps["ios"]>["leadingItems"]>[number];
23
type ToolbarItem =
24
- | (NativeStackHeaderItem & { readonly height?: number })
24
+ | NativeStackHeaderItem
25
| HeaderBarButtonMailSearchToolbarItem
26
| HeaderBarButtonSearchBarPlacementItem;
27
type Options = NativeStackNavigationOptions & {
@@ -91,10 +91,7 @@ function convertMenu(menu: MenuInput, id: string): StackHeaderMenuIOS {
91
return { id, type: "menu", title: menu.title, children };
92
}
93
94
-function convertItems(
95
- items: (NativeStackHeaderItem & { readonly height?: number })[],
96
- prefix: string,
97
-): HeaderItem[] {
94
+function convertItems(items: NativeStackHeaderItem[], prefix: string): HeaderItem[] {
95
return items.map((item, index): HeaderItem => {
96
const id =
97
item.type === "spacing" ? `${prefix}:${index}` : (item.identifier ?? `${prefix}:${index}`);
@@ -121,8 +118,6 @@ function convertItems(
118
menu: item.disabled ? undefined : convertMenu(item.menu, `${id}:menu`),
119
variant: item.variant,
120
tintColor: item.tintColor,
124
- width: item.width,
125
- height: item.height,
121
hidesSharedBackground: item.hidesSharedBackground,
122
};
123
case "button":
@@ -136,8 +131,6 @@ function convertItems(
131
onPress: item.disabled ? undefined : item.onPress,
132
variant: item.variant,
133
tintColor: item.tintColor,
139
- width: item.width,
140
- height: item.height,
134
hidesSharedBackground: item.hidesSharedBackground,
135
};
136
}
docs/operations/mobile-screens-fork.md
+1
-1
@@ -1,7 +1,7 @@
1
# Building the mobile Screens dependency
2
3
The mobile v5 stack uses a committed tarball from the
4
-[T3 Screens fork](https://github.com/pingdotgg/react-native-screens/tree/t3-v5.0.0-t3.26).
4
+[T3 Screens fork](https://github.com/pingdotgg/react-native-screens/tree/t3-v5.0.0-t3.27).
5
The fork owns the integration changes; the app does not patch this package.
6
Each archive includes compiled JavaScript, declarations, native source and
7
`t3-fork.json` recording its version, source commit and upstream base.
pnpm-lock.yaml
+9
-9
@@ -348,7 +348,7 @@ importers:
348
version: 7.3.4(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
349
'@react-navigation/native-stack':
350
specifier: 7.17.6
351
- version: 7.17.6(patch_hash=d2d52f3776e30765519748fd5e177592dc3b9cc778c52fb00e02674dfa9042c5)(02486f76aa3d9c7d88119682fcbddcde)
351
+ version: 7.17.6(patch_hash=d2d52f3776e30765519748fd5e177592dc3b9cc778c52fb00e02674dfa9042c5)(6b53c4f789a319cd2c00cd296dcea732)
352
'@shikijs/core':
353
specifier: 4.2.0
354
version: 4.2.0
@@ -548,8 +548,8 @@ importers:
548
specifier: ~5.9.1
549
version: 5.9.1(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
550
react-native-screens:
551
- specifier: file:deps/react-native-screens-5.0.0-t3.26.tgz
552
- version: file:apps/mobile/deps/react-native-screens-5.0.0-t3.26.tgz(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
551
+ specifier: file:deps/react-native-screens-5.0.0-t3.27.tgz
552
+ version: file:apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
553
react-native-shiki-engine:
554
specifier: ^0.3.12
555
version: 0.3.12(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
@@ -10891,9 +10891,9 @@ packages:
10891
react: '*'
10892
react-native: '*'
10893
10894
- react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.26.tgz:
10895
- resolution: {integrity: sha512-OD1yeZu1HKuvBaroReihFROaofzuF2w4ORtPJXJrpAGk8AgQNusy3KaRRpeiCwIzH2KQU52SnWxrtKaYMzzQ+A==, tarball: file:apps/mobile/deps/react-native-screens-5.0.0-t3.26.tgz}
10896
- version: 5.0.0-t3.26
10894
+ react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz:
10895
+ resolution: {integrity: sha512-krNMVmduM2fXeJYveadSz6NkYI/AFN3hAAirjk42Z9wkBrPtuhmcp3E2+Me95Xdj5LBL3G3dgltUjo5vYeEtLw==, tarball: file:apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz}
10896
+ version: 5.0.0-t3.27
10897
peerDependencies:
10898
react: '*'
10899
react-native: '*'
@@ -16096,7 +16096,7 @@ snapshots:
16096
optionalDependencies:
16097
'@react-native-masked-view/masked-view': 0.3.2(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
16098
16099
- '@react-navigation/native-stack@7.17.6(patch_hash=d2d52f3776e30765519748fd5e177592dc3b9cc778c52fb00e02674dfa9042c5)(02486f76aa3d9c7d88119682fcbddcde)':
16099
+ '@react-navigation/native-stack@7.17.6(patch_hash=d2d52f3776e30765519748fd5e177592dc3b9cc778c52fb00e02674dfa9042c5)(6b53c4f789a319cd2c00cd296dcea732)':
16100
dependencies:
16101
'@react-navigation/elements': 2.9.26(83de68753219ecf7f3321e065bd378be)
16102
'@react-navigation/native': 7.3.4(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
@@ -16104,7 +16104,7 @@ snapshots:
16104
react: 19.3.0
16105
react-native: 0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6)
16106
react-native-safe-area-context: 5.9.1(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
16107
- react-native-screens: file:apps/mobile/deps/react-native-screens-5.0.0-t3.26.tgz(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
16107
+ react-native-screens: file:apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
16108
sf-symbols-typescript: 2.2.0
16109
warn-once: 0.1.1
16110
transitivePeerDependencies:
@@ -22097,7 +22097,7 @@ snapshots:
22097
react: 19.3.0
22098
react-native: 0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6)
22099
22100
- react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.26.tgz(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0):
22100
+ react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0):
22101
dependencies:
22102
react: 19.3.0
22103
react-freeze: 1.0.4(react@19.3.0)