From cac9b407145a3b589866f7ac179313d85f845310 Mon Sep 17 00:00:00 2001 From: iris Date: Mon, 9 Nov 2026 22:00:24 +0100 Subject: [PATCH] swarm ui: the delete confirmation says the agent keeps its session The dialog only said the agent has to log in again, which reads as a logout. It now says the agent is not logged out and keeps its current session, and a delete that succeeded shows the empty row at once instead of waiting on the re-read. --- .../packages/swarm-ui/src/agent/claude-login/StoredLogin.ts | 4 ++-- .../packages/swarm-ui/src/agent/detail/AgentClaudeLogin.tsx | 5 ++++- frontend/packages/swarm-ui/test/stored-login.test.mjs | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/packages/swarm-ui/src/agent/claude-login/StoredLogin.ts b/frontend/packages/swarm-ui/src/agent/claude-login/StoredLogin.ts index 57d858455..8942d4acd 100644 --- a/frontend/packages/swarm-ui/src/agent/claude-login/StoredLogin.ts +++ b/frontend/packages/swarm-ui/src/agent/claude-login/StoredLogin.ts @@ -25,7 +25,7 @@ export function storedAtMs(login: StoredLogin): number | null { } // What the delete's confirmation says: it removes the swarm's copy, and an -// agent that already holds a session keeps it. +// agent that already holds a session keeps it. The agent is not logged out. export function deleteMessage(agent: string): string { - return `Delete the stored claude login for ${agent}? ${agent} has to be logged in again to get a new one.`; + return `Delete the stored claude login for ${agent}? ${agent} is not logged out: it keeps its current session. A new login has to be made to get another stored copy.`; } diff --git a/frontend/packages/swarm-ui/src/agent/detail/AgentClaudeLogin.tsx b/frontend/packages/swarm-ui/src/agent/detail/AgentClaudeLogin.tsx index e2c338b60..dbf52a963 100644 --- a/frontend/packages/swarm-ui/src/agent/detail/AgentClaudeLogin.tsx +++ b/frontend/packages/swarm-ui/src/agent/detail/AgentClaudeLogin.tsx @@ -55,6 +55,8 @@ export function AgentClaudeLogin({ agent }: { agent: string }) { return; } setConfirming(false); + // Nothing is stored now, whatever the re-read says. + setLogin({ stored_at: null }); showToast(`Stored login for ${agent} deleted.`, "ok"); await load(); } catch (err) { @@ -81,7 +83,8 @@ export function AgentClaudeLogin({ agent }: { agent: string }) { ) : ( <> - stored {at === null ? login.stored_at : } + stored{" "} + {at === null ? login.stored_at : } {" "} { test("the delete's confirmation names the agent", () => { assert.match(deleteMessage("atlas"), /stored claude login for atlas/); + assert.match(deleteMessage("atlas"), /not logged out/); });