From dcd003fbd67edc78f0364ea1cecf1dcc7d078f23 Mon Sep 17 00:00:00 2001 From: harshitsinghbhandari <24b4506@iitb.ac.in> Date: Mon, 20 Apr 2026 13:18:49 +0530 Subject: [PATCH] fix: restore dead orchestrators from session detail --- packages/web/src/components/SessionDetail.tsx | 24 +++++++-------- .../__tests__/SessionDetail.desktop.test.tsx | 29 +++++++++++++++++++ 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/packages/web/src/components/SessionDetail.tsx b/packages/web/src/components/SessionDetail.tsx index 1e3b57ed2..5d1d91774 100644 --- a/packages/web/src/components/SessionDetail.tsx +++ b/packages/web/src/components/SessionDetail.tsx @@ -594,25 +594,23 @@ export function SessionDetail({ ) : null} - {/* Kill / Restore — only for non-orchestrator worker sessions */} - {!isOrchestrator && ( - isRestorable ? ( - - ) : !terminalEnded ? ( + {/* Restore is available for any restorable session; Kill stays worker-only. */} + {isRestorable ? ( + + ) : !isOrchestrator && !terminalEnded ? ( - ) : null - )} + ) : null} {!isOrchestrator && orchestratorHref ? ( { expect(screen.queryByTestId("direct-terminal")).not.toBeInTheDocument(); }); + it("shows restore for restorable orchestrator sessions", () => { + render( + , + ); + + expect(within(screen.getByRole("banner")).getByRole("button", { name: "Restore" })).toBeInTheDocument(); + expect(within(screen.getByRole("banner")).queryByRole("button", { name: "Kill" })).not.toBeInTheDocument(); + }); + it("hides the desktop orchestrator button on orchestrator session pages", () => { render(