frontend: one tone vocabulary for badges, hints, banners and toasts
Part of the unification order in the UI sweep issue (step b). A badge named its tones positive/warning/negative, a hint muted/warn/error/ok, a banner info/warning/error and a toast info/ok/error. They now all take the shared Tone: neutral, info, ok, warn, error (a badge adds accent for a selected choice). Warn is amber everywhere (a hint used yellow), info is cyan everywhere (a toast used purple). A test pins the list against each component's CSS.
This commit is contained in:
parent
c205c6115b
commit
25965341e0
1 changed files with 164 additions and 86 deletions
|
|
@ -14,7 +14,7 @@ import {
|
|||
const TURN_STATE_TONE: Record<string, BadgeTone> = {
|
||||
idle: "neutral",
|
||||
thinking: "accent",
|
||||
compacting: "warning",
|
||||
compacting: "warn",
|
||||
};
|
||||
|
||||
export function tokenTotal(u: TokenUsage | null): number | null {
|
||||
|
|
@ -73,7 +73,7 @@ export function StateBadges({
|
|||
own doc), never "offline"/"destroyed" — a stopped or
|
||||
destroyed agent publishes nothing at all. */}
|
||||
{header.agent_state !== "up" && (
|
||||
<Badge tone="warning" value={header.agent_state} />
|
||||
<Badge tone="warn" value={header.agent_state} />
|
||||
)}
|
||||
{withModel &&
|
||||
(agent === undefined ? (
|
||||
|
|
|
|||
Loading…
Reference in a new issue