From 71b219cbafeb0e0f69ea69ffefb3ff9499bc916a Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 10 Nov 2026 22:59:59 -0800 Subject: [PATCH] fix(cloud): RA-11 Restart resumes the pane's own conversation on the host; quieter restarting/failed strip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit m4air run 3: same tab, same leaf, new PTY, and state 1 after, but the relaunch was a new conversation (no --resume; new session id). Orca Cloud tabs are host-surface tabs: the desktop reconnect only attaches, and the host woke the slept leaf with its original launch. After the reversible stop, the desktop now asks the host to ensure the agent on the pane's own provider session, placed in the same host tab and leaf, then reconnects. A pane with no session keeps the host's fresh launch ('Starts a new conversation'). A host that does not stop or resume shows the failure with the reason. Strip (design-squad): 'Restarting Claude…' is the spinner and words only, with no button and no ×. The failure says it once: the body names the reason when known ('The workspace didn't respond.') and is otherwise empty; Try again and × stay. --- .../CloudAgentSignInStrip.fixture.tsx | 9 ++- .../CloudAgentSignInStrip.tsx | 9 +-- .../cloud-agent-strip-model.ts | 2 + .../cloud-running-strip-model.test.ts | 20 +++++-- .../cloud-running-strip-model.ts | 15 ++--- .../cloud-strip-restart-run.test.ts | 59 +++++++++++++++++++ .../use-ready-pane-account-restarts.ts | 43 +++++++++++--- src/renderer/src/i18n/locales/en.json | 2 +- .../orca-cloud/cloud-agent-restart-attempt.ts | 9 ++- .../cloud-pane-restart-stop.test.ts | 36 ++++++++++- .../lib/orca-cloud/cloud-pane-restart-stop.ts | 37 ++++++++++++ .../cloud-agent-sign-in-strip.spec.ts | 12 ++-- 12 files changed, 219 insertions(+), 34 deletions(-) diff --git a/src/renderer/src/components/agent-sign-in-strip/CloudAgentSignInStrip.fixture.tsx b/src/renderer/src/components/agent-sign-in-strip/CloudAgentSignInStrip.fixture.tsx index d48d5908c7a..0040d2396f9 100644 --- a/src/renderer/src/components/agent-sign-in-strip/CloudAgentSignInStrip.fixture.tsx +++ b/src/renderer/src/components/agent-sign-in-strip/CloudAgentSignInStrip.fixture.tsx @@ -173,5 +173,12 @@ export const runningRestarting = fixture({ }) /** RA-11: nothing relaunched in time. */ export const runningRestartFailed = fixture({ - restart: { phase: 'failed', agent: 'claude', resumable: true, ptyId: 'p', launchedAt: null } + restart: { + phase: 'failed', + agent: 'claude', + resumable: true, + ptyId: 'p', + launchedAt: null, + failure: 'hostUnresponsive' + } }) diff --git a/src/renderer/src/components/agent-sign-in-strip/CloudAgentSignInStrip.tsx b/src/renderer/src/components/agent-sign-in-strip/CloudAgentSignInStrip.tsx index a5fc7c3f061..6773c654d35 100644 --- a/src/renderer/src/components/agent-sign-in-strip/CloudAgentSignInStrip.tsx +++ b/src/renderer/src/components/agent-sign-in-strip/CloudAgentSignInStrip.tsx @@ -291,10 +291,11 @@ export function CloudAgentSignInStrip({ ) : null} {/* Renew and Restart are the whole action and the strip leaves on its own; Escape still cancels. */} - {!model.dismiss && - (model.status === 'done' || - primary?.action.kind === 'renew' || - primary?.action.kind === 'restart') ? null : ( + {model.noClose || + (!model.dismiss && + (model.status === 'done' || + primary?.action.kind === 'renew' || + primary?.action.kind === 'restart')) ? null : (