From f77e6132c2e78ab3afdcdc1d7f304d190cdcce26 Mon Sep 17 00:00:00 2001 From: "fctl-sh[bot]" <343971779+fctl-sh[bot]@users.noreply.github.com> Date: Thu, 3 Dec 2026 18:05:35 +0000 Subject: [PATCH] fix(web): stop offering to move review sessions off a quiet runner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The stall notice offered "Move to another runner" to whoever manages the session, review agents' sessions included, which the ⋯ menu leaves out and POST /sessions/{id}/move refuses: the click failed with a toast about review agents taking no messages. TurnTranscript now takes canMove, which the session page gives its owner unless it is a review. --- web/src/components/session/transcript.test.tsx | 12 ++++++++++++ web/src/components/session/turns.tsx | 10 ++++++++-- web/src/routes/session.tsx | 1 + 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/web/src/components/session/transcript.test.tsx b/web/src/components/session/transcript.test.tsx index bffa0dc8..536c36b8 100644 --- a/web/src/components/session/transcript.test.tsx +++ b/web/src/components/session/transcript.test.tsx @@ -185,6 +185,18 @@ describe("the transcript", () => { expect(title).toMatch(/^Runner now hasn't been heard from since .+\.$/); expect(detail).toMatch(/^The agent's work shows up here when it's back/); }); + + it("offers to move the session off a runner whose work doesn't come through only to those who may", () => { + // What MoveOff says under its button, which is mocked here. + const offered = "It starts again on another runner from its branch"; + const owner = render( + turns({ items: [tool()], status: "running", stall, canManage: true, canMove: true }), + ); + expect(owner.textContent).toContain(offered); + // A review agent's session, which its owner manages but can't move. + const review = render(turns({ items: [tool()], status: "running", stall, canManage: true })); + expect(review.textContent).not.toContain(offered); + }); }); describe("a subagent", () => { diff --git a/web/src/components/session/turns.tsx b/web/src/components/session/turns.tsx index ecae187f..ff6a3bd6 100644 --- a/web/src/components/session/turns.tsx +++ b/web/src/components/session/turns.tsx @@ -161,6 +161,7 @@ export const TurnTranscript = memo(function TurnTranscript({ stall, disk, canManage, + canMove, startedBy, me, projectSlug, @@ -184,6 +185,11 @@ export const TurnTranscript = memo(function TurnTranscript({ /** How short of disk the session's runner is. */ disk?: DiskShort; canManage?: boolean; + /** + * Whether the reader may move the session to another runner while its work doesn't come through: + * its owner, unless it is a review agent's session, which takes no move. + */ + canMove?: boolean; /** Who started the session, and who is signed in: a Remote Control link is only for its person. */ startedBy: G.UserRef; me?: G.UserId; @@ -377,7 +383,7 @@ export const TurnTranscript = memo(function TurnTranscript({ live={live} stall={stall} disk={disk} - moves={canManage ? sessionId : undefined} + moves={canMove ? sessionId : undefined} textClassName="pl-[34px]" /> , @@ -415,7 +421,7 @@ export const TurnTranscript = memo(function TurnTranscript({ // The agent went on after the last turn ended, without a message yet: what streams in. rows.push(
- +
, ); } diff --git a/web/src/routes/session.tsx b/web/src/routes/session.tsx index 9c2c4579..f8af34cc 100644 --- a/web/src/routes/session.tsx +++ b/web/src/routes/session.tsx @@ -897,6 +897,7 @@ export function SessionPage() { stall={stall} disk={disk} canManage={isOwner} + canMove={isOwner && !session.review} startedBy={session.created_by} me={me?.user.id} projectSlug={session.project_slug}