The best way to control Claude Code, Codex and more from any computer or phone
fix(web): stack merge dialog closes as soon as you confirm (#17116)
oliver committed
Oct 8, 2026 at 11:39 UTC
eb1cf7bd0efba7364d53907036f5b7eefb379c39
1 file changed
+13
-9
apps/web/src/components/pullRequest/PullRequestStackMenu.tsx
+13
-9
@@ -87,6 +87,11 @@ export function PullRequestStackMenu({
87
layer.headSha ? [{ number: layer.number, headSha: layer.headSha }] : [],
88
);
89
setPending(true);
90
+ setConfirmation(null);
91
+ const toastId = toastManager.add({
92
+ type: "loading",
93
+ title: action === "merge" ? "Merging stack..." : "Rebasing stack...",
94
+ });
95
const result = await runAction({
96
environmentId,
97
input: {
@@ -99,16 +104,15 @@ export function PullRequestStackMenu({
104
},
105
});
106
setPending(false);
102
- setConfirmation(null);
107
onActed();
108
if (result._tag === "Failure") {
105
- toastManager.add({
109
+ toastManager.update(toastId, {
110
type: "error",
107
- title: "Stack operation did not complete",
111
+ title: action === "merge" ? "Could not merge the stack" : "Could not rebase the stack",
112
description: String(squashAtomCommandFailure(result)),
113
});
114
} else {
111
- toastManager.add({
115
+ toastManager.update(toastId, {
116
type: "success",
117
title: action === "merge" ? "Stack merge request completed" : "Stack rebased",
118
description:
@@ -216,10 +220,10 @@ export function PullRequestStackMenu({
220
<Dialog
221
open={confirmation !== null}
222
onOpenChange={(value) => {
219
- if (!value && !pending) setConfirmation(null);
223
+ if (!value) setConfirmation(null);
224
}}
225
>
222
- <DialogPopup className="max-w-md" showCloseButton={!pending}>
226
+ <DialogPopup className="max-w-md">
227
<DialogHeader>
228
<DialogTitle>
229
{confirmation === "merge"
@@ -245,11 +249,11 @@ export function PullRequestStackMenu({
249
</ul>
250
</DialogPanel>
251
<DialogFooter>
248
- <Button variant="outline" disabled={pending} onClick={() => setConfirmation(null)}>
252
+ <Button variant="outline" onClick={() => setConfirmation(null)}>
253
Cancel
254
</Button>
251
- <Button disabled={pending} onClick={() => void run()}>
252
- {pending ? "Working…" : confirmation === "merge" ? "Merge stack" : "Rebase stack"}
255
+ <Button onClick={() => void run()}>
256
+ {confirmation === "merge" ? "Merge stack" : "Rebase stack"}
257
</Button>
258
</DialogFooter>
259
</DialogPopup>