Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: the three toasts that didn't match read like the rest

Two toasts started with a capital and ended with a full stop (the stored login
dialog's and the login delete's), and the API key removal had no tone. They are
short lowercase phrases with the ok tone now, and the design guide says so.
This commit is contained in:
iris 2026-11-28 02:51:27 +01:00 • committed by mara
commit f6a0bb4bb3
5 changed files with 5 additions and 4 deletions

View file

@ -134,6 +134,7 @@ on save, which leaves no button to put it under: that confirms with a toast. An
a list that refreshes confirms with a toast. A change the page already shows a list that refreshes confirms with a toast. A change the page already shows
(a card that flips or goes, a row that appears) says nothing. A new action picks (a card that flips or goes, a row that appears) says nothing. A new action picks
the way by this rule and doesn't add a fourth. the way by this rule and doesn't add a fourth.
A toast is a short lowercase phrase with no full stop, and its tone is `ok` when it confirms a change (`removed example.com`, `sent to 2 agents`).
## Empty states ## Empty states

View file

@ -30,7 +30,7 @@ export function afterCode(problem: ProblemDetails | null): LoginStep {
// What the toast says once the login is stored. // What the toast says once the login is stored.
export function storedMessage(agent: string): string { export function storedMessage(agent: string): string {
return `Login stored. ${agent} picks it up within a minute and resumes.`; return `login stored: ${agent} picks it up within a minute and resumes`;
} }
// Whether closing the dialog leaves a login running that should be // Whether closing the dialog leaves a login running that should be

View file

@ -57,7 +57,7 @@ export function AgentApiKey({ hive, agent }: { hive: string; agent: string }) {
return; return;
} }
setConfirming(false); setConfirming(false);
showToast(`removed the API key for ${agent}`); showToast(`removed the API key for ${agent}`, "ok");
await load(); await load();
} catch (err) { } catch (err) {
setRemoveError({ detail: String(err) }); setRemoveError({ detail: String(err) });

View file

@ -61,7 +61,7 @@ export function AgentClaudeLogin({ agent }: { agent: string }) {
setConfirming(false); setConfirming(false);
// Nothing is stored now, whatever the re-read says. // Nothing is stored now, whatever the re-read says.
setLogin({ stored_at: null }); setLogin({ stored_at: null });
showToast(`Stored login for ${agent} deleted.`, "ok"); showToast(`deleted the stored login for ${agent}`, "ok");
await load(); await load();
} catch (err) { } catch (err) {
setDeleteError({ detail: String(err) }); setDeleteError({ detail: String(err) });

View file

@ -80,5 +80,5 @@ test("a pasted code is trimmed, and a blank one is nothing", () => {
}); });
test("the stored toast names the agent", () => { test("the stored toast names the agent", () => {
assert.match(storedMessage("atlas"), /^Login stored\. atlas /); assert.match(storedMessage("atlas"), /^login stored: atlas /);
}); });