The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 07:00 UTC
fix(mobile): pending auto-merge shows in the merge button (#29465)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Nov 2, 2026 at 09:04 UTC
ed8833f80371ef04901d09db78b94b9edb2a4dc2
1 file changed
+20
-10
apps/mobile/src/features/pull-requests/PullRequestMergeControls.tsx
+20
-10
@@ -82,6 +82,8 @@ export function PullRequestMergeControls(props: {
82
? `${MERGE_METHODS[method].title} stack (${scope.layers.length})`
83
: MERGE_METHODS[method].title
84
: "Merge unavailable";
85
+ const autoMergeArmed = pr.state === "open" && pr.autoMergeEnabled === true;
86
+ const armedLabel = `Auto-merge pending${pr.autoMergeMethod ? ` (${pr.autoMergeMethod})` : ""}`;
87
const autoAction = pr.autoMergeEnabled ? "disable-auto-merge" : "enable-auto-merge";
88
const canAutoMerge =
89
!busy &&
@@ -167,13 +169,25 @@ export function PullRequestMergeControls(props: {
169
return (
170
<View className="gap-2 border-t border-border-subtle p-3">
171
<SplitButton
170
- label={busy ? "Working…" : !permissions.connected ? "Reconnect to merge" : label}
172
+ label={
173
+ busy
174
+ ? "Working…"
175
+ : !permissions.connected
176
+ ? "Reconnect to merge"
177
+ : autoMergeArmed
178
+ ? armedLabel
179
+ : label
180
+ }
181
accessibilityLabel={
172
- scope ? `${label}, ${scope.layers.length} stack layers through #${pr.number}` : label
182
+ autoMergeArmed
183
+ ? `${armedLabel}, merges once its requirements are met`
184
+ : scope
185
+ ? `${label}, ${scope.layers.length} stack layers through #${pr.number}`
186
+ : label
187
}
174
- icon={PullRequestGlyph.merged}
175
- disabled={!canMerge}
176
- loading={busy || checkingStack}
188
+ icon={autoMergeArmed ? "clock" : PullRequestGlyph.merged}
189
+ disabled={!canMerge || autoMergeArmed}
190
+ loading={busy || (!autoMergeArmed && checkingStack)}
191
onPress={() => confirm("merge")}
192
menuTitle="Merge options"
193
actions={[
@@ -202,17 +216,13 @@ export function PullRequestMergeControls(props: {
216
}}
217
/>
218
{permissions.connected &&
219
+ !autoMergeArmed &&
220
reason &&
221
reason !== MERGE_CONFLICT_REASON &&
222
reason !== "Checking stack membership…" &&
223
!(checkingStack && reason === "Refresh the stack before merging.") ? (
224
<Text className="px-1 text-xs text-foreground-muted">{reason}</Text>
225
) : null}
211
- {pr.autoMergeEnabled ? (
212
- <Text className="px-1 text-xs text-foreground-muted">
213
- Auto-merge is enabled{pr.autoMergeMethod ? ` · ${pr.autoMergeMethod}` : ""}
214
- </Text>
215
- ) : null}
226
{stack.error && stack.supportsStackActions ? (
227
<Button label="Retry stack lookup" tone="text" onPress={stack.refresh} />
228
) : null}