Watch
0
0
Fork
You've already forked hyperhive
0

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.
This commit is contained in:
iris 2026-11-09 22:00:24 +01:00 • committed by mara
commit cac9b40714
3 changed files with 7 additions and 3 deletions

View file

@ -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.`;
}

View file

@ -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 }) {
) : (
<>
<span title={login.stored_at}>
stored {at === null ? login.stored_at : <RelativeTime epochMs={at} />}
stored{" "}
{at === null ? login.stored_at : <RelativeTime epochMs={at} />}
</span>{" "}
<Badge
variant="quiet"

View file

@ -30,4 +30,5 @@ test("the time the store gives is read as an instant, or as nothing", () => {
test("the delete's confirmation names the agent", () => {
assert.match(deleteMessage("atlas"), /stored claude login for atlas/);
assert.match(deleteMessage("atlas"), /not logged out/);
});