The best way to control Claude Code, Codex and more from any computer or phone
fix(web): a disabled Merge back button shows why it is disabled (#37395)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Jackson Miller committed
Nov 15, 2026 at 18:49 UTC
58b6e1c5ba23ca23c8d102ee82b2c29e04d67893
2 files changed
+27
-1
apps/web/src/components/chat/ThreadRelationshipsControl.browser.test.tsx
+26
@@ -338,6 +338,32 @@ it("shows a remote subagent's full title in its tooltip even when its environmen
338
expect(screen.router?.state.location.pathname).toBe("/environment/fork");
339
});
340
341
+it("explains why Merge back is unavailable before the fork completes a run", async () => {
342
+ setup();
343
+ state.projection = { ...(state.projection as Record<string, unknown>), runs: [] };
344
+ await using screen = await render(
345
+ <ThreadRelationshipsPanel
346
+ environmentId={environmentId}
347
+ threadId={threadId}
348
+ showLineage
349
+ showSideChats={false}
350
+ />,
351
+ { router: "/environment/fork" },
352
+ );
353
+
354
+ const mergeBack = screen.getByRole("button", { name: "Merge back to source conversation" });
355
+ await userEvent.hover(mergeBack);
356
+ await vi.waitFor(() =>
357
+ expect(document.querySelector('[data-slot="tooltip-popup"]')?.textContent).toBe(
358
+ "Complete a run in this fork before merging it back",
359
+ ),
360
+ );
361
+
362
+ state.commandSucceeds = true;
363
+ await mergeBack.click({ force: true });
364
+ expect(screen.router?.state.location.pathname).toBe("/environment/fork");
365
+});
366
+
367
it("shows a delegated-from thread's full title in its tooltip even when its environment is unavailable", async () => {
368
setup();
369
const longTitle = "Parent task delegated from another machine that has a long description";
apps/web/src/components/chat/ThreadRelationshipsControl.tsx
+1
-1
@@ -923,7 +923,7 @@ export function ThreadRelationshipsPanel(props: {
923
? `Merge back to ${parentTitle}`
924
: "Merge back to source conversation"
925
}
926
- disabled={!canMerge || busyAction !== null}
926
+ aria-disabled={!canMerge || busyAction !== null || undefined}
927
onClick={() => void merge()}
928
>
929
{busyAction === "merge" ? (