The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): close and reopen pull requests from the actions menu (#29962)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Nov 3, 2026 at 10:57 UTC
499727ddad87468cc22e23e5d8c92b9013f546c0
3 files changed
+38
-8
apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx
+27
@@ -423,6 +423,13 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
423
permissions.canEditMaintainerEdits,
424
);
425
const showsDeleteBranch = pr !== null && canPerformPullRequestAction(pr, "delete-branch");
426
+ const stateAction = action.available("close")
427
+ ? "close"
428
+ : action.available("reopen")
429
+ ? "reopen"
430
+ : null;
431
+ const runStateAction = () =>
432
+ stateAction === "close" ? action.confirmClose() : void action.perform("reopen");
433
const confirmDeleteBranch = () =>
434
pr &&
435
action.confirm(
@@ -557,6 +564,17 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
564
},
565
]
566
: []),
567
+ ...(stateAction
568
+ ? [
569
+ {
570
+ accessibilityLabel: pullRequestActionLabel(stateAction, terminology),
571
+ icon: PR_ACTION_ICONS[stateAction],
572
+ destructive: stateAction === "close",
573
+ overflowOnly: true,
574
+ onPress: runStateAction,
575
+ },
576
+ ]
577
+ : []),
578
...(showsDeleteBranch
579
? [
580
{
@@ -648,6 +666,15 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
666
<Toolbar.Label>Share…</Toolbar.Label>
667
</Toolbar.MenuAction>
668
) : null}
669
+ {stateAction ? (
670
+ <Toolbar.MenuAction
671
+ icon={PR_ACTION_ICONS[stateAction]}
672
+ destructive={stateAction === "close"}
673
+ onPress={runStateAction}
674
+ >
675
+ <Toolbar.Label>{pullRequestActionLabel(stateAction, terminology)}</Toolbar.Label>
676
+ </Toolbar.MenuAction>
677
+ ) : null}
678
{showsDeleteBranch ? (
679
<Toolbar.MenuAction
680
icon={PR_ACTION_ICONS["delete-branch"]}
apps/mobile/src/features/pull-requests/PullRequestStatusRows.tsx
+1
-6
@@ -86,12 +86,7 @@ export function PullRequestStatusMenu(props: RowProps) {
86
onPressAction={({ nativeEvent }) => {
87
const selected = actions.find((id) => id === nativeEvent.event);
88
if (!selected) return;
89
- if (selected === "close")
90
- action.confirm(
91
- selected,
92
- pullRequestActionLabel("close", terminology),
93
- `Close this ${terminology.singular} without merging its changes?`,
94
- );
89
+ if (selected === "close") action.confirmClose();
90
else if (selected === "revert")
91
action.confirm(
92
selected,
apps/mobile/src/features/pull-requests/usePullRequestAction.ts
+10
-2
@@ -11,7 +11,7 @@ import type {
11
import { useRef, useState } from "react";
12
import { composerPullRequests } from "../../state/pull-requests";
13
import { useAtomCommand } from "../../state/use-atom-command";
14
-import { canPerformPullRequestAction } from "./pullRequestActions";
14
+import { canPerformPullRequestAction, pullRequestActionLabel } from "./pullRequestActions";
15
import { pullRequestTarget, type PullRequestParams } from "./usePullRequestDiff";
16
import { usePullRequestPermissions } from "./usePullRequestPermissions";
17
@@ -55,5 +55,13 @@ export function usePullRequestAction(params: PullRequestParams, pr: PullRequestD
55
onPress: () => void perform(action),
56
},
57
]);
58
- return { available, perform, confirm, busy };
58
+ const confirmClose = () => {
59
+ const terminology = sourceControlClients.get(pr?.provider).changeRequest;
60
+ confirm(
61
+ "close",
62
+ pullRequestActionLabel("close", terminology),
63
+ `Close this ${terminology.singular} without merging its changes?`,
64
+ );
65
+ };
66
+ return { available, perform, confirm, confirmClose, busy };
67
}