Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
feat(agents): calm tools, inspector and agent dialogs (#1027)
Ruben Lütke862e562d4a6d
diff --git a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.css b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.cssindex a50edf845c..ff334c6fdc 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.css+++ b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.css@@ -10,34 +10,25 @@.action-card {position: relative;- border: 1px solid hsl(var(--border));- border-radius: calc(var(--radius) + 2px);+ border-radius: 20px;background: hsl(var(--card));color: hsl(var(--card-foreground));- padding: 12px 14px 12px;- box-shadow: 0 1px 2px rgb(var(--scrim-rgb) / 0.06);+ padding: 14px 16px 14px;+ box-shadow:+ 0 0 0 1px hsl(var(--border) / 0.6),+ 0 1px 2px rgb(var(--scrim-rgb) / 0.06),+ 0 10px 28px -14px rgb(var(--scrim-rgb) / 0.28);animation: action-card-in 160ms ease-out;}-/* A waiting card is the one thing in the chat that needs the person: one- strong hairline on its leading edge says so without shouting. */-.action-card::before {- content: "";- position: absolute;- inset: 10px auto 10px -1px;- width: 2px;- border-radius: 2px;- background: hsl(var(--primary));-}-.action-card-tile {display: inline-flex;flex-shrink: 0;align-items: center;justify-content: center;- width: 20px;- height: 20px;- border-radius: 6px;+ width: 22px;+ height: 22px;+ border-radius: 999px;background: hsl(var(--secondary));color: hsl(var(--foreground-secondary));}@@ -51,9 +42,9 @@height: 14px;}.action-card-tile-sm {- width: 18px;- height: 18px;- border-radius: 5px;+ width: 20px;+ height: 20px;+ border-radius: 999px;}.action-card-tile-sm svg {width: 12px;@@ -64,10 +55,10 @@display: inline-flex;align-items: center;gap: 6px;- height: 30px;- padding: 0 12px;- border-radius: 8px;- font-size: 12px;+ height: 32px;+ padding: 0 14px;+ border-radius: 999px;+ font-size: 13px;font-weight: 500;line-height: 1;white-space: nowrap;@@ -89,14 +80,13 @@opacity: 0.88;}.action-card-button[data-tone="secondary"] {- border: 1px solid hsl(var(--border));- background: hsl(var(--card));+ background: hsl(var(--secondary));color: hsl(var(--foreground));}.action-card-button[data-tone="secondary"]:not(:disabled):hover {- border-color: hsl(var(--border-strong));- background: hsl(var(--secondary));+ background: hsl(var(--surface-raised));}+.action-card-button:not(:disabled):active { transform: scale(0.97); }.action-card-button[data-tone="tertiary"] {color: hsl(var(--muted-foreground));padding: 0 10px;@@ -106,24 +96,23 @@color: hsl(var(--foreground));}.action-card-button-compact {- height: 24px;- padding: 0 8px;- border-radius: 6px;- font-size: 11px;+ height: 28px;+ padding: 0 12px;+ font-size: 12px;}.action-card-code {position: relative;margin-top: 6px;- border-radius: 8px;- background: hsl(var(--surface-raised));+ border-radius: 14px;+ background: hsl(var(--secondary) / 0.7);color: hsl(var(--foreground));}.action-card-code pre {margin: 0;max-height: 14rem;overflow: auto;- padding: 8px 36px 8px 10px;+ padding: 10px 40px 10px 12px;font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;font-size: 12px;line-height: 18px;@@ -137,9 +126,9 @@display: inline-flex;align-items: center;justify-content: center;- width: 24px;- height: 24px;- border-radius: 6px;+ width: 28px;+ height: 28px;+ border-radius: 999px;color: hsl(var(--muted-foreground));transition: background-color 120ms ease, color 120ms ease;}@@ -156,8 +145,8 @@display: flex;align-items: flex-start;gap: 6px;- margin: 6px 2px 0;- font-size: 12px;+ margin: 8px 4px 0;+ font-size: 13px;line-height: 18px;color: hsl(var(--warning));}@@ -166,10 +155,9 @@}.action-card-settled {- border: 1px solid hsl(var(--border));- border-radius: calc(var(--radius) - 2px);- background: hsl(var(--background));- padding: 6px 10px;+ border-radius: 16px;+ background: hsl(var(--secondary) / 0.5);+ padding: 8px 12px;}.action-card-settled-body {display: flex;@@ -200,7 +188,7 @@display: inline-flex;align-items: center;gap: 4px;- font-size: 11px;+ font-size: 12px;color: hsl(var(--muted-foreground));}.action-card-receipt svg {@@ -211,7 +199,7 @@/* The rule chooser inside an open card. */.action-card-rule {- border-radius: 10px;+ border-radius: 16px;background: hsl(var(--secondary));padding: 10px 12px;}@@ -219,16 +207,15 @@display: inline-flex;flex-wrap: wrap;gap: 2px;- padding: 2px;- border-radius: 8px;- background: hsl(var(--background));- border: 1px solid hsl(var(--border));+ padding: 3px;+ border-radius: 999px;+ background: hsl(var(--background) / 0.7);}.action-card-segment {- height: 24px;- padding: 0 10px;- border-radius: 6px;- font-size: 12px;+ height: 28px;+ padding: 0 12px;+ border-radius: 999px;+ font-size: 13px;color: hsl(var(--muted-foreground));transition: background-color 120ms ease, color 120ms ease;}@@ -236,7 +223,8 @@color: hsl(var(--foreground));}.action-card-segment[aria-checked="true"] {- background: hsl(var(--secondary));+ background: hsl(var(--card));+ box-shadow: 0 1px 2px rgb(var(--scrim-rgb) / 0.12), inset 0 0 0 1px hsl(var(--border) / 0.6);color: hsl(var(--foreground-strong));font-weight: 500;}@@ -249,9 +237,9 @@display: inline-flex;align-items: center;justify-content: center;- width: 26px;- height: 26px;- border-radius: 7px;+ width: 30px;+ height: 30px;+ border-radius: 999px;color: hsl(var(--muted-foreground));transition: background-color 120ms ease, color 120ms ease;}diff --git a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.tsx b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.tsxindex dde64e2459..70364ca6a5 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.tsx@@ -104,16 +104,16 @@ function OpenCard({<SourceChip icon={source.icon} label={source.label} showLabel={source.showLabel !== false} />{trailing ? <div className="-mr-1.5 ml-auto flex shrink-0 items-center">{trailing}</div> : null}</div>- <h3 id={titleId} className="mt-2 text-sm font-semibold leading-5 text-foreground-strong [overflow-wrap:anywhere]">{title}</h3>+ <h3 id={titleId} className="mt-2 text-[14px] font-semibold leading-5 text-foreground-strong [overflow-wrap:anywhere]">{title}</h3>{lines?.filter(Boolean).length ? <div className="mt-0.5 space-y-0.5">- {lines.filter(Boolean).map((line, i) => <p key={i} className="m-0 text-xs leading-5 text-muted-foreground [overflow-wrap:anywhere]">{line}</p>)}+ {lines.filter(Boolean).map((line, i) => <p key={i} className="m-0 text-[13px] leading-5 text-muted-foreground [overflow-wrap:anywhere]">{line}</p>)}</div> : null}{disclosure?.text ? <Disclosure {...disclosure} /> : null}{children ? <div className="mt-2.5 min-w-0">{children}</div> : null}- {failure ? <p role="alert" className="mt-2.5 flex items-start gap-1.5 text-xs leading-5 text-destructive">+ {failure ? <p role="alert" className="mt-2.5 flex items-start gap-1.5 text-[13px] leading-5 text-destructive"><CircleAlert aria-hidden className="mt-0.5 h-3.5 w-3.5 shrink-0" /><span>{failure}</span></p> : null}- {note ? <p className="mt-2 text-xs leading-5 text-muted-foreground">{note}</p> : null}+ {note ? <p className="mt-2 text-[13px] leading-5 text-muted-foreground">{note}</p> : null}{actions.length ? <div className="mt-3 flex flex-wrap items-center gap-2">{lead.map((a) => <ActionButton key={a.id} action={a} pending={pending} />)}{tail.length ? <div className="ml-auto flex flex-wrap items-center gap-1">@@ -156,15 +156,15 @@ function SettledCard({ id, source, ariaLabel, lines, disclosure, children, settl{expandable? <button type="button" onClick={toggle} aria-expanded={open} aria-controls={bodyId}title={open ? t("action_card.collapse") : t("action_card.expand")}- className="flex min-w-0 flex-1 items-center gap-2 rounded-md text-left text-xs focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">+ className="flex min-w-0 flex-1 items-center gap-2 rounded-md text-left text-[13px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">{sentence}<ChevronDown aria-hidden className={cn("ml-auto h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform duration-150", open && "rotate-180")} /></button>- : <p className="m-0 flex min-w-0 flex-1 items-center gap-2 text-xs">{sentence}</p>}+ : <p className="m-0 flex min-w-0 flex-1 items-center gap-2 text-[13px]">{sentence}</p>}{extras}</div>{expandable && open ? <div id={bodyId} className="action-card-settled-body">- {lines?.filter(Boolean).map((line, i) => <p key={i} className="m-0 text-xs leading-5 text-muted-foreground [overflow-wrap:anywhere]">{line}</p>)}+ {lines?.filter(Boolean).map((line, i) => <p key={i} className="m-0 text-[13px] leading-5 text-muted-foreground [overflow-wrap:anywhere]">{line}</p>)}{disclosure?.text ? <Disclosure {...disclosure} defaultOpen /> : null}{children}{settled.body}@@ -176,7 +176,7 @@ function SettledCard({ id, source, ariaLabel, lines, disclosure, children, settlexport function SourceChip({ icon, label, showLabel = true }: { icon: ReactNode; label: string; showLabel?: boolean }) {return <span className="flex min-w-0 items-center gap-1.5" title={showLabel ? undefined : label}><span className="action-card-tile" aria-hidden>{icon}</span>- {showLabel ? <span className="truncate text-xs font-medium text-muted-foreground">{label}</span> : <span className="sr-only">{label}</span>}+ {showLabel ? <span className="truncate text-[13px] font-medium text-muted-foreground">{label}</span> : <span className="sr-only">{label}</span>}</span>;}@@ -199,7 +199,7 @@ function Disclosure({ text, showLabel, hideLabel, defaultOpen = false }: NonNullconst id = useId();return <div className="mt-2.5 min-w-0"><button type="button" onClick={() => setOpen((v) => !v)} aria-expanded={open} aria-controls={id}- className="flex items-center gap-1 rounded-md text-xs font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">+ className="flex items-center gap-1 rounded-md text-[13px] font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><ChevronDown aria-hidden className={cn("h-3.5 w-3.5 transition-transform duration-150", !open && "-rotate-90")} />{open ? hideLabel : showLabel}</button>diff --git a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.tsx b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.tsxindex de9dccae27..0e17bc8fca 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.tsx@@ -209,7 +209,7 @@ export function RuleChooser({ offer, pending, onSave, onBack }: {else onSave(reach === "tool" ? { scope, breadth: "action" } : { scope, breadth: "action", narrow: reach });};return <div className="action-card-rule" data-testid="action-card-rule">- <p className="m-0 text-xs font-medium text-foreground">{t("action_card.rule.heading")}</p>+ <p className="m-0 text-[13px] font-medium text-foreground">{t("action_card.rule.heading")}</p><div className="mt-2 flex flex-wrap items-center gap-2"><Segments label={t("action_card.rule.scope_label")} value={scope} onChange={setScope}options={scopes.map((s) => ({ value: s, label: t(`action_card.rule.scope_${s}`) }))} />@@ -225,7 +225,7 @@ export function RuleChooser({ offer, pending, onSave, onBack }: {]} /> : null}</div><p className="mt-2.5 break-words text-sm font-medium text-foreground-strong" data-testid="action-card-rule-text">{sentence}</p>- <p className="m-0 mt-0.5 text-xs leading-5 text-muted-foreground" data-testid="action-card-rule-where">+ <p className="m-0 mt-0.5 text-[13px] leading-5 text-muted-foreground" data-testid="action-card-rule-where">{whereLine(offer, scope, reach, t)}</p><div className="mt-3 flex flex-wrap items-center gap-2">@@ -309,11 +309,11 @@ function SettledApproval({ block, approval, info }: { block: ToolBlock; approvalactions,receipt: saved ? <span className="action-card-receipt" title={savedText} data-testid="action-card-rule-saved"><Check aria-hidden />{t("action_card.rule.saved_short")}- </span> : error ? <span role="alert" className="text-xs text-destructive">{error}</span> : null,+ </span> : error ? <span role="alert" className="text-[13px] text-destructive">{error}</span> : null,body: <>- {note ? <p className="m-0 text-xs leading-5 text-muted-foreground">{note}</p> : null}- {savedText ? <p className="m-0 text-xs leading-5 text-foreground-secondary">{savedText}</p> : null}- {saved?.stillAsks ? <p className="m-0 text-xs leading-5 text-warning">{t("action_card.rule.still_asks")}</p> : null}+ {note ? <p className="m-0 text-[13px] leading-5 text-muted-foreground">{note}</p> : null}+ {savedText ? <p className="m-0 text-[13px] leading-5 text-foreground-secondary">{savedText}</p> : null}+ {saved?.stillAsks ? <p className="m-0 text-[13px] leading-5 text-warning">{t("action_card.rule.still_asks")}</p> : null}</>,};return <ActionCarddiff --git a/dodaios/ui/web/frontend/src/components/agentchat/activity/WorkDisclosure.tsx b/dodaios/ui/web/frontend/src/components/agentchat/activity/WorkDisclosure.tsxindex 492fa3aae7..a53ebfcb06 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/activity/WorkDisclosure.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/activity/WorkDisclosure.tsx@@ -1,5 +1,5 @@import { memo, useMemo } from "react";-import { ChevronRight, ListTree } from "lucide-react";+import { ChevronRight } from "lucide-react";import { fill, useT } from "@/i18n";import type { TurnItem } from "../reduce";import { plural, traceDuration } from "../traceEntries";@@ -35,7 +35,6 @@ export const WorkDisclosure = memo(function WorkDisclosure({ turn, open, onOpenreturn <button type="button" className="run-work" onClick={onOpen} aria-expanded={open}aria-label={`${label}. ${t("run_view.work.open")}`} title={t("run_view.work.open")}data-testid="work-disclosure" data-turn={turn.id}>- <ListTree aria-hidden className="h-3.5 w-3.5 shrink-0" strokeWidth={1.75} /><span className="min-w-0 truncate">{lead.map((part, i) => <span key={i}>{i > 0 ? <span className="run-work-sep" aria-hidden> · </span> : null}{part}diff --git a/dodaios/ui/web/frontend/src/components/agentchat/activity/runView.css b/dodaios/ui/web/frontend/src/components/agentchat/activity/runView.cssindex b26f75f484..50283bbf0e 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/activity/runView.css+++ b/dodaios/ui/web/frontend/src/components/agentchat/activity/runView.css@@ -71,10 +71,11 @@gap: 6px;align-self: flex-start;margin-top: 2px;- padding: 3px 8px 3px 6px;- border-radius: 10px;+ padding: 4px 10px 4px 12px;+ margin-left: -12px;+ border-radius: 999px;color: hsl(var(--muted-foreground));- font-size: 12px;+ font-size: 13px;line-height: 18px;transition: background-color 150ms ease, color 150ms ease;}@@ -111,18 +112,11 @@display: flex;align-items: center;gap: 12px;- margin: 14px 0 6px;+ justify-content: center;+ margin: 16px 0 8px;color: hsl(var(--muted-foreground));- font-size: 11px;+ font-size: 12px;line-height: 16px;- letter-spacing: 0.01em;-}-.run-stamp::before,-.run-stamp::after {- content: "";- flex: 1;- height: 1px;- background: hsl(var(--border));}/* ---- catch-up pill ---------------------------------------------------------- */@@ -136,10 +130,9 @@align-items: center;transform: translateX(-50%);border-radius: 999px;- border: 1px solid hsl(var(--border-strong));- background: hsl(var(--card));- box-shadow: 0 12px 32px -8px rgb(var(--scrim-rgb) / 0.55), 0 1px 2px rgb(var(--scrim-rgb) / 0.18);- font-size: 12px;+ background: hsl(var(--popover));+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.7), 0 12px 32px -8px rgb(var(--scrim-rgb) / 0.55), 0 1px 2px rgb(var(--scrim-rgb) / 0.18);+ font-size: 13px;line-height: 18px;animation: run-pill-in 200ms cubic-bezier(0.2, 0.8, 0.2, 1) both;}@@ -153,8 +146,8 @@}.run-pill button:hover { background: hsl(var(--secondary)); }.run-pill button:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring)); }-.run-pill-main { padding: 5px 6px 5px 12px; }-.run-pill-close { padding: 6px; color: hsl(var(--muted-foreground)) !important; }+.run-pill-main { padding: 6px 8px 6px 14px; }+.run-pill-close { padding: 7px; color: hsl(var(--muted-foreground)) !important; }@keyframes run-pill-in {from { opacity: 0; transform: translate(-50%, 6px); }to { opacity: 1; transform: translate(-50%, 0); }diff --git a/dodaios/ui/web/frontend/src/components/agentchat/inspector/WorkInspector.tsx b/dodaios/ui/web/frontend/src/components/agentchat/inspector/WorkInspector.tsxindex 65c3bb6a9c..8db18d50be 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/inspector/WorkInspector.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/inspector/WorkInspector.tsx@@ -1,8 +1,5 @@import { memo, useCallback, useEffect, useId, useMemo, useRef, useState, type CSSProperties, type KeyboardEvent as ReactKeyboardEvent, type PointerEvent as ReactPointerEvent, type ReactNode } from "react";-import {- Bot, Brain, ChevronRight, ChevronsDownUp, ChevronsUpDown, CircleX, KeyRound, ListTree,- Loader2, MessageCircleQuestion, MessageSquareText, ShieldQuestion, User, X,-} from "lucide-react";+import { ChevronRight, X } from "lucide-react";import { fill, useT } from "@/i18n";import { cn } from "@/lib/utils";import { useStickToBottom } from "@/hooks/useStickToBottom";@@ -10,7 +7,6 @@ import { listSubagents, subagentTurn, type SubagentEntry } from "@/components/agimport { ChatMarkdown } from "../ChatMarkdown";import type { SubagentStatus, ToolBlock, TurnItem } from "../reduce";import { toolDiff } from "../toolDiff";-import { CallMark } from "../TraceTimeline";import { plural, readableOutput, traceDuration } from "../traceEntries";import { formatTokens, outputTokens } from "../toolView";import { inspectorRows, rowCounts, type InspectorRow } from "./inspectorRows";@@ -118,7 +114,7 @@ export const WorkInspector = memo(function WorkInspector({data-testid="work-inspector" data-turn={turn.id}><ResizeEdge width={width} onWidth={onWidth} /><header className="wi-head">- <span className="wi-head-mark" aria-hidden>{avatar ?? <ListTree className="h-4 w-4" />}</span>+ {avatar ? <span className="wi-head-mark" aria-hidden>{avatar}</span> : null}<div className="min-w-0 flex-1"><h2 id={titleId} className="wi-title">{t("run_view.inspector.title")}</h2><p className="wi-meta">{meta.join(" · ")}</p>@@ -228,7 +224,6 @@ function TracePanel({ turn, entry, prompt, onOpenHelper, label }: {<div className="wi-toolbar"><span className="min-w-0 truncate">{lead}</span>{rows.length > 0 ? <button type="button" className="wi-text-btn" onClick={() => setOpen(allOpen ? new Set() : new Set(rows.map((row) => row.id)))}>- {allOpen ? <ChevronsDownUp aria-hidden className="h-3.5 w-3.5" /> : <ChevronsUpDown aria-hidden className="h-3.5 w-3.5" />}{t(allOpen ? "run_view.inspector.collapse_all" : "run_view.inspector.expand_all")}</button> : null}</div>@@ -258,22 +253,14 @@ function helperTrace(entry: SubagentEntry): TurnItem {return { ...trace, blocks: [...trace.blocks, { kind: "text", id: `summary:${entry.id}`, text: summary }] };}-const KIND_ICON = {- prompt: User,- thought: Brain,- reply: MessageSquareText,- question: MessageCircleQuestion,- approval: ShieldQuestion,- credential: KeyRound,- helper: Bot,-} as const;-+/**+ * A row's mark is a quiet dot, not a kind icon: the label already says what+ * the row is. The dot only lights up for a row that is running, failed or+ * waiting on the person; a finished row keeps the slot empty so labels align.+ */function RowMark({ row }: { row: InspectorRow }) {- if (row.status === "running") return <Loader2 aria-hidden className="wi-mark motion-safe:animate-spin" />;- if (row.status === "failed") return <CircleX aria-hidden className="wi-mark" />;- if (row.kind === "call" && row.call) return <span className="wi-mark-box"><CallMark call={row.call} /></span>;- const Icon = row.kind === "call" ? ListTree : KIND_ICON[row.kind];- return <Icon aria-hidden className="wi-mark" strokeWidth={1.75} />;+ const state = row.status === "running" || row.status === "failed" || row.status === "waiting" ? row.status : undefined;+ return <span aria-hidden className="wi-row-dot" data-state={state} />;}const TraceRow = memo(function TraceRow({ row, open, onToggle, onOpenHelper }: {@@ -290,7 +277,7 @@ const TraceRow = memo(function TraceRow({ row, open, onToggle, onOpenHelper }: {{row.added ? <span className="run-diff-add">+{row.added}</span> : null}{row.added && row.removed ? " " : null}{row.removed ? <span className="run-diff-del">−{row.removed}</span> : null}</span> : null}- {row.status === "waiting" || row.status === "declined" || row.status === "stopped"+ {row.status === "waiting" || row.status === "declined" || row.status === "stopped" || row.status === "failed"? <span className="wi-state" data-state={row.status}>{t(`run_view.status.${row.status}`)}</span> : null}{row.durationMs && row.status !== "running" ? <span className="wi-time">{traceDuration(row.durationMs)}</span> : null}<ChevronRight aria-hidden className={cn("wi-chev", open && "is-open")} />@@ -358,7 +345,7 @@ function RowDetail({ row, onOpenHelper }: { row: InspectorRow; onOpenHelper: (id{task ? <Section label={t("run_view.section.task")}><Prose text={task} /></Section> : null}{sub?.summary ? <Section label={t("run_view.section.answer")}><Prose text={sub.summary} /></Section> : null}<button type="button" className="wi-text-btn self-start" onClick={() => onOpenHelper(block.callId)}>- <Bot aria-hidden className="h-3.5 w-3.5" />{t("run_view.inspector.open_helper")}+ {t("run_view.inspector.open_helper")}</button></div>;}diff --git a/dodaios/ui/web/frontend/src/components/agentchat/inspector/inspector.css b/dodaios/ui/web/frontend/src/components/agentchat/inspector/inspector.cssindex ac282d232f..4d205a0af9 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/inspector/inspector.css+++ b/dodaios/ui/web/frontend/src/components/agentchat/inspector/inspector.css@@ -1,6 +1,8 @@/** The work inspector pane. Neutral chrome from the theme ladder; the agent's- * colour (--agent) marks only the selected tab and live rows.+ * colour (--agent) marks only live rows. Calm like the agent pane: no rules+ * between header, tabs and rows, round buttons and tab chips, and nothing+ * below 12px.*/.work-inspector {@@ -12,8 +14,8 @@min-height: 0;height: 100%;max-width: 100%;- border-left: 1px solid hsl(var(--border));- background: hsl(var(--card));+ border-left: 1px solid hsl(var(--border) / 0.6);+ background: hsl(var(--sidebar));color: hsl(var(--foreground));outline: none;animation: wi-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;@@ -59,29 +61,28 @@.wi-head {display: flex;align-items: center;- gap: 10px;- padding: 12px 10px 10px 14px;- border-bottom: 1px solid hsl(var(--border));+ gap: 12px;+ padding: 14px 12px 8px 18px;}.wi-head-mark {display: inline-flex;flex: none;align-items: center;justify-content: center;- width: 28px;- height: 28px;- color: hsl(var(--muted-foreground));+ width: 32px;+ height: 32px;}.wi-title {- font-size: 13.5px;+ font-size: 15px;font-weight: 600;- line-height: 18px;+ line-height: 20px;+ color: hsl(var(--foreground-strong));}.wi-meta {overflow: hidden;color: hsl(var(--muted-foreground));- font-size: 12px;- line-height: 16px;+ font-size: 13px;+ line-height: 18px;font-variant-numeric: tabular-nums;text-overflow: ellipsis;white-space: nowrap;@@ -91,13 +92,16 @@flex: none;align-items: center;justify-content: center;- width: 28px;- height: 28px;- border-radius: 8px;+ width: 34px;+ height: 34px;+ border-radius: 999px;+ background: hsl(var(--secondary));+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.5);color: hsl(var(--muted-foreground));- transition: background-color 150ms ease, color 150ms ease;+ transition: background-color 150ms ease, color 150ms ease, transform 100ms ease;}-.wi-icon-btn:hover { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }+.wi-icon-btn:hover { color: hsl(var(--foreground)); }+.wi-icon-btn:active { transform: scale(0.94); }.wi-icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring)); }/* ---- tabs ----------------------------------------------------------------- */@@ -106,8 +110,7 @@display: flex;gap: 2px;overflow-x: auto;- padding: 6px 8px 0;- border-bottom: 1px solid hsl(var(--border));+ padding: 4px 12px 6px;scrollbar-width: none;}.wi-tabs::-webkit-scrollbar { display: none; }@@ -117,33 +120,25 @@max-width: 220px;flex: none;align-items: center;- gap: 6px;- padding: 6px 10px 8px;- border-radius: 6px 6px 0 0;+ gap: 7px;+ height: 30px;+ padding: 0 12px;+ border-radius: 999px;color: hsl(var(--muted-foreground));- font-size: 12.5px;- line-height: 16px;+ font-size: 13px;+ font-weight: 500;+ line-height: 18px;transition: color 150ms ease, background-color 150ms ease;}-.wi-tab[data-depth] { padding-left: 14px; }-.wi-tab:hover { color: hsl(var(--foreground)); background: hsl(var(--secondary)); }+.wi-tab[data-depth] { padding-left: 16px; }+.wi-tab:hover { color: hsl(var(--foreground)); }.wi-tab:focus-visible { outline: none; box-shadow: inset 0 0 0 2px hsl(var(--ring)); }-.wi-tab[aria-selected="true"] { color: hsl(var(--foreground)); font-weight: 500; }-.wi-tab[aria-selected="true"]::after {- content: "";- position: absolute;- inset: auto 8px -1px;- height: 2px;- border-radius: 2px;- background: var(--agent);-}+.wi-tab[aria-selected="true"] { background: hsl(var(--secondary)); color: hsl(var(--foreground-strong)); }.wi-tab-kind {flex: none;- padding: 0 5px;- border-radius: 6px;- background: hsl(var(--secondary));color: hsl(var(--muted-foreground));- font-size: 11px;+ font-size: 12px;+ font-weight: 400;}.wi-dot {flex: none;@@ -179,11 +174,11 @@align-items: center;justify-content: space-between;gap: 8px;- min-height: 34px;- padding: 6px 10px 4px 14px;+ min-height: 36px;+ padding: 6px 12px 4px 18px;color: hsl(var(--muted-foreground));- font-size: 12px;- line-height: 16px;+ font-size: 13px;+ line-height: 18px;font-variant-numeric: tabular-nums;}.wi-text-btn {@@ -191,11 +186,12 @@flex: none;align-items: center;gap: 5px;- padding: 3px 7px;- border-radius: 6px;+ padding: 4px 10px;+ border-radius: 999px;color: hsl(var(--muted-foreground));- font-size: 12px;- line-height: 16px;+ font-size: 13px;+ font-weight: 500;+ line-height: 18px;transition: background-color 150ms ease, color 150ms ease;}.wi-text-btn:hover { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }@@ -204,7 +200,7 @@flex: 1;min-height: 0;overflow-y: auto;- padding: 2px 6px 16px;+ padding: 2px 10px 20px;}.wi-empty {padding: 28px 16px;@@ -222,11 +218,11 @@display: flex;width: 100%;min-width: 0;- min-height: 32px;+ min-height: 36px;align-items: center;- gap: 8px;- padding: 6px 8px;- border-radius: 8px;+ gap: 10px;+ padding: 7px 10px;+ border-radius: 12px;text-align: left;font-size: 13px;line-height: 18px;@@ -235,19 +231,23 @@.wi-row-btn:hover { background: hsl(var(--secondary)); }.wi-row-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px hsl(var(--ring)); }.wi-row-btn[aria-expanded="true"] { background: hsl(var(--secondary)); }-.wi-mark {- width: 16px;- height: 16px;+/* One quiet slot per row: empty when finished, a dot while running, failed or waiting. */+.wi-row-dot {+ width: 7px;+ height: 7px;flex: none;- color: hsl(var(--muted-foreground));+ border-radius: 999px;+ background: transparent;+}+.wi-row-dot[data-state="running"] {+ background: var(--agent, hsl(var(--foreground)));+ animation: wi-dot-pulse 1.6s ease-in-out infinite;+}+.wi-row-dot[data-state="failed"] { background: hsl(var(--destructive)); }+.wi-row-dot[data-state="waiting"] { background: hsl(var(--warning)); }+@media (prefers-reduced-motion: reduce) {+ .wi-row-dot[data-state="running"] { animation: none; }}-.wi-mark-box { display: inline-flex; flex: none; color: hsl(var(--muted-foreground)); }-.wi-row[data-kind="thought"] .wi-mark { color: hsl(var(--viz-reasoning)); }-.wi-row[data-kind="question"] .wi-mark,-.wi-row[data-kind="approval"] .wi-mark,-.wi-row[data-kind="credential"] .wi-mark { color: hsl(var(--warning)); }-.wi-row[data-status="failed"] .wi-mark { color: hsl(var(--destructive)); }-.wi-row[data-status="running"] .wi-mark { color: var(--agent); }.wi-label {flex: none;max-width: 60%;@@ -284,20 +284,17 @@.wi-time {flex: none;color: hsl(var(--muted-foreground));- font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;- font-size: 11.5px;+ font-size: 12px;font-variant-numeric: tabular-nums;}.wi-state {flex: none;- padding: 0 6px;- border-radius: 6px;- background: hsl(var(--secondary));color: hsl(var(--muted-foreground));- font-size: 11px;+ font-size: 12px;line-height: 16px;}.wi-state[data-state="waiting"] { color: hsl(var(--warning)); }+.wi-state[data-state="failed"] { color: hsl(var(--destructive)); }.wi-chev {width: 14px;height: 14px;@@ -312,9 +309,11 @@/* ---- detail --------------------------------------------------------------- */.wi-detail {- margin: 2px 0 8px 15px;- padding: 6px 4px 4px 17px;- border-left: 1px solid hsl(var(--border));+ margin: 2px 0 10px 4px;+ padding: 10px 12px 12px;+ border-radius: 16px;+ background: hsl(var(--card));+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.5);animation: wi-detail-in 160ms ease-out both;}@keyframes wi-detail-in {@@ -323,27 +322,25 @@}.wi-sections { display: flex; flex-direction: column; gap: 10px; }.wi-section-label {- margin-bottom: 4px;+ margin-bottom: 6px;color: hsl(var(--muted-foreground));- font-size: 11px;+ font-size: 12px;font-weight: 500;- letter-spacing: 0.02em;- line-height: 14px;- text-transform: uppercase;+ line-height: 16px;}.wi-tool-name {color: hsl(var(--muted-foreground));font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;- font-size: 11.5px;+ font-size: 12px;overflow-wrap: anywhere;}.wi-pre,.wi-diff {max-height: 18rem;overflow: auto;- padding: 8px 10px;- border-radius: 10px;- background: hsl(var(--surface-raised));+ padding: 10px 12px;+ border-radius: 12px;+ background: hsl(var(--secondary) / 0.7);color: hsl(var(--foreground-secondary));font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;font-size: 12px;@@ -368,12 +365,12 @@.wi-prose > :first-child { margin-top: 0; }.wi-prose > :last-child { margin-bottom: 0; }.wi-text { font-size: 13px; line-height: 19px; overflow-wrap: anywhere; }-.wi-note { color: hsl(var(--muted-foreground)); font-size: 12px; line-height: 17px; }+.wi-note { color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 18px; }.wi-qa { display: flex; flex-direction: column; gap: 8px; }.wi-answer {margin-top: 2px;color: hsl(var(--muted-foreground));- font-size: 12.5px;+ font-size: 13px;line-height: 18px;}.wi-answer::before { content: "→ "; }@@ -382,7 +379,7 @@.work-inspector, .wi-detail { animation: none; }.wi-dot[data-state="running"] { animation: none; }.wi-live { animation: none; background-image: none; color: hsl(var(--foreground)); }- .wi-chev, .wi-row-btn, .wi-edge::after { transition: none; }+ .wi-chev, .wi-row-btn, .wi-edge::after, .wi-tab, .wi-icon-btn { transition: none; }}@keyframes wi-sweep {from { background-position: 100% 0; }diff --git a/dodaios/ui/web/frontend/src/components/agentchat/questions/QuestionStep.tsx b/dodaios/ui/web/frontend/src/components/agentchat/questions/QuestionStep.tsxindex 883b55f4c6..bb28ad270d 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/questions/QuestionStep.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/questions/QuestionStep.tsx@@ -1,5 +1,5 @@import { forwardRef, useId, useState } from "react";-import { ChevronDown, Info } from "lucide-react";+import { ChevronDown } from "lucide-react";import { useT } from "@/i18n";import type { QuestionItem } from "../reduce";import { OptionRow, OwnAnswerRow } from "./OptionRow";@@ -62,7 +62,6 @@ export const QuestionStep = forwardRef<HTMLTextAreaElement, {{item.recommendationReason && item.options.length ? (<><button type="button" className="qc-why" aria-expanded={why} aria-controls={reasonId} onClick={() => setWhy((open) => !open)}>- <Info aria-hidden className="h-3.5 w-3.5" /><span>{t("question_card.why_toggle")}</span><ChevronDown aria-hidden className="qc-chevron h-3 w-3" style={why ? { transform: "rotate(180deg)" } : undefined} /></button>diff --git a/dodaios/ui/web/frontend/src/components/agentchat/questions/questionCard.css b/dodaios/ui/web/frontend/src/components/agentchat/questions/questionCard.cssindex d51519bcc6..16e7e04bf4 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/questions/questionCard.css+++ b/dodaios/ui/web/frontend/src/components/agentchat/questions/questionCard.css@@ -18,7 +18,7 @@background: hsl(var(--card));color: hsl(var(--foreground));box-shadow:- 0 0 0 1px hsl(var(--border)),+ 0 0 0 1px hsl(var(--border) / 0.6),0 1px 2px rgb(var(--scrim-rgb) / 0.06),0 10px 28px -14px rgb(var(--scrim-rgb) / 0.28);}@@ -224,11 +224,11 @@display: grid;flex: none;place-items: center;- width: 24px;- height: 24px;- border: 1px solid hsl(var(--border-strong));- border-radius: 7px;+ width: 26px;+ height: 26px;+ border-radius: 999px;background: hsl(var(--secondary));+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.7);font-size: 12px;font-weight: 500;line-height: 1;@@ -241,18 +241,17 @@}.qc-keycap[data-on] {- border-color: transparent;background: var(--qc-tint);color: var(--qc-tint-ink);- box-shadow: inset 0 1px 0 rgb(var(--sheen-rgb) / 0.12);+ box-shadow: none;transform: scale(1.04);}.qc-keycap[data-size="sm"] {- width: 18px;- height: 18px;- border-radius: 5px;- font-size: 10.5px;+ width: 20px;+ height: 20px;+ border-radius: 999px;+ font-size: 12px;}.qc-row-body {@@ -270,7 +269,7 @@.qc-desc {display: block;- font-size: 12px;+ font-size: 13px;line-height: 18px;color: hsl(var(--muted-foreground));overflow-wrap: anywhere;@@ -282,7 +281,7 @@border-radius: 999px;padding: 1px 7px;background: hsl(var(--secondary));- font-size: 11px;+ font-size: 12px;line-height: 16px;color: hsl(var(--muted-foreground));}@@ -585,7 +584,7 @@.qc-menu-hint {display: block;- font-size: 11.5px;+ font-size: 12px;line-height: 16px;color: hsl(var(--muted-foreground));}diff --git a/dodaios/ui/web/frontend/src/components/society/attention/AttentionBell.tsx b/dodaios/ui/web/frontend/src/components/society/attention/AttentionBell.tsxindex cba715ef83..3bdef954ec 100644--- a/dodaios/ui/web/frontend/src/components/society/attention/AttentionBell.tsx+++ b/dodaios/ui/web/frontend/src/components/society/attention/AttentionBell.tsx@@ -96,7 +96,7 @@ export function AttentionBell({ className }: { className?: string }) {<spanaria-hiddendata-testid="attention-bell-count"- className="absolute -right-1 -top-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-warning px-1 text-[10px] font-semibold leading-none tabular-nums text-background ring-2 ring-background"+ className="absolute -right-1.5 -top-1.5 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-warning px-1 text-[12px] font-semibold leading-none tabular-nums text-background ring-2 ring-background">{count > 9 ? "9+" : count}</span>@@ -110,7 +110,7 @@ export function AttentionBell({ className }: { className?: string }) {tabIndex={-1}style={{ left, width: `min(${PANEL_W}px, calc(100vw - ${EDGE * 2}px))` }}className={cn(- "fixed top-10 z-[150] overflow-hidden rounded-xl bg-popover text-popover-foreground shadow-float outline-none",+ "fixed top-10 z-[150] overflow-hidden rounded-[24px] bg-popover text-popover-foreground shadow-float outline-none ring-1 ring-inset ring-border/50","origin-top motion-safe:animate-in motion-safe:fade-in-0 motion-safe:zoom-in-95 motion-safe:duration-150",)}>diff --git a/dodaios/ui/web/frontend/src/components/society/attention/AttentionInbox.tsx b/dodaios/ui/web/frontend/src/components/society/attention/AttentionInbox.tsxindex bfb77334df..5222d45b91 100644--- a/dodaios/ui/web/frontend/src/components/society/attention/AttentionInbox.tsx+++ b/dodaios/ui/web/frontend/src/components/society/attention/AttentionInbox.tsx@@ -1,17 +1,5 @@import { useEffect, useMemo, useRef, useState, type ReactNode } from "react";-import {- ArrowUpRight,- Bell,- BellOff,- Check,- Inbox,- KeyRound,- MessageCircleQuestion,- ShieldAlert,- SlidersHorizontal,- Sparkles,- X,-} from "lucide-react";+import { Bell, BellOff, SlidersHorizontal, X } from "lucide-react";import { fill, useT } from "@/i18n";import { cn } from "@/lib/utils";@@ -20,7 +8,7 @@ import { AgentSwatch } from "@/components/society/AgentSwatch";import { useSocietyRoster, type SocietyAgent } from "@/components/society/data";import { openAgent } from "@/views/society/agentNavigation";-import { quickActionsFor, runQuickAction, type AttentionItem, type AttentionKind, type QuickAction } from "./attentionApi";+import { quickActionsFor, runQuickAction, type AttentionItem, type QuickAction } from "./attentionApi";import {desktopNotificationsSupported,desktopPermission,@@ -40,17 +28,13 @@ import { useAgentAttention, type AttentionGroup } from "./useAgentAttention";* one-pick question, an approval, a proposed change) and every row opens its* card in the agent's chat. Nothing in this list ever widens a permission:* "allow" here always means this once.+ *+ * Calm like the rest of the Agent section: words instead of kind icons,+ * rows that separate by space, round buttons, nothing below 12px.*/const LETTERS = "ABCD";-const KIND_ICON: Record<AttentionKind, typeof ShieldAlert> = {- question: MessageCircleQuestion,- approval: ShieldAlert,- credential: KeyRound,- proposal: Sparkles,-};-/** A clock that ticks every `ms` while something on screen depends on it. */function useNow(ms: number): number {const [now, setNow] = useState(Date.now);@@ -96,10 +80,10 @@ export function AttentionInbox({ onClose, className }: { onClose?: () => void; creturn (<div className={cn("flex max-h-[min(70vh,560px)] min-h-0 flex-col", className)} data-testid="attention-inbox">- <header className="flex items-center gap-2 border-b border-border px-4 pb-2.5 pt-3">- <h2 className="m-0 text-sm font-semibold text-foreground-strong">{t("agent_attention.title")}</h2>+ <header className="flex items-center gap-2 px-4 pb-2 pt-3.5">+ <h2 className="m-0 text-[15px] font-semibold text-foreground-strong">{t("agent_attention.title")}</h2>{count > 0 && (- <span className="rounded-full bg-secondary px-1.5 text-xs font-medium tabular-nums text-muted-foreground" data-testid="attention-inbox-count">+ <span className="text-[13px] tabular-nums text-muted-foreground" data-testid="attention-inbox-count">{count}</span>)}@@ -110,35 +94,31 @@ export function AttentionInbox({ onClose, className }: { onClose?: () => void; caria-expanded={settings}aria-label={t("agent_attention.settings")}title={t("agent_attention.settings")}- className={cn(- "inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors duration-150",- "hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",- settings && "bg-secondary text-foreground",- )}+ className={cn(ROUND_ICON, settings && "bg-secondary text-foreground")}>- <SlidersHorizontal className="h-3.5 w-3.5" strokeWidth={1.9} aria-hidden />+ <SlidersHorizontal className="h-4 w-4" strokeWidth={1.8} aria-hidden /></button>{onClose && (<buttontype="button"onClick={onClose}aria-label={t("agent_attention.close")}- className="inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors duration-150 hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"+ className={ROUND_ICON}>- <X className="h-3.5 w-3.5" strokeWidth={1.9} aria-hidden />+ <X className="h-4 w-4" strokeWidth={1.8} aria-hidden /></button>)}</header>{settings && <NotificationSettings />}<div className="chat-scroller min-h-0 flex-1 overflow-y-auto px-2 py-2">{isLoading && groups.length === 0 ? (- <p role="status" className="px-3 py-6 text-center text-xs text-muted-foreground">{t("agent_attention.loading")}</p>+ <p role="status" className="px-3 py-6 text-center text-[13px] text-muted-foreground">{t("agent_attention.loading")}</p>) : isError && groups.length === 0 ? (- <p role="alert" className="px-3 py-6 text-center text-xs text-muted-foreground">{t("agent_attention.unavailable")}</p>+ <p role="alert" className="px-3 py-6 text-center text-[13px] text-muted-foreground">{t("agent_attention.unavailable")}</p>) : groups.length === 0 ? (<EmptyInbox />) : (- <ul className="m-0 flex list-none flex-col gap-1 p-0">+ <ul className="m-0 flex list-none flex-col gap-3 p-0">{groups.map((group) => (<AgentGroupRow key={group.agentId} group={group} agent={agents.get(group.agentId)} now={now} onOpened={onClose} />))}@@ -152,12 +132,9 @@ export function AttentionInbox({ onClose, className }: { onClose?: () => void; cfunction EmptyInbox() {const t = useT();return (- <div className="flex flex-col items-center gap-2 px-6 py-8 text-center" data-testid="attention-inbox-empty">- <span className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-secondary text-muted-foreground">- <Inbox className="h-4 w-4" strokeWidth={1.8} aria-hidden />- </span>- <p className="m-0 text-sm font-medium text-foreground">{t("agent_attention.empty_title")}</p>- <p className="m-0 max-w-[260px] text-xs leading-relaxed text-muted-foreground">{t("agent_attention.empty_body")}</p>+ <div className="flex flex-col items-center gap-1.5 px-6 py-10 text-center" data-testid="attention-inbox-empty">+ <p className="m-0 text-[14px] font-medium text-foreground">{t("agent_attention.empty_title")}</p>+ <p className="m-0 max-w-[260px] text-[13px] leading-relaxed text-muted-foreground">{t("agent_attention.empty_body")}</p></div>);}@@ -170,15 +147,16 @@ function AgentGroupRow({ group, agent, now, onOpened }: {const name = agent?.name || group.agentId;const muteLabel = fill(t(muted ? "agent_attention.unmute" : "agent_attention.mute"), { agent: name });return (- <li className="group/agent rounded-lg" data-testid="attention-group" data-agent-id={group.agentId}>- <div className="flex items-center gap-2 px-2 pb-1 pt-1.5">- {agent ? <AgentSwatch agent={agent} size={20} /> : <span aria-hidden className="h-5 w-5 rounded-full bg-secondary" />}- <span className="min-w-0 truncate text-xs font-semibold text-foreground">{name}</span>- <span className="text-xs tabular-nums text-muted-foreground">+ <li className="group/agent" data-testid="attention-group" data-agent-id={group.agentId}>+ <div className="flex items-center gap-2.5 px-2 pb-1 pt-1">+ {/* An agent the roster no longer knows shows its name alone, never an empty disc. */}+ {agent ? <AgentSwatch agent={agent} size={24} /> : null}+ <span className="min-w-0 truncate text-[14px] font-semibold text-foreground">{name}</span>+ <span className="text-[13px] tabular-nums text-muted-foreground">{fill(t("agent_attention.waiting_count"), { count: group.items.length })}</span><span className="flex-1" />- {muted && <span className="text-xs text-muted-foreground">{t("agent_attention.muted")}</span>}+ {muted && <span className="text-[13px] text-muted-foreground">{t("agent_attention.muted")}</span>}<buttontype="button"onClick={() => toggleAgentMuted(group.agentId)}@@ -186,15 +164,14 @@ function AgentGroupRow({ group, agent, now, onOpened }: {aria-label={muteLabel}title={muteLabel}className={cn(- "inline-flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground transition-[opacity,color,background-color] duration-150",- "hover:bg-secondary hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",+ ROUND_ICON, "transition-[opacity,color,background-color] focus-visible:opacity-100",muted ? "opacity-100" : "opacity-0 group-hover/agent:opacity-100",)}>{muted ? <BellOff className="h-3.5 w-3.5" strokeWidth={1.9} aria-hidden /> : <Bell className="h-3.5 w-3.5" strokeWidth={1.9} aria-hidden />}</button></div>- <ul className="m-0 flex list-none flex-col p-0">+ <ul className="m-0 mt-1 flex list-none flex-col gap-1 p-0">{group.items.map((item) => (<AttentionRow key={`${item.sessionId}:${item.refId}`} item={item} now={now} onOpened={onOpened} />))}@@ -214,8 +191,6 @@ function AttentionRow({ item, now, onOpened }: { item: AttentionItem; now: numbeconst [error, setError] = useState(false);const [done, setDone] = useState(false);const actions = quickActionsFor(item);- const Icon = KIND_ICON[item.kind] ?? MessageCircleQuestion;- const live = item.source === "chat";const run = async (action: QuickAction, index: number) => {if (busy !== null) return;@@ -245,76 +220,60 @@ function AttentionRow({ item, now, onOpened }: { item: AttentionItem; now: numbereturn (<liclassName={cn(- "group/item relative flex gap-2.5 rounded-lg px-2 py-2 transition-[background-color,opacity] duration-200",+ "relative rounded-[18px] bg-secondary/50 px-3.5 py-3 transition-[background-color,opacity] duration-200","hover:bg-secondary focus-within:bg-secondary",- done && "opacity-60",+ done && "opacity-50",)}data-testid="attention-item"data-kind={item.kind}data-ref={item.refId}>- <span- aria-hidden- className={cn(- "mt-0.5 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-secondary group-hover/item:bg-background",- live ? "text-warning" : "text-muted-foreground",- )}- >- {done ? <Check className="h-3.5 w-3.5 text-foreground" strokeWidth={2.2} /> : <Icon className="h-3.5 w-3.5" strokeWidth={1.9} />}- </span>- <div className="min-w-0 flex-1">+ <div className="min-w-0"><buttontype="button"onClick={() => open(item, onOpened)}- className="block w-full rounded-sm text-left text-sm leading-snug text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"+ className="block w-full rounded-md text-left text-[14px] leading-snug text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><span className="line-clamp-2 [overflow-wrap:anywhere]">{item.summary || kindLabel(t, item)}</span></button>- <p className="m-0 mt-0.5 flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground">+ <p className="m-0 mt-1 flex flex-wrap items-center gap-x-1.5 text-[13px] text-muted-foreground">{meta.map((part, index) => (<span key={index} className="inline-flex items-center gap-1.5">- {index > 0 && <span aria-hidden className="text-border-strong">·</span>}+ {index > 0 && <span aria-hidden>·</span>}{part}</span>))}</p>{actions.length > 0 && !done && (- <div className="mt-2 flex flex-wrap gap-1.5" role="group" aria-label={t("agent_attention.quick_answer")}>+ <div className="mt-3 flex flex-wrap gap-2" role="group" aria-label={t("agent_attention.quick_answer")}>{actions.map((action, index) => (<QuickButton key={index} item={item} action={action} index={index} busy={busy} onRun={run} />))}</div>)}{error && (- <p role="alert" className="m-0 mt-1.5 text-xs text-destructive">{t("agent_attention.failed")}</p>+ <p role="alert" className="m-0 mt-2 text-[13px] text-destructive">{t("agent_attention.failed")}</p>)}</div>- <button- type="button"- onClick={() => open(item, onOpened)}- aria-label={t("agent_attention.open_card")}- title={t("agent_attention.open_card")}- className={cn(- "mt-0.5 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-[opacity,color] duration-150",- "opacity-0 hover:text-foreground group-hover/item:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",- )}- >- <ArrowUpRight className="h-3.5 w-3.5" strokeWidth={1.9} aria-hidden />- </button></li>);}const QUIET_BUTTON =- "inline-flex h-7 max-w-full items-center gap-1.5 rounded-md border border-border bg-background px-2 text-xs text-foreground " +- "transition-colors duration-150 hover:border-border-strong hover:bg-surface-raised disabled:opacity-50 " +- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";+ "inline-flex h-8 max-w-full items-center gap-1.5 rounded-full bg-background px-3.5 text-[13px] font-medium text-foreground " ++ "shadow-[inset_0_0_0_1px_hsl(var(--border)/0.7)] transition-colors duration-150 hover:bg-surface-raised disabled:opacity-50 " ++ "motion-safe:active:scale-[0.97] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";const INK_BUTTON =- "inline-flex h-7 items-center gap-1.5 rounded-md bg-foreground px-2.5 text-xs font-medium text-background " +- "transition-opacity duration-150 hover:opacity-90 disabled:opacity-50 " ++ "inline-flex h-8 items-center gap-1.5 rounded-full bg-foreground px-4 text-[13px] font-medium text-background " ++ "transition-opacity duration-150 hover:opacity-90 disabled:opacity-50 motion-safe:active:scale-[0.97] " +"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background";+/** The round icon buttons: settings, close, mute. */+const ROUND_ICON =+ "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors duration-150 " ++ "hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";+function QuickButton({ item, action, index, busy, onRun }: {item: AttentionItem;action: QuickAction;@@ -329,7 +288,7 @@ function QuickButton({ item, action, index, busy, onRun }: {return (<button type="button" disabled={disabled} onClick={() => onRun(action, index)} className={QUIET_BUTTON}aria-label={label} data-testid="attention-option">- <span aria-hidden className="font-mono text-xs text-muted-foreground">{LETTERS[action.index]}</span>+ <span aria-hidden className="text-[13px] text-muted-foreground">{LETTERS[action.index]}</span><span className="truncate">{label}</span></button>);@@ -360,7 +319,7 @@ function NotificationSettings() {: t("agent_attention.desktop_hint");const switching = useRef(false);return (- <section className="flex flex-col gap-3 border-b border-border bg-sidebar px-4 py-3" aria-label={t("agent_attention.settings")}+ <section className="mx-3 mb-1 flex flex-col gap-3 rounded-[18px] bg-secondary/50 px-4 py-3.5" aria-label={t("agent_attention.settings")}data-testid="attention-settings"><SettingRowid="attention-desktop"@@ -394,8 +353,8 @@ function SettingRow({ id, label, hint, checked, disabled = false, onChange }: {return (<div className="flex items-start gap-3"><div className="min-w-0 flex-1">- <label htmlFor={id} className="block text-xs font-medium text-foreground">{label}</label>- <p id={`${id}-hint`} className="m-0 mt-0.5 text-xs leading-relaxed text-muted-foreground">{hint}</p>+ <label htmlFor={id} className="block text-[14px] font-medium text-foreground">{label}</label>+ <p id={`${id}-hint`} className="m-0 mt-0.5 text-[13px] leading-relaxed text-muted-foreground">{hint}</p></div><Switch id={id} checked={checked} disabled={disabled} onCheckedChange={onChange} aria-describedby={`${id}-hint`} /></div>diff --git a/dodaios/ui/web/frontend/src/components/society/calmSheet.css b/dodaios/ui/web/frontend/src/components/society/calmSheet.cssnew file mode 100644index 0000000000..ce9c47bd64--- /dev/null+++ b/dodaios/ui/web/frontend/src/components/society/calmSheet.css@@ -0,0 +1,379 @@+/*+ * The Agent section's dialogs and popovers: one calm sheet.+ *+ * The same quiet language as the agent pane (`card/pane/agentPane.css`): a+ * soft rounded sheet with no rules between its parts, plain word tabs on one+ * round track, fields that are round and filled instead of outlined, rows that+ * separate by space, fully round buttons, 14px primary and 13px secondary+ * text (never below 12px), theme tokens only so light and dark both follow+ * the app, and short motion that switches off under reduced motion.+ */++.cs-sheet {+ --cs-radius-sm: 12px;+ --cs-radius: 16px;+ --cs-radius-lg: 20px;+ --cs-radius-sheet: 26px;+ border: 0 !important;+ border-radius: var(--cs-radius-sheet) !important;+ background: hsl(var(--popover));+ box-shadow:+ inset 0 0 0 1px hsl(var(--border) / 0.55),+ 0 2px 8px rgb(var(--scrim-rgb) / 0.12),+ 0 24px 64px rgb(var(--scrim-rgb) / 0.28);+ color: hsl(var(--foreground));+}++/* ------------------------------------------------------------ head / foot */++.cs-head {+ display: flex;+ flex-shrink: 0;+ flex-direction: column;+ gap: 14px;+ padding: 22px 24px 12px;+}+.cs-head-row { display: flex; align-items: flex-start; gap: 12px; }+.cs-title {+ font-size: 18px;+ font-weight: 600;+ line-height: 1.3;+ letter-spacing: -0.015em;+ color: hsl(var(--foreground-strong));+}+.cs-sub {+ margin-top: 2px;+ font-size: 13px;+ line-height: 1.45;+ color: hsl(var(--muted-foreground));+}+.cs-foot {+ display: flex;+ flex-shrink: 0;+ flex-wrap: wrap;+ align-items: center;+ justify-content: flex-end;+ gap: 8px;+ padding: 14px 24px 20px;+}+.cs-foot-note {+ margin-right: auto;+ font-size: 13px;+ color: hsl(var(--muted-foreground));+}++/* The one round close button in a sheet's corner. */+.cs-close {+ display: inline-flex;+ height: 34px;+ width: 34px;+ flex-shrink: 0;+ align-items: center;+ justify-content: center;+ border-radius: 999px;+ background: hsl(var(--secondary));+ color: hsl(var(--muted-foreground));+ transition: background-color 150ms ease, color 150ms ease, transform 100ms ease;+}+.cs-close:hover { color: hsl(var(--foreground)); }+.cs-close:active { transform: scale(0.94); }+.cs-close:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring)); }++/* ------------------------------------------------------------------ tabs */++/* Words on one round track; the chosen one sits on a lifted chip. */+.cs-tabs {+ display: inline-flex;+ max-width: 100%;+ align-self: flex-start;+ gap: 2px;+ border-radius: 999px;+ background: hsl(var(--secondary) / 0.7);+ padding: 3px;+}+.cs-tabs[data-fill="true"] { display: flex; align-self: stretch; }+.cs-tab {+ display: inline-flex;+ min-width: 0;+ height: 32px;+ flex: 1 1 auto;+ align-items: center;+ justify-content: center;+ gap: 6px;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ border-radius: 999px;+ padding: 0 16px;+ font-size: 13px;+ font-weight: 500;+ color: hsl(var(--muted-foreground));+ transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;+}+.cs-tab:hover:not(:disabled) { color: hsl(var(--foreground)); }+.cs-tab:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring)); }+.cs-tab:disabled { opacity: 0.45; cursor: not-allowed; }+.cs-tab:is([aria-selected="true"], [aria-checked="true"], [aria-pressed="true"]) {+ background: hsl(var(--popover));+ color: hsl(var(--foreground-strong));+ box-shadow: 0 1px 2px rgb(var(--scrim-rgb) / 0.12), inset 0 0 0 1px hsl(var(--border) / 0.6);+}+/* In dark the track sinks below the sheet and the chosen chip rises above it. */+.dark .cs-tabs { background: hsl(var(--background) / 0.75); box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.5); }+.dark .cs-tab:is([aria-selected="true"], [aria-checked="true"], [aria-pressed="true"]) { background: hsl(var(--secondary)); }++/* ----------------------------------------------------------------- text */++.cs-label {+ font-size: 14px;+ font-weight: 500;+ color: hsl(var(--foreground));+}+.cs-section-title {+ padding: 0 4px;+ font-size: 13px;+ font-weight: 500;+ color: hsl(var(--muted-foreground));+}+.cs-hint {+ font-size: 13px;+ line-height: 1.45;+ color: hsl(var(--muted-foreground));+}+.cs-hint[data-tone="warn"] { color: hsl(var(--warning)); }+.cs-hint[data-tone="error"] { color: hsl(var(--destructive)); }++/* ---------------------------------------------------------------- fields */++/* Fields are round and filled: no outline at rest, a soft ring on focus. */+.cs-sheet :is(input:not([type="checkbox"], [type="radio"], [type="color"], [type="range"], [type="file"]), [role="combobox"]) {+ min-height: 40px;+ border: 0;+ border-radius: 999px;+ background: hsl(var(--secondary) / 0.75);+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.5);+ padding-left: 16px;+ padding-right: 14px;+ font-size: 14px;+}+.cs-sheet textarea {+ border: 0;+ border-radius: var(--cs-radius);+ background: hsl(var(--secondary) / 0.75);+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.5);+ padding: 12px 14px;+ font-size: 14px;+ line-height: 1.5;+}+/* In dark a field sinks below the sheet, like the tab track, so an empty one still reads as a field. */+.dark .cs-sheet :is(input:not([type="checkbox"], [type="radio"], [type="color"], [type="range"], [type="file"]), textarea, [role="combobox"]) {+ background: hsl(var(--background) / 0.75);+}+.cs-sheet :is(input, textarea, [role="combobox"]):focus-visible {+ outline: none;+ box-shadow: inset 0 0 0 1px hsl(var(--border-strong)), 0 0 0 3px hsl(var(--ring) / 0.22);+ --tw-ring-shadow: 0 0 #0000;+ --tw-ring-offset-shadow: 0 0 #0000;+}+.cs-sheet .cs-search { position: relative; }++/* Colour wells are round swatches, not boxed native pickers. */+.cs-sheet input[type="color"] { -webkit-appearance: none; appearance: none; border: 0; padding: 0; cursor: pointer; }+.cs-sheet input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }+.cs-sheet input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.7); }+.cs-sheet input[type="color"]::-moz-color-swatch { border: 0; border-radius: 999px; }+.cs-sheet .cs-search > input { padding-left: 16px; }++/* ----------------------------------------------------------------- cards */++/* One soft rounded surface; rows inside separate by space, not rules. */+.cs-card {+ display: flex;+ flex-direction: column;+ border-radius: var(--cs-radius-lg);+ background: hsl(var(--card));+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.55);+ padding: 4px;+}+.cs-card[data-pad="true"] { padding: 14px 16px; gap: 6px; }++.cs-row {+ display: flex;+ min-height: 48px;+ width: 100%;+ min-width: 0;+ align-items: center;+ gap: 12px;+ border-radius: 14px;+ padding: 8px 12px;+ text-align: left;+ transition: background-color 150ms ease;+}+:is(button, label).cs-row { cursor: pointer; }+:is(button, label).cs-row:hover { background: hsl(var(--secondary) / 0.7); }+.cs-row:is([aria-selected="true"], [aria-checked="true"]) { background: hsl(var(--secondary)); }+.cs-row:focus-visible,+.cs-row:focus-within:has(:focus-visible) { outline: none; box-shadow: inset 0 0 0 2px hsl(var(--ring)); }+.cs-row-name {+ display: block;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ font-size: 14px;+ font-weight: 500;+ color: hsl(var(--foreground));+}+/* A row's plain words: the regular weight of a list, not a heading. */+.cs-row-text {+ display: block;+ min-width: 0;+ flex: 1 1 auto;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ font-size: 14px;+ color: hsl(var(--foreground));+}+.cs-row-detail {+ display: block;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ font-size: 13px;+ color: hsl(var(--muted-foreground));+}+.cs-row-end {+ flex-shrink: 0;+ font-size: 13px;+ color: hsl(var(--muted-foreground));+}+.cs-row-end[data-tone="warn"] { color: hsl(var(--warning)); }++/* A round tick: the row reads as chosen without a box. */+.cs-tick {+ display: inline-flex;+ height: 22px;+ width: 22px;+ flex-shrink: 0;+ align-items: center;+ justify-content: center;+ border-radius: 999px;+ box-shadow: inset 0 0 0 1.5px hsl(var(--border-strong));+ color: hsl(var(--background));+ transition: background-color 150ms ease, box-shadow 150ms ease;+}+.cs-tick[data-on="true"] {+ background: hsl(var(--foreground));+ box-shadow: none;+}++/* ----------------------------------------------------------------- chips */++.cs-chip {+ display: inline-flex;+ height: 32px;+ align-items: center;+ gap: 6px;+ border-radius: 999px;+ padding: 0 14px;+ font-size: 13px;+ font-weight: 500;+ color: hsl(var(--muted-foreground));+ transition: background-color 150ms ease, color 150ms ease;+}+.cs-chip:hover { background: hsl(var(--secondary) / 0.7); color: hsl(var(--foreground)); }+.cs-chip:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring)); }+.cs-chip[aria-pressed="true"] {+ background: hsl(var(--secondary));+ color: hsl(var(--foreground-strong));+}+.cs-chip-count { font-variant-numeric: tabular-nums; color: hsl(var(--muted-foreground)); font-weight: 400; }++/* --------------------------------------------------------------- buttons */++.cs-btn {+ display: inline-flex;+ height: 36px;+ flex-shrink: 0;+ align-items: center;+ justify-content: center;+ gap: 6px;+ white-space: nowrap;+ border-radius: 999px;+ padding: 0 16px;+ font-size: 14px;+ font-weight: 500;+ color: hsl(var(--foreground));+ transition: background-color 150ms ease, opacity 150ms ease, transform 100ms ease;+}+.cs-btn[data-size="sm"] { height: 32px; padding: 0 14px; font-size: 13px; }+.cs-btn:active:not(:disabled) { transform: scale(0.97); }+.cs-btn:disabled { opacity: 0.45; cursor: not-allowed; }+.cs-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring)); }+.cs-btn[data-variant="primary"] { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }+.cs-btn[data-variant="primary"]:hover:not(:disabled) { opacity: 0.9; }+.cs-btn[data-variant="soft"] { background: hsl(var(--secondary)); }+.cs-btn[data-variant="soft"]:hover:not(:disabled) { background: hsl(var(--secondary) / 0.7); }+.cs-btn[data-variant="ghost"]:hover:not(:disabled) { background: hsl(var(--secondary)); }+.cs-btn[data-variant="danger"] { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }++/* A quiet text action: "Read the instructions", "Change". */+.cs-link {+ display: inline-flex;+ align-items: center;+ gap: 4px;+ align-self: flex-start;+ border-radius: 999px;+ padding: 4px 10px;+ margin: -4px -10px;+ font-size: 13px;+ font-weight: 500;+ color: hsl(var(--muted-foreground));+ transition: background-color 150ms ease, color 150ms ease;+}+.cs-link:hover:not(:disabled) { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }+.cs-link:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring)); }++/* An empty state: words alone, centred, no frame. */+.cs-empty {+ display: flex;+ min-height: 220px;+ flex: 1;+ align-items: center;+ justify-content: center;+ border-radius: var(--cs-radius-lg);+ background: hsl(var(--secondary) / 0.35);+ padding: 24px;+ text-align: center;+ font-size: 14px;+ color: hsl(var(--muted-foreground));+}++@media (prefers-reduced-motion: reduce) {+ .cs-tab,+ .cs-row,+ .cs-chip,+ .cs-btn,+ .cs-close,+ .cs-tick { transition: none; }+}++/* A picture choice (a figure, a pet, a shape): a soft round tile, ringed when chosen. */+.calm-tile {+ display: grid;+ place-items: center;+ border-radius: 18px;+ background: hsl(var(--secondary) / 0.45);+ transition: background-color 150ms ease, box-shadow 150ms ease;+}+.calm-tile:hover:not(:disabled) { background: hsl(var(--secondary) / 0.85); }+.calm-tile:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring)); }+.calm-tile[data-on="true"] {+ background: hsl(var(--secondary));+ box-shadow: inset 0 0 0 1.5px hsl(var(--foreground) / 0.6);+}+.calm-tile:disabled { background: hsl(var(--secondary) / 0.25); }++@media (prefers-reduced-motion: reduce) {+ .calm-tile { transition: none; }+}diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentSandboxSection.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentSandboxSection.tsxindex c762a674f2..6b6aca2e36 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentSandboxSection.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentSandboxSection.tsx@@ -14,19 +14,34 @@ async function json<T>(url: string, init?: RequestInit): Promise<T> {return body as T;}-export function SandboxChoice({ value, onChange, disabled = false }: {+export function SandboxChoice({ value, onChange, disabled = false, layout = "field" }: {value: "local" | "sandbox"; onChange: (value: "local" | "sandbox") => void; disabled?: boolean;+ /** "row": a label on the left and a quiet picker on the right, as a line of a pane card. */+ layout?: "field" | "row";}) {const t = useT();- return <div className="flex flex-col gap-2 text-sm">- <span className="font-medium">{t("society.sandbox.environment")}</span>+ if (layout === "row") {+ return <div className="ap-line">+ <span className="ap-line-label">{t("society.sandbox.environment")}</span>+ <span className="ml-auto shrink-0">+ <BrandedSelect ariaLabel={t("society.sandbox.environment")} value={value} disabled={disabled} className="ap-pick"+ onValueChange={(next) => onChange(next as "local" | "sandbox")}+ options={[+ { value: "local", label: t("society.sandbox.local") },+ { value: "sandbox", label: t("society.sandbox.code") },+ ]} />+ </span>+ </div>;+ }+ return <div className="flex flex-col gap-2">+ <span className="text-[14px] font-medium">{t("society.sandbox.environment")}</span><BrandedSelect ariaLabel={t("society.sandbox.environment")} value={value} disabled={disabled}onValueChange={(next) => onChange(next as "local" | "sandbox")}options={[{ value: "local", label: t("society.sandbox.local") },{ value: "sandbox", label: t("society.sandbox.code") },]} />- {value === "sandbox" ? <span className="text-xs text-muted-foreground">{t("society.sandbox.scope")}</span> : null}+ {value === "sandbox" ? <span className="text-[13px] leading-snug text-muted-foreground">{t("society.sandbox.scope")}</span> : null}</div>;}@@ -35,7 +50,7 @@ export function SandboxChoice({ value, onChange, disabled = false }: {* section), `files` the sandbox file browser alone (its Files page), `all`* both, as the create dialog and older surfaces use it.*/-export function AgentSandboxSection({ agent, show = "all" }: { agent: SocietyAgent; show?: "all" | "choice" | "files" }) {+export function AgentSandboxSection({ agent, show = "all", layout = "field" }: { agent: SocietyAgent; show?: "all" | "choice" | "files"; layout?: "field" | "row" }) {const t = useT();const client = useQueryClient();const [error, setError] = useState("");@@ -68,17 +83,17 @@ export function AgentSandboxSection({ agent, show = "all" }: { agent: SocietyAge});await client.invalidateQueries({ queryKey: ["society", "roster"] });});- return <section className="flex flex-col gap-3" data-testid="agent-sandbox">- {show !== "files" ? <SandboxChoice value={enabled ? "sandbox" : "local"} disabled={busy || agent.runtime !== "jarvis" && !!agent.runtime}+ return <section className={layout === "row" ? "flex flex-col" : "flex flex-col gap-3"} data-testid="agent-sandbox">+ {show !== "files" ? <SandboxChoice layout={layout} value={enabled ? "sandbox" : "local"} disabled={busy || agent.runtime !== "jarvis" && !!agent.runtime}onChange={(value) => {if (enabled && value === "local") setConfirmLocal(true);else place(value);}} /> : null}- {confirmLocal ? <div role="alertdialog" aria-label={t("society.agent_pane.leave_sandbox")} className="flex flex-col gap-2 rounded-lg border border-warning p-3 text-xs" data-testid="agent-sandbox-confirm-local">+ {confirmLocal ? <div role="alertdialog" aria-label={t("society.agent_pane.leave_sandbox")} className="m-1 flex flex-col gap-2 rounded-2xl bg-warning/10 p-3 text-[13px]" data-testid="agent-sandbox-confirm-local"><p className="text-foreground">{t("society.agent_pane.leave_sandbox_body")}</p><div className="flex justify-end gap-2">- <Button size="sm" variant="ghost" onClick={() => setConfirmLocal(false)}>{t("society.agent_pane.go_back")}</Button>- <Button size="sm" onClick={() => place("local")} data-testid="agent-sandbox-confirm-local-yes">{t("society.agent_pane.allow_and_save")}</Button>+ <Button size="sm" variant="ghost" className="rounded-full" onClick={() => setConfirmLocal(false)}>{t("society.agent_pane.go_back")}</Button>+ <Button size="sm" className="rounded-full" onClick={() => place("local")} data-testid="agent-sandbox-confirm-local-yes">{t("society.agent_pane.allow_and_save")}</Button></div></div> : null}{enabled && show !== "choice" ? <>diff --git a/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.test.tsx b/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.test.tsxindex 628603e382..2401165634 100644--- a/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.test.tsx@@ -294,7 +294,9 @@ describe("OptionsRail (agent pane)", () => {mount(agent({ denies: ["plugin:gmail"] }));const row = await screen.findByTestId("agent-pane-tool-plugin:gmail");expect(row.getAttribute("data-state")).toBe("blocked");- fireEvent.click(row.querySelector('[data-value="on"]')!);+ // One round pill names the state; it opens a short menu of the others.+ fireEvent.click(row.querySelector('button[aria-haspopup="menu"]')!);+ fireEvent.click(within(row).getByRole("menuitemradio", { name: "On" }));fireEvent.click(await screen.findByTestId("agent-pane-save"));const confirm = await screen.findByTestId("agent-pane-widen");await waitFor(() => expect(confirm.textContent).toContain("Gmail"));diff --git a/dodaios/ui/web/frontend/src/components/society/card/RuntimePicker.tsx b/dodaios/ui/web/frontend/src/components/society/card/RuntimePicker.tsxindex e08ed68aa7..fe997ff385 100644--- a/dodaios/ui/web/frontend/src/components/society/card/RuntimePicker.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/RuntimePicker.tsx@@ -161,17 +161,14 @@ export function RuntimeChoice({ value, onChange, disabled = false }: {onClick={() => onChange(runtime)}onKeyDown={(event) => onKeyDown(event, runtime)}className={cn(- "flex flex-col items-start gap-1 rounded-lg border p-2.5 text-left transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",+ "flex min-w-0 flex-col items-start gap-0.5 rounded-2xl px-3.5 py-3 text-left transition-[background-color,box-shadow] disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",value === runtime- ? "border-border-strong bg-secondary text-foreground"- : "border-border text-muted-foreground hover:bg-secondary",+ ? "bg-secondary text-foreground shadow-[inset_0_0_0_1.5px_hsl(var(--foreground)/0.55)]"+ : "bg-secondary/45 text-muted-foreground hover:bg-secondary/80",)}>- <span className="inline-flex items-center gap-1.5 text-sm font-medium text-foreground">- <RuntimeMark runtime={runtime} label={label} />- {label}- </span>- <span id={`${id}-state-${runtime}`} className="inline-flex items-center gap-1 text-xs leading-snug">+ <span className="w-full text-[14px] font-medium leading-snug text-foreground">{label}</span>+ <span id={`${id}-state-${runtime}`} className="inline-flex items-center gap-1 text-[13px] leading-snug">{state === "setting_up" ? <Loader2 className="size-3 animate-spin" aria-hidden /> : null}{t(state === null@@ -187,7 +184,7 @@ export function RuntimeChoice({ value, onChange, disabled = false }: {);})}</div>- <p id={`${id}-hint`} className="text-xs text-muted-foreground">{t(`society.runtime.${value}_hint`)}</p>+ <p id={`${id}-hint`} className="text-[13px] leading-snug text-muted-foreground">{t(`society.runtime.${value}_hint`)}</p>{value !== "jarvis" ? (<RuntimeSetupNote status={chosen} error={error} onRetry={() => void ensure(value)} />) : null}diff --git a/dodaios/ui/web/frontend/src/components/society/card/ShareAgentDialog.tsx b/dodaios/ui/web/frontend/src/components/society/card/ShareAgentDialog.tsxindex b76eb9f39f..a059ebc771 100644--- a/dodaios/ui/web/frontend/src/components/society/card/ShareAgentDialog.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/ShareAgentDialog.tsx@@ -15,23 +15,8 @@import { lazy, Suspense, useEffect, useMemo, useRef, useState } from "react";import * as Dialog from "@radix-ui/react-dialog";import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";-import {- AlertTriangle,- Check,- Copy,- Download,- ExternalLink,- FileJson,- Github,- Loader2,- Lock,- ShieldCheck,- Sparkles,- UploadCloud,- X,-} from "lucide-react";--import { Button } from "@/components/ui/button";+import { Loader2, X } from "lucide-react";+import {GithubSignInDialog,PublisherAvatar,@@ -55,9 +40,9 @@ import {} from "@/lib/agentShare";import { robustCopy } from "@/lib/clipboard";import { openExternalUrl } from "@/lib/openExternal";-import { cn } from "@/lib/utils";import { AgentSwatch } from "../AgentSwatch";+import "../calmSheet.css";import { useSocietyChatStore } from "../chat/AgentChatPanel";import type { SocietyAgent } from "../data";@@ -165,37 +150,38 @@ export function ShareAgentDialog({ agent, onClose }: { agent: SocietyAgent; onCl<Dialog.Overlay className="fixed inset-0 z-50 bg-scrim/60 backdrop-blur-sm" /><Dialog.Contentdata-testid="share-agent-dialog"- className="fixed left-1/2 top-1/2 z-50 flex max-h-[92dvh] w-[min(1040px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-border bg-popover text-foreground shadow-float focus:outline-none"+ className="cs-sheet fixed left-1/2 top-1/2 z-50 flex max-h-[92dvh] w-[min(1040px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden focus:outline-none">- <header className="flex shrink-0 items-center gap-3 border-b border-border px-5 py-4">- <AgentSwatch agent={agent} size={40} />- <div className="min-w-0 flex-1">- <Dialog.Title className="truncate font-display text-base font-semibold tracking-tight">- {fill(t("society.share.title"), { agent: agent.name })}- </Dialog.Title>- <Dialog.Description className="text-xs text-muted-foreground">- {t("society.share.subtitle")}- </Dialog.Description>+ <header className="cs-head">+ <div className="cs-head-row items-center">+ <AgentSwatch agent={agent} size={40} />+ <div className="min-w-0 flex-1">+ <Dialog.Title className="cs-title truncate">+ {fill(t("society.share.title"), { agent: agent.name })}+ </Dialog.Title>+ <Dialog.Description className="cs-sub">+ {t("society.share.subtitle")}+ </Dialog.Description>+ </div>+ <button+ type="button"+ aria-label={t("society.card.close")}+ onClick={onClose}+ className="cs-close"+ >+ <X size={16} aria-hidden />+ </button></div>- <button- type="button"- aria-label={t("society.card.close")}- onClick={onClose}- className="rounded-md p-2 text-muted-foreground hover:bg-secondary hover:text-foreground"- >- <X className="h-4 w-4" />- </button></header>{draftQuery.isLoading && (- <p className="flex items-center gap-2 px-5 py-10 text-sm text-muted-foreground">- <Loader2 className="h-4 w-4 animate-spin" />+ <p className="flex items-center gap-2 px-6 py-10 text-[14px] text-muted-foreground">+ <Loader2 className="h-4 w-4 animate-spin" aria-hidden />{t("society.share.loading")}</p>)}{draftQuery.error && (- <p role="alert" className="flex items-center gap-2 px-5 py-10 text-sm text-destructive">- <AlertTriangle className="h-4 w-4 shrink-0" />+ <p role="alert" className="px-6 py-10 text-[14px] text-destructive">{(draftQuery.error as Error).message}</p>)}@@ -203,7 +189,7 @@ export function ShareAgentDialog({ agent, onClose }: { agent: SocietyAgent; onCl{draft && form && (<><div className="grid min-h-0 flex-1 overflow-y-auto md:grid-cols-[minmax(0,1fr)_minmax(0,1.15fr)] md:overflow-hidden">- <section className="min-h-0 space-y-5 px-5 py-4 md:overflow-y-auto" aria-label={t("society.share.public_version")}>+ <section className="min-h-0 space-y-6 px-6 pb-6 pt-2 md:overflow-y-auto" aria-label={t("society.share.public_version")}><PolishBaragent={agent}draft={draft}@@ -219,9 +205,9 @@ export function ShareAgentDialog({ agent, onClose }: { agent: SocietyAgent; onCl/><label className="block">- <span className="mb-1 flex items-baseline justify-between text-xs font-medium text-foreground">+ <span className="cs-label mb-2 flex items-baseline justify-between">{t("society.share.summary")}- <span className="tabular-nums text-muted-foreground">{form.summary.length}/500</span>+ <span className="cs-hint tabular-nums">{form.summary.length}/500</span></span><textareavalue={form.summary}@@ -230,45 +216,45 @@ export function ShareAgentDialog({ agent, onClose }: { agent: SocietyAgent; onClonChange={(e) => edit({ summary: e.target.value })}placeholder={t("society.share.summary_placeholder")}data-testid="share-summary"- className="w-full resize-none rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none placeholder:text-faint-foreground focus:border-border-strong"+ className="w-full resize-none text-foreground outline-none placeholder:text-faint-foreground"/></label><div className="grid grid-cols-[minmax(0,1fr)_7rem] gap-3"><label className="block min-w-0">- <span className="mb-1 block text-xs font-medium text-foreground">{t("society.share.listing_name")}</span>+ <span className="cs-label mb-2 block">{t("society.share.listing_name")}</span><inputvalue={form.listingName}onChange={(e) => edit({ listingName: e.target.value })}spellCheck={false}- className="h-9 w-full rounded-md border border-border bg-background px-3 font-mono text-xs text-foreground outline-none focus:border-border-strong"+ className="w-full font-mono !text-[13px] text-foreground outline-none"/></label><label className="block">- <span className="mb-1 block text-xs font-medium text-foreground">{t("society.share.version")}</span>+ <span className="cs-label mb-2 block">{t("society.share.version")}</span><inputvalue={form.version}onChange={(e) => edit({ version: e.target.value })}spellCheck={false}- className="h-9 w-full rounded-md border border-border bg-background px-3 font-mono text-xs tabular-nums text-foreground outline-none focus:border-border-strong"+ className="w-full font-mono !text-[13px] tabular-nums text-foreground outline-none"/></label></div><label className="block">- <span className="mb-1 block text-xs font-medium text-foreground">{t("society.share.categories")}</span>+ <span className="cs-label mb-2 block">{t("society.share.categories")}</span><inputvalue={form.categories}onChange={(e) => edit({ categories: e.target.value })}placeholder={t("society.share.categories_placeholder")}- className="h-9 w-full rounded-md border border-border bg-background px-3 text-sm text-foreground outline-none placeholder:text-faint-foreground focus:border-border-strong"+ className="w-full text-foreground outline-none placeholder:text-faint-foreground"/></label><PrivacyCheck findings={draft.findings} /></section>- <section className="flex min-h-[18rem] flex-col border-t border-border bg-background/40 px-5 py-4 md:min-h-0 md:border-l md:border-t-0" aria-label={t("society.share.template")}>+ <section className="flex min-h-[18rem] flex-col px-6 pb-6 pt-2 md:min-h-0" aria-label={t("society.share.template")}><TemplateCodefileName={templateFileName(draft.listing)}json={json}@@ -316,31 +302,30 @@ function PolishBar({};return (- <div className="rounded-lg border border-border bg-card px-3 py-3">+ <div className="cs-card" data-pad="true"><div className="flex items-start gap-3">- <Sparkles className="mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" /><div className="min-w-0 flex-1">- <p className="text-sm font-medium text-foreground">+ <p className="cs-label">{draft.polished_by? fill(t("society.share.polished_by"), { agent: draft.polished_by }): fill(t("society.share.polish_title"), { agent: agent.name })}</p>- <p className="mt-0.5 text-xs leading-relaxed text-muted-foreground">+ <p className="cs-hint mt-1">{waiting? fill(t("society.share.polish_waiting"), { agent: agent.name }): chatReady? fill(t("society.share.polish_hint"), { agent: agent.name }): t("society.share.polish_unavailable")}</p>- {error && <p role="alert" className="mt-1 text-xs text-destructive">{error}</p>}+ {error && <p role="alert" className="cs-hint mt-1" data-tone="error">{error}</p>}</div><div className="flex shrink-0 flex-col items-end gap-1">- <Button size="sm" variant="outline" onClick={() => void ask()} disabled={!chatReady || waiting} data-testid="share-polish">- {waiting ? <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" /> : <Sparkles className="mr-1.5 h-3.5 w-3.5" />}+ <button type="button" className="cs-btn" data-variant="soft" data-size="sm" onClick={() => void ask()} disabled={!chatReady || waiting} data-testid="share-polish">+ {waiting ? <Loader2 className="h-3.5 w-3.5 animate-spin" aria-hidden /> : null}{fill(t("society.share.polish_cta"), { agent: agent.name })}- </Button>+ </button>{draft.polished_by && !waiting && (- <button type="button" onClick={onReset} className="text-micro text-muted-foreground underline-offset-2 hover:text-foreground hover:underline">+ <button type="button" onClick={onReset} className="cs-link m-0">{t("society.share.reset")}</button>)}@@ -360,20 +345,19 @@ function PrivacyCheck({ findings }: { findings: ShareFinding[] }) {);return (<div className="space-y-3" data-testid="share-privacy">- <div className="rounded-lg border border-border bg-card px-3 py-3">- <p className="flex items-center gap-2 text-sm font-medium text-foreground">- <ShieldCheck className="h-4 w-4 text-muted-foreground" />+ <div className="cs-card" data-pad="true">+ <p className="cs-label">{sorted.length === 0? t("society.share.privacy_clean"): fill(t("society.share.privacy_removed"), { count: sorted.length })}</p>{sorted.length === 0 ? (- <p className="mt-1 text-xs leading-relaxed text-muted-foreground">{t("society.share.privacy_clean_hint")}</p>+ <p className="cs-hint">{t("society.share.privacy_clean_hint")}</p>) : (<ul className="mt-2 space-y-1">{sorted.map((finding, index) => (- <li key={`${finding.kind}-${finding.hint}-${index}`} className="flex items-baseline gap-2 text-xs text-muted-foreground">- <span className="shrink-0 rounded bg-secondary px-1.5 py-0.5 text-micro font-medium text-foreground">+ <li key={`${finding.kind}-${finding.hint}-${index}`} className="cs-hint flex items-baseline gap-2">+ <span className="shrink-0 font-medium text-foreground">{t(`society.share.finding_${finding.kind}`)}</span><span className="min-w-0 truncate">@@ -387,12 +371,9 @@ function PrivacyCheck({ findings }: { findings: ShareFinding[] }) {</ul>)}</div>- <div className="rounded-lg bg-secondary px-3 py-2.5">- <p className="flex items-center gap-2 text-xs font-medium text-foreground">- <Lock className="h-3.5 w-3.5 text-muted-foreground" />- {t("society.share.never_title")}- </p>- <p className="mt-1 text-xs leading-relaxed text-muted-foreground">{t("society.share.never_body")}</p>+ <div className="px-1">+ <p className="cs-label">{t("society.share.never_title")}</p>+ <p className="cs-hint mt-1">{t("society.share.never_body")}</p></div></div>);@@ -409,24 +390,21 @@ function TemplateCode({ fileName, json, saving }: { fileName: string; json: striwindow.setTimeout(() => setCopied(false), 1500);});return (- <div className="flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-border bg-muted/40" data-testid="share-template-code">- <div className="flex shrink-0 items-center gap-2 border-b border-border/60 bg-muted/30 px-3 py-1.5">- <FileJson className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />- <span className="min-w-0 flex-1 truncate font-mono text-xs text-foreground">{fileName}</span>- {saving && <Loader2 className="h-3 w-3 animate-spin text-muted-foreground" aria-label={t("society.card.saving")} />}- <button type="button" onClick={copy} className="flex items-center gap-1 rounded px-1.5 py-1 text-micro text-muted-foreground hover:bg-muted hover:text-foreground">- {copied ? <Check className="h-3 w-3" /> : <Copy className="h-3 w-3" />}+ <div className="flex min-h-0 flex-1 flex-col overflow-hidden rounded-[20px] bg-secondary/45" data-testid="share-template-code">+ <div className="flex shrink-0 items-center gap-1 px-4 pb-1 pt-3">+ <span className="min-w-0 flex-1 truncate font-mono text-[13px] text-muted-foreground">{fileName}</span>+ {saving && <Loader2 className="h-3.5 w-3.5 animate-spin text-muted-foreground" aria-label={t("society.card.saving")} />}+ <button type="button" onClick={copy} className="cs-chip h-8">{copied ? t("society.share.copied") : t("society.share.copy")}</button>- <button type="button" onClick={() => downloadTemplate(fileName, json)} className="flex items-center gap-1 rounded px-1.5 py-1 text-micro text-muted-foreground hover:bg-muted hover:text-foreground" data-testid="share-export">- <Download className="h-3 w-3" />+ <button type="button" onClick={() => downloadTemplate(fileName, json)} className="cs-chip h-8" data-testid="share-export">{t("society.share.export")}</button></div>{/* Wrapped, not scrolled sideways: the instructions are one long JSONstring, and reading them is the point of showing the template. */}- <div className="min-h-0 flex-1 overflow-auto [&_pre]:!whitespace-pre-wrap [&_pre]:[overflow-wrap:anywhere]">- <Suspense fallback={<pre className="m-0 px-3 py-2 text-xs text-foreground/90"><code>{json}</code></pre>}>+ <div className="min-h-0 flex-1 overflow-auto px-1 pb-2 [&_pre]:!whitespace-pre-wrap [&_pre]:!bg-transparent [&_pre]:[overflow-wrap:anywhere]">+ <Suspense fallback={<pre className="m-0 px-3 py-2 text-[13px] text-foreground/90"><code>{json}</code></pre>}><CodeBlock language="json" code={json} chrome={false} /></Suspense></div>@@ -493,30 +471,27 @@ function PublishBar({if (result) {const url = result.issue_url ?? result.pr_url ?? result.url ?? null;return (- <footer className="shrink-0 space-y-2 border-t border-border bg-card px-5 py-3" data-testid="share-published">+ <footer className="cs-foot flex-col items-stretch" data-testid="share-published"><div className="flex flex-wrap items-center gap-3">- <span className={cn("grid h-8 w-8 shrink-0 place-items-center rounded-lg bg-secondary", live ? "text-foreground-strong" : "text-foreground")}>- {live ? <Check className="h-4 w-4" /> : <Loader2 className="h-4 w-4 animate-spin" />}- </span>+ {live ? null : <Loader2 className="h-4 w-4 shrink-0 animate-spin text-muted-foreground" aria-hidden />}<div className="min-w-0 flex-1">- <p className="text-sm font-medium text-foreground">+ <p className="cs-label">{live? fill(t("society.share.live_title"), { entry: result.name, version: result.version }): fill(t("society.share.submitted_title"), { entry: result.name, version: result.version })}</p>- <p className="text-xs text-muted-foreground">+ <p className="cs-hint">{live ? t("society.share.live_body") : t("society.share.submitted_body")}</p></div>{url && (- <Button size="sm" variant="outline" onClick={() => openExternalUrl(url)}>- <ExternalLink className="mr-1.5 h-3.5 w-3.5" />+ <button type="button" className="cs-btn" data-variant="soft" data-size="sm" onClick={() => openExternalUrl(url)}>{t("society.share.view_submission")}- </Button>+ </button>)}</div>{result.install?.cli && (- <code className="block rounded-md border border-border bg-muted px-2.5 py-1.5 font-mono text-xs text-foreground">+ <code className="block rounded-2xl bg-secondary/60 px-4 py-2.5 font-mono text-[13px] text-foreground">{result.install.cli}</code>)}@@ -525,53 +500,51 @@ function PublishBar({}return (- <footer className="shrink-0 space-y-2 border-t border-border bg-card px-5 py-3">+ <footer className="cs-foot flex-col items-stretch">{draft.errors.length > 0 && (- <p role="alert" className="flex items-start gap-2 text-xs text-destructive">- <AlertTriangle className="mt-0.5 h-3.5 w-3.5 shrink-0" />+ <p role="alert" className="cs-hint" data-tone="error">{draft.errors[0]}</p>)}{failure && (- <p role="alert" className="flex items-start gap-2 text-xs text-destructive">- <AlertTriangle className="mt-0.5 h-3.5 w-3.5 shrink-0" />+ <p role="alert" className="cs-hint" data-tone="error">{browserFallback ? t("society.share.fallback_hint") : failure.message}</p>)}<div className="flex flex-wrap items-center gap-3">- <p className="min-w-0 flex-1 text-xs leading-relaxed text-muted-foreground">+ <p className="cs-hint min-w-0 flex-1">{draft.published? fill(t("society.share.published_before"), { version: draft.published.version }): t("society.share.publish_hint")}</p>{browserFallback && (- <Button size="sm" variant="outline" onClick={fileByHand}>- <Github className="mr-1.5 h-3.5 w-3.5" />+ <button type="button" className="cs-btn" data-variant="soft" onClick={fileByHand}>{t("society.share.fallback_cta")}- </Button>+ </button>)}{!enabled ? (- <span className="text-xs text-muted-foreground">{t("society.share.publish_disabled")}</span>+ <span className="cs-hint">{t("society.share.publish_disabled")}</span>) : !signedIn ? (- <Button size="sm" onClick={() => setSignInOpen(true)} disabled={identity.isLoading} data-testid="share-sign-in">- <Github className="mr-1.5 h-3.5 w-3.5" />+ <button type="button" className="cs-btn" data-variant="primary" onClick={() => setSignInOpen(true)} disabled={identity.isLoading} data-testid="share-sign-in">{t("society.share.sign_in")}- </Button>+ </button>) : (<div className="flex items-center gap-2">- <span className="flex items-center gap-1.5 text-xs text-muted-foreground">+ <span className="cs-hint flex items-center gap-1.5"><PublisherAvatar login={identity.data?.login} url={identity.data?.avatar_url} size={20} />@{identity.data?.login}</span>- <Button- size="sm"+ <button+ type="button"+ className="cs-btn"+ data-variant="primary"onClick={() => publish.mutate()}disabled={publish.isPending || saving || draft.errors.length > 0}data-testid="share-publish">- {publish.isPending ? <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" /> : <UploadCloud className="mr-1.5 h-3.5 w-3.5" />}+ {publish.isPending ? <Loader2 className="h-3.5 w-3.5 animate-spin" aria-hidden /> : null}{t("society.share.publish")}- </Button>+ </button></div>)}</div>diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/ToolsTab.tsx b/dodaios/ui/web/frontend/src/components/society/card/pane/ToolsTab.tsxindex 8995ca7162..e360d3d437 100644--- a/dodaios/ui/web/frontend/src/components/society/card/pane/ToolsTab.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/ToolsTab.tsx@@ -12,7 +12,7 @@*/import { useEffect, useMemo, useRef, useState } from "react";import { useQuery } from "@tanstack/react-query";-import { Ban, Check, Circle, Search, Star } from "lucide-react";+import { Search } from "lucide-react";import { Switch } from "@/components/ui/switch";import { useLocaleChunk, useT } from "@/i18n";@@ -46,7 +46,7 @@ import {type ToolState,type Widening,} from "./accessDraft";-import { ChipList, PaneHint, PaneSection, Segmented, type SegmentOption } from "./ui";+import { ChipList, ChoicePill, PaneHint, PaneSection, Segmented, type SegmentOption } from "./ui";/** Rows shown before "Show all": enough for the tools an agent really uses. */const TOOL_PREVIEW = 8;@@ -138,6 +138,7 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole<><PaneSection title={t("society.agent_pane.reach")}><Segmented<GrantMode>+ filllabel={t("society.agent_pane.reach")}value={draft.grantMode}disabled={disabled}@@ -167,6 +168,7 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole{!lead ? (<><Segmented<AgentApprovalMode>+ filllabel={t("society.approval_mode.title")}value={draft.approvalMode}disabled={disabled}@@ -188,9 +190,10 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole</>) : null}{lead || !agent.approvalMode ? (- <div className="flex flex-col gap-1.5">- <span className="text-xs text-muted-foreground">{t("society.approval_mode.legacy_ceiling")}</span>+ <div className="flex flex-col gap-2">+ <span className="ap-sublabel">{t("society.approval_mode.legacy_ceiling")}</span><Segmented<PermissionCeiling>+ filllabel={t("society.approval_mode.legacy_ceiling")}value={draft.permissionCeiling}disabled={disabled}@@ -204,8 +207,8 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole{!lead ? (<PaneSection title={t("society.card.approval_rules")} testId="agent-pane-rules">- <PaneHint>{t("society.agent_pane.rules_hint")}</PaneHint>- <span className="text-xs font-medium text-foreground">{t("society.card.require_approval")}</span>+ <div className="ap-card ap-card-pad">+ <span className="ap-sublabel">{t("society.card.require_approval")}</span><ChipListitems={draft.requireApproval}onChange={(items) => setDraft((d) => ({ ...d, requireApproval: items }))}@@ -217,7 +220,7 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: booleemptyText={t("society.agent_pane.rules_none")}testId="agent-pane-require"/>- <span className="mt-1 text-xs font-medium text-foreground">{t("society.card.always_allow")}</span>+ <span className="ap-sublabel mt-3">{t("society.card.always_allow")}</span><ChipListitems={draft.alwaysAllow}onChange={(items) => setDraft((d) => ({ ...d, alwaysAllow: items }))}@@ -229,26 +232,20 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: booleemptyText={t("society.agent_pane.rules_none")}testId="agent-pane-allow"/>+ </div>+ <PaneHint>{t("society.agent_pane.rules_hint")}</PaneHint></PaneSection>) : null}<PaneSection title={t("society.card.limits")} testId="agent-pane-limits">- <div className="flex flex-wrap items-end gap-4">- <div className="flex flex-col gap-1.5">- <span className="flex items-center gap-2 text-xs text-muted-foreground">- <Switch- checked={draft.budgetOn}- onCheckedChange={(on) => setDraft((d) => ({ ...d, budgetOn: on }))}- disabled={disabled}- aria-label={t("society.card.budget_cap")}- data-testid="agent-budget-switch"- />- {t("society.card.budget_cap")}- </span>- {draft.budgetOn ? (- <span className="flex items-center gap-1 text-sm">- <span className="text-muted-foreground">$</span>- <input+ <div className="ap-card">+ <div className="ap-line">+ <span className="ap-line-label">{t("society.card.budget_cap")}</span>+ <span className="ml-auto flex items-center gap-2">+ {draft.budgetOn ? (+ <span className="flex items-center gap-1 text-[14px]">+ <span className="text-muted-foreground">$</span>+ <inputtype="number"min={0}step={0.5}@@ -260,13 +257,21 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boolearia-label={t("society.card.budget_cap")}className="ap-input"/>- </span>- ) : (- <span className="py-1 text-sm text-muted-foreground">{t("society.card.no_cap")}</span>- )}+ </span>+ ) : (+ <span className="ap-line-value">{t("society.card.no_cap")}</span>+ )}+ <Switch+ checked={draft.budgetOn}+ onCheckedChange={(on) => setDraft((d) => ({ ...d, budgetOn: on }))}+ disabled={disabled}+ aria-label={t("society.card.budget_cap")}+ data-testid="agent-budget-switch"+ />+ </span></div>- <label className="flex flex-col gap-1.5">- <span className="text-xs text-muted-foreground">{t("society.card.jobs_at_once")}</span>+ <label className="ap-line">+ <span className="ap-line-label">{t("society.card.jobs_at_once")}</span><inputtype="number"min={1}@@ -277,7 +282,7 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boolevalue={draft.jobs}onChange={(e) => setDraft((d) => ({ ...d, jobs: e.target.value }))}data-testid="agent-jobs-input"- className="ap-input"+ className="ap-input ml-auto"/></label></div>@@ -286,6 +291,7 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole<PaneSection title={t("society.agent_pane.browser")} testId="agent-pane-browser-access"><Segmented<BrowserMode>+ filllabel={t("society.agent_pane.browser")}value={draft.browserMode}disabled={disabled}@@ -297,7 +303,8 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: booleonChange={(mode) => setDraft((d) => ({ ...d, browserMode: mode }))}/><PaneHint>{t(draft.browserMode === "own" ? "society.agent_pane.browser_own_hint" : "society.agent_pane.browser_attach_hint")}</PaneHint>- <span className="text-xs font-medium text-foreground">{t("society.agent_pane.sites")}</span>+ <div className="ap-card ap-card-pad">+ <span className="ap-sublabel">{t("society.agent_pane.sites")}</span><ChipListitems={draft.domains}onChange={(items) => setDraft((d) => ({ ...d, domains: items }))}@@ -309,13 +316,16 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: booleemptyText={t("society.agent_pane.sites_any")}testId="agent-pane-sites"/>+ </div></PaneSection>{!lead && !sample ? (<PaneSection title={t("society.card.where")} testId="agent-pane-placement">+ <div className="ap-card">+ <AgentSandboxSection agent={agent} show="choice" layout="row" />+ {agent.executionEnvironment !== "sandbox" ? <RunsOn agent={agent} /> : null}+ </div><PaneHint>{t("society.agent_pane.placement_hint")}</PaneHint>- <AgentSandboxSection agent={agent} show="choice" />- {agent.executionEnvironment !== "sandbox" ? <RunsOn agent={agent} /> : null}</PaneSection>) : null}</div>@@ -323,7 +333,7 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole{confirm ? (<div className="ap-savebar" data-tone="warn" role="alertdialog" aria-label={t("society.agent_pane.widen_title")} data-testid="agent-pane-widen"><div className="ap-widen">- <strong className="text-xs font-semibold">{t("society.agent_pane.widen_title").replace("{0}", societyDisplayName(agent, assistantName))}</strong>+ <strong className="text-[13px] font-semibold">{t("society.agent_pane.widen_title").replace("{0}", societyDisplayName(agent, assistantName))}</strong><ul>{confirm.map((w) => (<li key={w.key}>{wideningText(w, t, labelOf)}</li>@@ -341,9 +351,9 @@ export function ToolsTab({ agent, sample }: { agent: SocietyAgent; sample: boole) : dirty || error ? (<div className="ap-savebar" data-testid="agent-pane-savebar">{error ? (- <span role="alert" className="min-w-0 flex-1 truncate text-xs text-destructive" title={error}>{error}</span>+ <span role="alert" className="min-w-0 flex-1 truncate text-[13px] text-destructive" title={error}>{error}</span>) : (- <span className="min-w-0 flex-1 text-xs text-muted-foreground">{t("society.agent_pane.unsaved")}</span>+ <span className="min-w-0 flex-1 text-[13px] text-muted-foreground">{t("society.agent_pane.unsaved")}</span>)}<button type="button" className="ap-btn" data-variant="ghost" disabled={saving} onClick={() => { setDraft(base); setError(""); }}>{t("society.agent_pane.discard")}@@ -439,17 +449,23 @@ function ToolList({const shown = needle || all ? filtered : filtered.slice(0, TOOL_PREVIEW);const options: SegmentOption<ToolState>[] = [+ { value: "first", label: t("society.agent_pane.tool_first") },+ { value: "on", label: t("society.agent_pane.tool_on") },allowlist- ? { value: "off", label: t("society.agent_pane.tool_off"), icon: Circle }- : { value: "blocked", label: t("society.agent_pane.tool_block"), icon: Ban },- { value: "on", label: t("society.agent_pane.tool_on"), icon: Check },- { value: "first", label: t("society.agent_pane.tool_first"), icon: Star },+ ? { value: "off", label: t("society.agent_pane.tool_off") }+ : { value: "blocked", label: t("society.agent_pane.tool_block") },];+ const stateLabel: Record<ToolState, string> = {+ first: t("society.agent_pane.tool_first"),+ on: t("society.agent_pane.tool_on"),+ off: t("society.agent_pane.tool_off"),+ blocked: t("society.agent_pane.tool_blocked"),+ };return (<PaneSection title={t("society.agent_pane.tools")} testId="agent-pane-tool-list"><label className="ap-search">- <Search className="h-3.5 w-3.5 shrink-0 text-muted-foreground" aria-hidden />+ <Search className="h-4 w-4 shrink-0 text-muted-foreground" aria-hidden /><inputtype="search"value={query}@@ -461,7 +477,7 @@ function ToolList({{loading ? <PaneHint>{t("society.profile_card.loading")}</PaneHint> : null}{failed ? <PaneHint>{t("society.agent_pane.tools_unavailable")}</PaneHint> : null}{!loading && filtered.length === 0 ? <PaneHint>{t("society.profile_card.no_results")}</PaneHint> : null}- <ul className="ap-tools">+ {shown.length ? <ul className="ap-card ap-tools">{shown.map((c) => {const state = toolState(draft, c.id);const brand = resolveToolBrand(c.tool_name || capabilityName(c.id));@@ -469,19 +485,16 @@ function ToolList({const shownState = allowlist && state === "blocked" ? "off" : state;return (<li key={c.id} className="ap-tool" data-state={state} data-testid={`agent-pane-tool-${c.id}`}>- <span className="ap-tool-mark" aria-hidden>- {brand.logoUrl ? <img src={brand.logoUrl} alt="" draggable={false} /> : brand.monogram}- </span><span className="min-w-0 flex-1" title={c.one_liner || c.id}><span className="ap-tool-name">{label}</span><span className="ap-tool-sub" data-off={c.connected ? undefined : "true"}>{c.connected ? (c.one_liner || c.id) : t("society.card.not_connected")}</span></span>- <Segmented<ToolState>+ <ChoicePill<ToolState>label={label}- size="sm"value={shownState}+ shownLabel={stateLabel[shownState]}disabled={disabled}options={options}onChange={(next) => onChange(c.id, next)}@@ -489,7 +502,7 @@ function ToolList({</li>);})}- </ul>+ </ul> : null}{!needle && filtered.length > TOOL_PREVIEW ? (<button type="button" className="ap-link self-start" onClick={() => setAll((v) => !v)}>{all ? t("society.agent_pane.show_less") : t("society.agent_pane.show_all").replace("{0}", String(filtered.length))}@@ -510,10 +523,10 @@ function RunsOn({ agent }: { agent: SocietyAgent }) {const [saving, setSaving] = useState(false);const [error, setError] = useState("");return (- <div className="flex flex-col gap-2" data-testid="agent-runs-on">+ <div className="flex flex-col" data-testid="agent-runs-on"><ComputerPickervalue={agent.computerId ?? ""}- labelClass="text-xs text-muted-foreground mb-1 block"+ layout="row"testId="agent-runs-on-picker"onChange={(id) => {if (saving || id === (agent.computerId ?? "")) return;@@ -524,8 +537,8 @@ function RunsOn({ agent }: { agent: SocietyAgent }) {.finally(() => setSaving(false));}}/>- {error ? <p role="alert" className="text-xs text-destructive">{error}</p> : null}- {saving ? <p className="text-xs text-muted-foreground">{t("society.card.runs_on_saving")}</p> : null}+ {error ? <p role="alert" className="ap-hint ap-line-hint text-destructive">{error}</p> : null}+ {saving ? <p className="ap-hint ap-line-hint">{t("society.card.runs_on_saving")}</p> : null}</div>);}diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/agentPane.css b/dodaios/ui/web/frontend/src/components/society/card/pane/agentPane.cssindex e52bd1b1f4..bb67aa4401 100644--- a/dodaios/ui/web/frontend/src/components/society/card/pane/agentPane.css+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/agentPane.css@@ -275,6 +275,8 @@line-height: 1.45;color: hsl(var(--muted-foreground));}+/* A hint that belongs to a card line starts where the line's label starts. */+.ap-hint.ap-line-hint { padding: 0 12px 8px; }.ap-link {display: inline-flex;@@ -340,6 +342,8 @@ button.ap-line:disabled { opacity: 0.55; }font-size: 14px;color: hsl(var(--foreground));}+/* A line whose value is a picker: the label gives way (wraps) before the picker does. */+.ap-line:has(.ap-pick) .ap-line-label { min-width: 0; flex-shrink: 1; line-height: 1.3; }.ap-field .ap-line-label { font-size: 13px; color: hsl(var(--muted-foreground)); }.ap-line-value {min-width: 0;@@ -506,19 +510,33 @@ button.ap-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px hsl(varflex-wrap: wrap;gap: 2px;border-radius: 999px;- background: hsl(var(--card));- border: 1px solid hsl(var(--border));- padding: 2px;+ background: hsl(var(--secondary) / 0.7);+ padding: 3px;+}+.ap-seg[data-fill="true"] { display: flex; flex-wrap: nowrap; }+/* A long choice ("Berechtigungen umgehen") wraps inside its capsule instead of losing words. */+.ap-seg[data-fill="true"] .ap-seg-item {+ min-width: 0;+ height: auto;+ min-height: 30px;+ flex: 1 1 auto;+ padding: 4px 8px;+ line-height: 1.25;+ text-align: center;+ white-space: normal;}+/* In dark the track sits below the rail and the chosen chip rises above it. */+.dark .ap-seg { background: hsl(var(--background) / 0.75); box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.5); }+.dark .ap-seg-item[aria-checked="true"] { background: hsl(var(--secondary)); }.ap-seg-item {display: inline-flex;- height: 24px;+ height: 30px;align-items: center;justify-content: center;gap: 5px;border-radius: 999px;- padding: 0 10px;- font-size: 12px;+ padding: 0 12px;+ font-size: 13px;font-weight: 500;color: hsl(var(--muted-foreground));transition: background-color 120ms ease, color 120ms ease;@@ -526,9 +544,9 @@ button.ap-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px hsl(var.ap-seg[data-size="sm"] .ap-seg-item { height: 22px; min-width: 24px; padding: 0 5px; }.ap-seg-item:hover:not(:disabled) { color: hsl(var(--foreground)); }.ap-seg-item[aria-checked="true"] {- background: hsl(var(--secondary));+ background: hsl(var(--popover));color: hsl(var(--foreground-strong));- box-shadow: inset 0 1px 0 rgb(var(--sheen-rgb) / 0.05), 0 0 0 1px hsl(var(--border-strong) / 0.5);+ box-shadow: 0 1px 2px rgb(var(--scrim-rgb) / 0.12), inset 0 0 0 1px hsl(var(--border) / 0.6);}.ap-seg-item[aria-checked="true"][data-value="blocked"] { color: hsl(var(--destructive)); }.ap-seg-item:disabled { opacity: 0.4; cursor: not-allowed; }@@ -539,18 +557,19 @@ button.ap-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px hsl(var.ap-search {display: flex;align-items: center;- gap: 6px;- border: 1px solid hsl(var(--border));+ gap: 8px;border-radius: 999px;- background: hsl(var(--background));- padding: 0 8px;+ background: hsl(var(--secondary) / 0.75);+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.45);+ padding: 0 14px;}+.ap-search:focus-within { box-shadow: inset 0 0 0 1px hsl(var(--border-strong)), 0 0 0 3px hsl(var(--ring) / 0.18); }.ap-search input {- height: 30px;+ height: 38px;min-width: 0;flex: 1;background: transparent;- font-size: 13px;+ font-size: 14px;color: hsl(var(--foreground));outline: none;}@@ -558,38 +577,22 @@ button.ap-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px hsl(var.ap-tools { display: flex; flex-direction: column; }.ap-tool {display: flex;- min-height: 36px;+ min-height: 54px;align-items: center;- gap: 8px;- border-radius: 8px;- padding: 3px 4px 3px 6px;+ gap: 10px;+ border-radius: 14px;+ padding: 7px 8px 7px 12px;+ transition: background-color 150ms ease;}-.ap-tool:hover { background: hsl(var(--secondary)); }-.ap-tool[data-state="blocked"] .ap-tool-name { text-decoration: line-through; opacity: 0.6; }+.ap-tool:hover { background: hsl(var(--secondary) / 0.6); }+.ap-tool[data-state="blocked"] .ap-tool-name { color: hsl(var(--muted-foreground)); }.ap-tool[data-state="off"] .ap-tool-name { color: hsl(var(--muted-foreground)); }-.ap-tool-mark {- display: inline-flex;- height: 22px;- width: 22px;- flex-shrink: 0;- align-items: center;- justify-content: center;- overflow: hidden;- border-radius: 6px;- background: hsl(var(--plugin-icon-surface, var(--card)));- border: 1px solid hsl(var(--border));- font-size: 12px;- font-weight: 700;- text-transform: uppercase;- color: hsl(var(--muted-foreground));-}-.ap-tool-mark img { height: 100%; width: 100%; object-fit: contain; padding: 3px; }.ap-tool-name {display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;- font-size: 13px;+ font-size: 14px;color: hsl(var(--foreground));}.ap-tool-sub {@@ -597,63 +600,114 @@ button.ap-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px hsl(varoverflow: hidden;text-overflow: ellipsis;white-space: nowrap;- font-size: 12px;+ font-size: 13px;color: hsl(var(--muted-foreground));}.ap-tool-sub[data-off="true"] { color: hsl(var(--warning)); }+/* The one control on a tool row: a round pill naming its state. */+.ap-pill {+ display: inline-flex;+ height: 30px;+ align-items: center;+ gap: 4px;+ white-space: nowrap;+ border-radius: 999px;+ background: hsl(var(--secondary));+ padding: 0 10px 0 12px;+ font-size: 13px;+ font-weight: 500;+ color: hsl(var(--foreground));+ transition: background-color 150ms ease, color 150ms ease, transform 100ms ease;+}+.ap-pill:hover:not(:disabled) { background: hsl(var(--secondary) / 0.7); }+.ap-pill:active:not(:disabled) { transform: scale(0.96); }+.ap-pill:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring)); }+.ap-pill:disabled { opacity: 0.5; }+.ap-pill[data-value="first"] { color: hsl(var(--foreground-strong)); }+.ap-pill[data-value="on"] { background: transparent; color: hsl(var(--muted-foreground)); }+.ap-pill[data-value="on"]:hover:not(:disabled) { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }+.ap-pill[data-value="off"] { background: transparent; color: hsl(var(--muted-foreground)); box-shadow: inset 0 0 0 1px hsl(var(--border)); }+.ap-pill[data-value="blocked"] { background: hsl(var(--destructive) / 0.1); color: hsl(var(--destructive)); }+.ap-pill-menu { width: 184px; }+.ap-menu-item[aria-checked="true"] { color: hsl(var(--foreground-strong)); font-weight: 500; }++/* A quiet picker at the end of a card line: the value and a chevron, no field. */+.ap-root .ap-pick,+.ap-pick {+ width: auto;+ max-width: 100%;+ min-height: 0;+ gap: 4px;+ border-radius: 999px;+ background: transparent;+ padding: 5px 8px 5px 12px;+ font-size: 13px;+ color: hsl(var(--muted-foreground));+}+.ap-pick:hover:not(:disabled) { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }++/* A small heading inside a card: "Always ask before", "Allowed sites". */+.ap-sublabel {+ font-size: 13px;+ font-weight: 500;+ color: hsl(var(--muted-foreground));+}+.ap-card.ap-card-pad { gap: 8px; padding: 12px 14px 14px; }+/* --------------------------------------------------------------- chips */.ap-chips { display: flex; flex-direction: column; gap: 6px; }.ap-chip {display: inline-flex;max-width: 100%;+ min-height: 28px;align-items: center;gap: 4px;- border: 1px solid hsl(var(--border));border-radius: 999px;- background: hsl(var(--card));- padding: 1px 4px 1px 9px;- font-family: ui-monospace, SFMono-Regular, Menlo, monospace;- font-size: 12px;+ background: hsl(var(--secondary));+ padding: 2px 4px 2px 12px;+ font-size: 13px;color: hsl(var(--foreground));}.ap-chip-x {display: inline-flex;- height: 18px;- width: 18px;+ height: 22px;+ width: 22px;align-items: center;justify-content: center;border-radius: 999px;color: hsl(var(--muted-foreground));}-.ap-chip-x:hover { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }+.ap-chip-x:hover { background: hsl(var(--background) / 0.6); color: hsl(var(--foreground)); }.ap-chip-add { display: flex; align-items: center; gap: 4px; }.ap-chip-suggest {gap: 4px;- padding: 1px 9px 1px 6px;+ padding: 2px 12px 2px 8px;+ background: transparent;+ box-shadow: inset 0 0 0 1px hsl(var(--border));color: hsl(var(--muted-foreground));- border-style: dashed;}-.ap-chip-suggest:hover { color: hsl(var(--foreground)); border-style: solid; }+.ap-chip-suggest:hover { background: hsl(var(--secondary)); color: hsl(var(--foreground)); box-shadow: none; }.ap-input {- height: 34px;+ height: 36px;min-width: 0;flex: 1;- border: 1px solid hsl(var(--border));- border-radius: 12px;- background: hsl(var(--background));- padding: 0 9px;- font-size: 13px;+ border: 0;+ border-radius: 999px;+ background: hsl(var(--secondary) / 0.75);+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.45);+ padding: 0 14px;+ font-size: 14px;color: hsl(var(--foreground));outline: none;transition: border-color 120ms ease, box-shadow 120ms ease;}-.ap-input:focus { border-color: hsl(var(--border-strong)); box-shadow: 0 0 0 3px hsl(var(--ring) / 0.18); }+.ap-input:focus { box-shadow: inset 0 0 0 1px hsl(var(--border-strong)), 0 0 0 3px hsl(var(--ring) / 0.18); }.ap-input:disabled { opacity: 0.55; }-textarea.ap-input { height: auto; padding: 8px 10px; line-height: 1.5; resize: vertical; }-.ap-input[type="number"] { width: 84px; flex: none; font-variant-numeric: tabular-nums; }+textarea.ap-input { height: auto; border-radius: 16px; padding: 10px 14px; line-height: 1.5; resize: vertical; }+.ap-input[type="number"] { width: 84px; flex: none; text-align: right; font-variant-numeric: tabular-nums; }/* ------------------------------------------------------------ save bar */@@ -701,7 +755,7 @@ textarea.ap-input { height: auto; padding: 8px 10px; line-height: 1.5; resize: vflex-direction: column;gap: 4px;width: 100%;- font-size: 12px;+ font-size: 13px;color: hsl(var(--foreground));}.ap-widen ul { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; list-style: disc; }@@ -713,13 +767,13 @@ textarea.ap-input { height: auto; padding: 8px 10px; line-height: 1.5; resize: vdisplay: flex;flex-direction: column;gap: 6px;- border: 1px solid hsl(var(--border));+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.55);border-radius: var(--ap-radius-lg);background: hsl(var(--card));padding: 9px 10px;}.ap-review-kind {- font-size: 12px;+ font-size: 13px;font-weight: 600;color: hsl(var(--muted-foreground));}@@ -766,5 +820,7 @@ textarea.ap-input { height: auto; padding: 8px 10px; line-height: 1.5; resize: v.ap-seg-item,.ap-icon-btn,.ap-round-btn,- .ap-meter-fill { transition: none; }+ .ap-meter-fill,+ .ap-tool,+ .ap-pill { transition: none; }}diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/ui.tsx b/dodaios/ui/web/frontend/src/components/society/card/pane/ui.tsxindex 2ccdad2f8a..042a036801 100644--- a/dodaios/ui/web/frontend/src/components/society/card/pane/ui.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/ui.tsx@@ -3,8 +3,8 @@* anatomy row that opens somewhere, a compact segmented control, a chip list* with an add field. Styling lives in `agentPane.css` and uses theme tokens only.*/-import { useRef, useState, type ReactNode } from "react";-import { Plus, X, type LucideIcon } from "lucide-react";+import { useEffect, useRef, useState, type ReactNode } from "react";+import { Check, ChevronDown, Plus, X, type LucideIcon } from "lucide-react";import { cn } from "@/lib/utils";@@ -93,6 +93,7 @@ export function Segmented<T extends string>({onChange,label,size = "md",+ fill = false,disabled = false,testId,}: {@@ -101,11 +102,13 @@ export function Segmented<T extends string>({onChange: (value: T) => void;label: string;size?: "sm" | "md";+ /** Stretch across the row, each choice taking an equal share. */+ fill?: boolean;disabled?: boolean;testId?: string;}) {return (- <div role="radiogroup" aria-label={label} className="ap-seg" data-size={size} data-testid={testId}>+ <div role="radiogroup" aria-label={label} className="ap-seg" data-size={size} data-fill={fill || undefined} data-testid={testId}>{options.map((option) => {const Icon = option.icon;const checked = option.value === value;@@ -133,6 +136,108 @@ export function Segmented<T extends string>({);}+/**+ * One round pill that names the current choice and opens a short menu of the+ * others: a single quiet control per row where a segmented control would+ * repeat three small buttons down a long list.+ */+export function ChoicePill<T extends string>({+ value,+ shownLabel,+ options,+ onChange,+ label,+ disabled = false,+}: {+ value: T;+ /** What the pill says for `value` (it may differ from the option's verb). */+ shownLabel: string;+ options: SegmentOption<T>[];+ onChange: (value: T) => void;+ /** What the pill chooses, for assistive technology ("Gmail"). */+ label: string;+ disabled?: boolean;+}) {+ const [open, setOpen] = useState(false);+ const root = useRef<HTMLSpanElement>(null);+ useEffect(() => {+ if (!open) return;+ const away = (event: PointerEvent) => {+ if (!root.current?.contains(event.target as Node)) setOpen(false);+ };+ const escape = (event: KeyboardEvent) => {+ if (event.key === "Escape") {+ event.stopPropagation();+ setOpen(false);+ root.current?.querySelector<HTMLButtonElement>(".ap-pill")?.focus();+ }+ };+ document.addEventListener("pointerdown", away);+ document.addEventListener("keydown", escape, true);+ // The checked item takes focus, so arrow keys and Enter work at once.+ root.current?.querySelector<HTMLButtonElement>('[role="menuitemradio"][aria-checked="true"]')?.focus();+ return () => {+ document.removeEventListener("pointerdown", away);+ document.removeEventListener("keydown", escape, true);+ };+ }, [open]);+ const move = (event: { key: string; preventDefault: () => void }) => {+ const step = { ArrowDown: 1, ArrowUp: -1 }[event.key];+ if (!step) return;+ event.preventDefault();+ const items = [...(root.current?.querySelectorAll<HTMLButtonElement>('[role="menuitemradio"]:not(:disabled)') ?? [])];+ const at = items.indexOf(document.activeElement as HTMLButtonElement);+ items[(at + step + items.length) % items.length]?.focus();+ };+ return (+ <span+ ref={root}+ className="relative shrink-0"+ // Tabbing out of the open menu closes it, as a click elsewhere does.+ onBlur={(event) => {+ if (open && event.relatedTarget && !root.current?.contains(event.relatedTarget as Node)) setOpen(false);+ }}+ >+ <button+ type="button"+ className="ap-pill"+ data-value={value}+ aria-haspopup="menu"+ aria-expanded={open}+ aria-label={`${label}: ${shownLabel}`}+ disabled={disabled}+ onClick={() => setOpen((was) => !was)}+ >+ {shownLabel}+ <ChevronDown className="h-3.5 w-3.5 opacity-60" aria-hidden />+ </button>+ {open ? (+ <div role="menu" aria-label={label} className="ap-menu ap-pill-menu shadow-float" onKeyDown={move}>+ {options.map((option) => (+ <button+ key={option.value}+ type="button"+ role="menuitemradio"+ aria-checked={option.value === value}+ data-value={option.value}+ disabled={option.disabled}+ title={option.title}+ className="ap-menu-item"+ onClick={() => {+ setOpen(false);+ if (option.value !== value) onChange(option.value);+ }}+ >+ <span className="flex-1">{option.label}</span>+ {option.value === value ? <Check className="h-3.5 w-3.5" aria-hidden /> : null}+ </button>+ ))}+ </div>+ ) : null}+ </span>+ );+}+/** Editable chips: each removable, plus a field that adds one (Enter or the + button). */export function ChipList({items,diff --git a/dodaios/ui/web/frontend/src/components/society/chat/ChatGroupDialog.tsx b/dodaios/ui/web/frontend/src/components/society/chat/ChatGroupDialog.tsxindex 0320bdc9e6..41cb79e559 100644--- a/dodaios/ui/web/frontend/src/components/society/chat/ChatGroupDialog.tsx+++ b/dodaios/ui/web/frontend/src/components/society/chat/ChatGroupDialog.tsx@@ -1,12 +1,14 @@import { useState, type FormEvent } from "react";import * as Dialog from "@radix-ui/react-dialog";import { useQueryClient } from "@tanstack/react-query";+import { Check, X } from "lucide-react";import { useT } from "@/i18n";import { createSocietyChatGroup, updateSocietyChatGroup, type SocietyChatGroup } from "@/lib/societyChatGroups";import { societyDisplayName } from "@/lib/societyDisplayName";import { useEventStore } from "@/store/events";import type { SocietyAgent } from "../data";import { AgentSwatch } from "../AgentSwatch";+import "../calmSheet.css";interface Props {group?: SocietyChatGroup;@@ -48,29 +50,45 @@ export function ChatGroupDialog({ group, agents, onClose, onSaved }: Props) {return <Dialog.Root open onOpenChange={(open) => { if (!open) onClose(); }}><Dialog.Portal><Dialog.Overlay className="fixed inset-0 z-[150] bg-scrim/60" />- <Dialog.Content className="fixed left-1/2 top-1/2 z-[151] flex max-h-[80vh] w-[min(28rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col rounded-xl border border-border bg-card p-5 text-foreground shadow-xl">- <Dialog.Title className="font-display text-lg font-semibold">{t(group ? "society.groups.edit" : "society.groups.create")}</Dialog.Title>- <Dialog.Description className="mt-1 text-sm text-muted-foreground">{t("society.groups.description")}</Dialog.Description>- <form onSubmit={(event) => void submit(event)} className="mt-4 flex min-h-0 flex-col gap-3">- <label className="text-sm font-medium">{t("society.groups.name")}- <input autoFocus maxLength={80} value={name} onChange={(event) => setName(event.target.value)}- className="mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-foreground" />- </label>- <p className="text-sm font-medium">{t("society.groups.members")} ({members.length})</p>- <div className="min-h-0 overflow-y-auto rounded-md border border-border p-1">- {choices.map((agent) => <label key={agent.agentId} className="flex cursor-pointer items-center gap-3 rounded-md px-2 py-1.5 hover:bg-secondary">- <input type="checkbox" checked={members.includes(agent.agentId)} onChange={() => setMembers((current) => current.includes(agent.agentId) ? current.filter((id) => id !== agent.agentId) : [...current, agent.agentId])} />- <AgentSwatch agent={agent} size={28} />- <span className="min-w-0 flex-1 truncate text-sm">{societyDisplayName(agent, assistantName)}</span>- {group?.lead_agent_id === agent.agentId && <span className="shrink-0 rounded-full border border-border px-2 py-0.5 text-xs text-muted-foreground">{t("society.lead.role")}</span>}- </label>)}+ <Dialog.Content className="cs-sheet fixed left-1/2 top-1/2 z-[151] flex max-h-[80vh] w-[min(30rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden">+ <header className="cs-head">+ <div className="cs-head-row">+ <div className="min-w-0 flex-1">+ <Dialog.Title className="cs-title">{t(group ? "society.groups.edit" : "society.groups.create")}</Dialog.Title>+ <Dialog.Description className="cs-sub">{t("society.groups.description")}</Dialog.Description>+ </div>+ <button type="button" aria-label={t("society.groups.cancel")} onClick={onClose} className="cs-close"><X size={16} aria-hidden /></button></div>- {error && <p role="alert" className="text-sm text-destructive">{error}</p>}- <div className="flex justify-end gap-2">- <button type="button" onClick={onClose} className="rounded-md px-3 py-2 text-sm hover:bg-secondary">{t("society.groups.cancel")}</button>- <button type="submit" disabled={busy || !name.trim() || members.length < 2}- className="rounded-md bg-primary px-3 py-2 text-sm text-primary-foreground disabled:opacity-50">{t("society.groups.save")}</button>+ </header>+ <form onSubmit={(event) => void submit(event)} className="flex min-h-0 flex-1 flex-col">+ <div className="flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto px-6 pb-2 pt-2">+ <label className="flex flex-col gap-2">+ <span className="cs-label">{t("society.groups.name")}</span>+ <input autoFocus maxLength={80} value={name} onChange={(event) => setName(event.target.value)}+ className="w-full text-foreground" />+ </label>+ <div className="flex min-h-0 flex-col gap-2">+ <p className="cs-label">{t("society.groups.members")} <span className="font-normal text-muted-foreground">{members.length}</span></p>+ <div className="cs-card">+ {choices.map((agent) => {+ const on = members.includes(agent.agentId);+ return <label key={agent.agentId} className="cs-row min-h-[52px]">+ <input type="checkbox" className="peer sr-only" checked={on} onChange={() => setMembers((current) => current.includes(agent.agentId) ? current.filter((id) => id !== agent.agentId) : [...current, agent.agentId])} />+ <AgentSwatch agent={agent} size={30} />+ <span className="cs-row-text">{societyDisplayName(agent, assistantName)}</span>+ {group?.lead_agent_id === agent.agentId && <span className="cs-row-end">{t("society.lead.role")}</span>}+ <span className="cs-tick peer-focus-visible:ring-2 peer-focus-visible:ring-ring" data-on={on} aria-hidden>{on ? <Check className="size-3.5" strokeWidth={3} /> : null}</span>+ </label>;+ })}+ </div>+ </div>+ {error && <p role="alert" className="cs-hint" data-tone="error">{error}</p>}</div>+ <footer className="cs-foot">+ <button type="button" onClick={onClose} className="cs-btn" data-variant="ghost">{t("society.groups.cancel")}</button>+ <button type="submit" disabled={busy || !name.trim() || members.length < 2}+ className="cs-btn" data-variant="primary">{t("society.groups.save")}</button>+ </footer></form></Dialog.Content></Dialog.Portal>diff --git a/dodaios/ui/web/frontend/src/components/society/companion/AccessoryPicker.tsx b/dodaios/ui/web/frontend/src/components/society/companion/AccessoryPicker.tsxindex e4db12d261..a7449f8d0b 100644--- a/dodaios/ui/web/frontend/src/components/society/companion/AccessoryPicker.tsx+++ b/dodaios/ui/web/frontend/src/components/society/companion/AccessoryPicker.tsx@@ -1,5 +1,6 @@import { useState } from "react";-import { Lock, Shuffle, Sparkles, X } from "lucide-react";+import { Lock } from "lucide-react";+import "../calmSheet.css";import { useT } from "@/i18n";import { AgentSymbol } from "../AgentSymbol";import { ACCESSORY_IDS_BY_SLOT, OFFERED_SLOTS, randomAccessories, type AccessoryChoice, type AccessorySlot } from "./accessories";@@ -32,22 +33,21 @@ export function AccessoryPicker({ value, onChange, agentId }: { value: Companionconst rolled = randomAccessories();onChange(Object.fromEntries(Object.entries(rolled).filter(([, id]) => id && wearable(id))) as AccessoryChoice);};- const tile = "relative grid h-[84px] w-[84px] place-items-center rounded-lg border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";+ const tile = "calm-tile relative h-[84px] w-[84px]";return <div data-testid="accessory-picker"><div className="mb-2 flex items-center justify-between gap-2">- <span className="text-sm font-medium">{t("society.companion.accessories")}</span>+ <span className="text-[14px] font-medium">{t("society.companion.accessories")}</span><div className="flex gap-1">- <button type="button" onClick={surprise} className="inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-secondary hover:text-foreground">- <Shuffle size={14} />{t("society.companion.randomize")}+ <button type="button" onClick={surprise} className="cs-chip">+ {t("society.companion.randomize")}</button>- <button type="button" disabled={!Object.keys(worn).length} onClick={() => onChange({})} className="inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-secondary hover:text-foreground disabled:opacity-40">- <X size={14} />{t("society.companion.remove_all")}+ <button type="button" disabled={!Object.keys(worn).length} onClick={() => onChange({})} className="cs-chip disabled:opacity-40">+ {t("society.companion.remove_all")}</button></div></div>{looks.unlocks && (- <p className="mb-3 flex items-center gap-1.5 rounded-lg bg-secondary/60 px-3 py-2 text-xs text-muted-foreground" data-testid="look-progress">- <Sparkles size={14} className="shrink-0 text-primary" aria-hidden />+ <p className="mb-3 rounded-2xl bg-secondary/50 px-4 py-2.5 text-[13px] text-muted-foreground" data-testid="look-progress">{upcoming? t("society.companion.next_look").replace("{0}", String(looks.level)).replace("{1}", t(`society.companion.items.${upcoming.id}`)).replace("{2}", String(upcoming.level)): t("society.companion.all_looks_open")}@@ -58,7 +58,7 @@ export function AccessoryPicker({ value, onChange, agentId }: { value: Companionmarked={new Set(PICKER_SLOTS.filter(s => worn[s]))} /></div><div className="flex flex-wrap gap-2" role="group" aria-label={t(`society.companion.slots.${slot}`)}><button type="button" aria-pressed={!worn[slot]} aria-label={t("society.companion.none")} title={t("society.companion.none")} onClick={() => choose(undefined)}- className={`${tile} text-xs text-muted-foreground ${!worn[slot] ? "border-foreground bg-secondary" : "border-border hover:bg-secondary"}`}>+ className={`${tile} text-[13px] text-muted-foreground`} data-on={!worn[slot]}>{t("society.companion.none")}</button>{/* Open looks first, then the rest in the order the agent will earn them. */}@@ -70,7 +70,7 @@ export function AccessoryPicker({ value, onChange, agentId }: { value: Companionconst label = open ? name : `${name} · ${t("society.companion.unlocks_at").replace("{0}", String(at))}`;return <button key={id} type="button" aria-pressed={active} aria-label={label} title={label} disabled={!open} onClick={() => choose(id)}data-locked={open ? undefined : "true"}- className={`${tile} ${active ? "border-foreground bg-secondary" : open ? "border-border hover:bg-secondary" : "cursor-not-allowed border-dashed border-border"}`}>+ className={`${tile} ${open ? "" : "cursor-not-allowed"}`} data-on={active}><span className={open ? undefined : "opacity-35 grayscale"}><AgentSymbol shape={value.shape} color={value.color} eyes={value.eyes} skin={value.skin} accessories={{ ...worn, [slot]: id }} size={68} /></span>diff --git a/dodaios/ui/web/frontend/src/components/society/companion/AgentAppearanceDialog.tsx b/dodaios/ui/web/frontend/src/components/society/companion/AgentAppearanceDialog.tsxindex 65d74e17fe..597bf2e2be 100644--- a/dodaios/ui/web/frontend/src/components/society/companion/AgentAppearanceDialog.tsx+++ b/dodaios/ui/web/frontend/src/components/society/companion/AgentAppearanceDialog.tsx@@ -5,7 +5,6 @@ import { X } from "lucide-react";import { useT } from "@/i18n";import { societyDisplayName } from "@/lib/societyDisplayName";import { useEventStore } from "@/store/events";-import { Button } from "@/components/ui/button";import type { SocietyAgent } from "../data";import { AgentSwatch } from "../AgentSwatch";import { defaultRecipe, EDITABLE_CELLS, resolvePalette, type FigureRecipe } from "../figures/figureRecipe";@@ -14,6 +13,7 @@ import { toyLookFor } from "../figures/toy/toyFigureModel";import { pinLook, withHair } from "../figures/toy/wardrobe";import { CompanionEditor } from "./CompanionEditor";import { resolveCompanion } from "./appearance";+import "../calmSheet.css";const AgentFigureViewer = lazy(() => import("../figures/AgentFigureViewer").then(m => ({ default: m.AgentFigureViewer })));@@ -28,16 +28,16 @@ function CharacterEditor({ value, onChange, disabled }: { value: FigureRecipe; oconst setCell = (cell: string, color: string) => { const pinned = pinLook(value); onChange({ ...pinned, palette: { ...pinned.palette, [cell]: color } }); };return <fieldset disabled={disabled} className="grid gap-4 p-4" data-testid="character-editor"><div className="h-60"><Suspense fallback={null}><AgentFigureViewer recipe={value} quiet /></Suspense></div>- <div className="grid gap-2 text-sm">- <span>{t("society.office.hair_label")}</span>- <div className="flex flex-wrap gap-1.5" role="group" aria-label={t("society.office.hair_label")}>+ <div className="grid gap-2">+ <span className="text-[14px] font-medium">{t("society.office.hair_label")}</span>+ <div className="flex flex-wrap gap-1" role="group" aria-label={t("society.office.hair_label")}>{HAIR_STYLES.map(style => <button key={style} type="button" aria-pressed={hair === style} onClick={() => onChange(withHair(value, style))}- className={`rounded-full border px-2.5 py-1 text-xs ${hair === style ? "border-transparent bg-primary text-primary-foreground" : "border-border bg-background text-foreground hover:bg-secondary"}`}>+ className="cs-chip">{t(`society.office.hair_${style}`)}</button>)}</div></div>- <div className="grid grid-cols-2 gap-3">{EDITABLE_CELLS.map(cell => <label key={cell} className="flex items-center justify-between gap-2 text-sm">{t(`society.cell.${cell}`)}<input type="color" value={colors[cell]} onChange={e => setCell(cell, e.target.value)} className="h-8 w-10 rounded border border-border bg-background" /></label>)}</div>+ <div className="grid grid-cols-2 gap-3">{EDITABLE_CELLS.map(cell => <label key={cell} className="flex min-h-11 items-center justify-between gap-2 rounded-2xl bg-secondary/45 py-1.5 pl-4 pr-2 text-[14px]">{t(`society.cell.${cell}`)}<input type="color" value={colors[cell]} onChange={e => setCell(cell, e.target.value)} className="h-8 w-8 cursor-pointer rounded-full border-0 bg-transparent p-0" /></label>)}</div></fieldset>;}@@ -67,13 +67,13 @@ export function AgentAppearanceDialog({ agent, sample, onClose }: { agent: Socie};return <Dialog.Root open onOpenChange={open => { if (!open) close(); }}><Dialog.Portal><Dialog.Overlay className="fixed inset-0 z-50 bg-scrim/60 backdrop-blur-sm" />- <Dialog.Content data-testid="agent-appearance-dialog" onCloseAutoFocus={e => { e.preventDefault(); opener.current?.focus(); }} className="fixed left-1/2 top-1/2 z-50 flex max-h-[90dvh] w-[min(640px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-border bg-popover text-foreground shadow-float">- <header className="flex items-center gap-3 border-b border-border p-4"><AgentSwatch agent={{ ...agent, figure: recipe }} size={48} /><div className="flex-1"><Dialog.Title className="font-semibold">{displayName}</Dialog.Title><Dialog.Description className="text-sm text-muted-foreground">{t("society.companion.appearance")}</Dialog.Description></div><button aria-label={t("society.card.close")} onClick={close} className="rounded p-2 hover:bg-secondary"><X size={18} /></button></header>- <div className="flex shrink-0 gap-2 border-b border-border p-3" role="tablist" aria-label={t("society.companion.appearance")}>{(["character", "companion"] as const).map(value => <button key={value} type="button" role="tab" aria-selected={tab === value} onClick={() => setTab(value)} className={`rounded-md px-3 py-2 text-sm ${tab === value ? "bg-secondary text-foreground" : "text-muted-foreground"}`}>{t(`society.companion.${value}`)}</button>)}</div>+ <Dialog.Content data-testid="agent-appearance-dialog" onCloseAutoFocus={e => { e.preventDefault(); opener.current?.focus(); }} className="cs-sheet fixed left-1/2 top-1/2 z-50 flex max-h-[90dvh] w-[min(640px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden">+ <header className="cs-head"><div className="cs-head-row items-center"><AgentSwatch agent={{ ...agent, figure: recipe }} size={44} /><div className="min-w-0 flex-1"><Dialog.Title className="cs-title truncate">{displayName}</Dialog.Title><Dialog.Description className="cs-sub">{t("society.companion.appearance")}</Dialog.Description></div><button type="button" aria-label={t("society.card.close")} onClick={close} className="cs-close"><X size={16} aria-hidden /></button></div>+ <div className="cs-tabs" role="tablist" aria-label={t("society.companion.appearance")}>{(["character", "companion"] as const).map(value => <button key={value} type="button" role="tab" aria-selected={tab === value} onClick={() => setTab(value)} className="cs-tab">{t(`society.companion.${value}`)}</button>)}</div></header><div className="min-h-0 overflow-y-auto">{tab === "character" ? <CharacterEditor value={recipe} onChange={setRecipe} disabled={saving || sample} /> : <CompanionEditor value={resolveCompanion(agent.agentId, recipe.companion)} onChange={companion => setRecipe(r => ({ ...r, companion }))} disabled={saving || sample} lead={agent.tier === "lead"} agentId={agent.agentId} />}</div>- <footer className="flex shrink-0 flex-wrap justify-end gap-2 border-t border-border p-4">- {error && <p role="alert" className="w-full text-sm text-destructive">{t("society.profile_card.save_error")}</p>}- {discard ? <><span className="mr-auto text-sm" role="alert">{t("society.profile_card.unsaved")}</span><Button variant="ghost" onClick={() => setDiscard(false)}>{t("society.profile_card.keep_editing")}</Button><Button variant="secondary" onClick={onClose}>{t("society.profile_card.discard")}</Button></> : <><Button variant="ghost" onClick={close} disabled={saving}>{t("society.card.close")}</Button><Button onClick={() => void save()} disabled={!dirty || saving || sample}>{t(saving ? "society.card.saving" : "society.card.save")}</Button></>}+ <footer className="cs-foot">+ {error && <p role="alert" className="cs-hint w-full" data-tone="error">{t("society.profile_card.save_error")}</p>}+ {discard ? <><span className="cs-foot-note text-foreground" role="alert">{t("society.profile_card.unsaved")}</span><button type="button" className="cs-btn" data-variant="ghost" onClick={() => setDiscard(false)}>{t("society.profile_card.keep_editing")}</button><button type="button" className="cs-btn" data-variant="soft" onClick={onClose}>{t("society.profile_card.discard")}</button></> : <><button type="button" className="cs-btn" data-variant="ghost" onClick={close} disabled={saving}>{t("society.card.close")}</button><button type="button" className="cs-btn" data-variant="primary" onClick={() => void save()} disabled={!dirty || saving || sample}>{t(saving ? "society.card.saving" : "society.card.save")}</button></>}</footer></Dialog.Content></Dialog.Portal></Dialog.Root>;diff --git a/dodaios/ui/web/frontend/src/components/society/companion/CompanionEditor.tsx b/dodaios/ui/web/frontend/src/components/society/companion/CompanionEditor.tsxindex 923f7c0baf..45ba3aed04 100644--- a/dodaios/ui/web/frontend/src/components/society/companion/CompanionEditor.tsx+++ b/dodaios/ui/web/frontend/src/components/society/companion/CompanionEditor.tsx@@ -10,6 +10,7 @@ import { CreatureStage } from "./PixelCreature";import { growsCreature, useCreatureDefault } from "./creatureDefault";import { DesignPicker } from "./DesignPicker";import { SegmentedChoice } from "./SegmentedChoice";+import "../calmSheet.css";import { PetSprite } from "@/components/pets/PetSprite";import { usePets } from "@/hooks/usePets";import gigiMark from "@/assets/gigi-companion-avatar.png";@@ -50,43 +51,43 @@ export function CompanionEditor({ value, onChange, disabled = false, lead = falsif (kind === "pet" && !value.pet && firstPet) onChange({ ...value, pet: firstPet });}, [kind, value, firstPet, onChange]);return <fieldset disabled={disabled} className="flex min-w-0 flex-col gap-5 p-4" data-testid="companion-editor">- <div className="flex items-center gap-5 rounded-xl bg-secondary/50 p-5">+ <div className="flex items-center gap-5 rounded-[20px] bg-secondary/50 p-5">{lead ? <img src={gigiMark} width={88} height={88} alt="" /> : <CompanionMark appearance={value} size={88} mood={kind === "creature" ? mood : undefined} />}{/* A previewed state plays its sign beside the head; keep the text clear of it. */}{!lead && kind === "creature" && <span aria-hidden className="w-2 shrink-0" />}- <div><h3 className="font-medium">{t("society.companion.title")}</h3><p className="mt-1 text-sm text-muted-foreground">{t("society.companion.hint")}</p></div>+ <div><h3 className="text-[14px] font-medium">{t("society.companion.title")}</h3><p className="mt-1 text-[13px] leading-snug text-muted-foreground">{t("society.companion.hint")}</p></div></div>{/* A creature previews on a plain canvas, so it shows without a WebGL context; shapes and pets turn in the 3D studio. */}{preview3d && (!lead && kind === "creature"? <CreatureStage creature={creature} state={mood} />: <Suspense fallback={null}><CompanionPreview appearance={value} lead={lead} /></Suspense>)}{/* One switch across the full width, like the access switch of the create dialog. */}- {!lead && <div className="flex flex-col gap-1.5 text-sm"><span className="font-medium">{t("society.companion.look")}</span>+ {!lead && <div className="flex flex-col gap-2"><span className="text-[14px] font-medium">{t("society.companion.look")}</span><SegmentedChoice label={t("society.companion.look")} value={kind} onChange={choose}options={(["creature", "shape", "pet"] as const).map(id => ({ id, label: t(`society.companion.look_${id}`) }))} /></div>}- {!lead && kind !== "pet" && <label className="flex items-start justify-between gap-3 text-sm">- <span>{t("society.companion.creature.by_default")}<span className="mt-0.5 block text-xs text-muted-foreground">{t("society.companion.creature.by_default_hint")}</span></span>+ {!lead && kind !== "pet" && <label className="flex items-start justify-between gap-3 text-[14px]">+ <span>{t("society.companion.creature.by_default")}<span className="mt-0.5 block text-[13px] leading-snug text-muted-foreground">{t("society.companion.creature.by_default_hint")}</span></span><Switch checked={creaturesByDefault} onCheckedChange={setCreaturesByDefault} aria-label={t("society.companion.creature.by_default")} /></label>}{!lead && kind === "creature" && <CreaturePicker value={creature} onChange={wear} mood={mood} onMood={setMood} />}- {!lead && kind === "pet" && <div data-testid="companion-pet-picker"><span className="mb-1 block text-sm font-medium">{t("society.companion.pet")}</span>- <p className="mb-2 text-xs text-muted-foreground">{pets.length || petsQuery.isLoading ? t("society.companion.pet_hint") : t("society.companion.no_pets")}</p>+ {!lead && kind === "pet" && <div data-testid="companion-pet-picker"><span className="mb-1 block text-[14px] font-medium">{t("society.companion.pet")}</span>+ <p className="mb-2 text-[13px] text-muted-foreground">{pets.length || petsQuery.isLoading ? t("society.companion.pet_hint") : t("society.companion.no_pets")}</p><div className="flex flex-wrap gap-2">{pets.map(pet => <button key={pet.id} type="button" title={pet.name}aria-label={pet.name} aria-pressed={value.pet === pet.id} onClick={() => update({ pet: pet.id })}- className={`grid h-14 w-14 place-items-center rounded-lg border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${value.pet === pet.id ? "border-foreground bg-secondary" : "border-border hover:bg-secondary"}`}>+ className="calm-tile h-14 w-14" data-on={value.pet === pet.id}><PetSprite pet={pet} state={value.pet === pet.id ? "success" : "idle"} px={44} /></button>)}</div></div>}- {!lead && kind === "shape" && <><div><span className="mb-2 block text-sm font-medium">{t("society.companion.shape")}</span>+ {!lead && kind === "shape" && <><div><span className="mb-2 block text-[14px] font-medium">{t("society.companion.shape")}</span><div className="flex flex-wrap gap-2">{COMPANION_SHAPES.map(shape => <button key={shape} type="button"aria-label={t(`society.companion.shapes.${shape}`)} aria-pressed={value.shape === shape}title={t(`society.companion.shapes.${shape}`)}- onClick={() => update({ shape })} className={`grid h-16 w-16 place-items-center rounded-lg border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${value.shape === shape ? "border-foreground bg-secondary" : "border-border hover:bg-secondary"}`}>+ onClick={() => update({ shape })} className="calm-tile h-16 w-16" data-on={value.shape === shape}><AgentSymbol shape={shape} color={value.color} eyes={value.eyes} accessories={value.accessories} skin={value.skin} size={52} /></button>)}</div></div>- <div className="flex flex-col gap-1.5 text-sm"><span className="font-medium">{t("society.companion.eyes")}</span>+ <div className="flex flex-col gap-2"><span className="text-[14px] font-medium">{t("society.companion.eyes")}</span>{/* Plain toggles: a popup menu inside a modal dialog can strand its pointer lock. */}<SegmentedChoice label={t("society.companion.eyes")} value={value.eyes} onChange={eyes => update({ eyes })}options={(["dots", "lines"] as const).map(id => ({ id, label: t(`society.companion.${id}`) }))} />@@ -94,15 +95,15 @@ export function CompanionEditor({ value, onChange, disabled = false, lead = fals<AccessoryPicker value={value} onChange={accessories => update({ accessories })} agentId={agentId} /></>}{/* A shape is painted in the agent's colour; a pet brings its own colours. */}- {!lead && kind === "shape" && <div><span className="mb-2 block text-sm font-medium">{t("society.companion.color")}</span>+ {!lead && kind === "shape" && <div><span className="mb-2 block text-[14px] font-medium">{t("society.companion.color")}</span>{/* Two rows across the full width: the swatches scale with the dialog instead of leaving a gap on the right. */}<div className="grid w-full grid-cols-12 items-center gap-2">{COMPANION_COLORS.map(color => <button key={color} type="button" aria-label={`${t("society.companion.color")} ${color}`} aria-pressed={value.color === color}- onClick={() => update({ color })} className={`aspect-square w-full rounded-full border border-border ring-offset-2 ring-offset-popover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${value.color === color ? "ring-2 ring-foreground" : ""}`} style={{ background: color }} />)}- <input type="color" aria-label={t("society.companion.custom_color")} value={value.color} onChange={e => update({ color: e.target.value })} className="aspect-square h-auto w-full rounded border border-border bg-background" />+ onClick={() => update({ color })} className={`aspect-square w-full rounded-full shadow-[inset_0_0_0_1px_hsl(var(--border)/0.6)] ring-offset-2 ring-offset-popover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${value.color === color ? "ring-2 ring-foreground" : ""}`} style={{ background: color }} />)}+ <input type="color" aria-label={t("society.companion.custom_color")} value={value.color} onChange={e => update({ color: e.target.value })} className="aspect-square h-auto w-full rounded-full border-0 bg-transparent p-0" /></div></div>}{!lead && kind === "shape" && <DesignPicker skin={value.skin} color={value.color} onChange={(skin, color) => update({ skin, color })} />}- <label className="flex items-center justify-between gap-3 text-sm">{t("society.companion.visible")}+ <label className="flex items-center justify-between gap-3 text-[14px]">{t("society.companion.visible")}<Switch checked={value.enabled} onCheckedChange={enabled => update({ enabled })} aria-label={t("society.companion.visible")} /></label></fieldset>;diff --git a/dodaios/ui/web/frontend/src/components/society/companion/CreaturePicker.tsx b/dodaios/ui/web/frontend/src/components/society/companion/CreaturePicker.tsxindex 2f82e839c1..7c23c76215 100644--- a/dodaios/ui/web/frontend/src/components/society/companion/CreaturePicker.tsx+++ b/dodaios/ui/web/frontend/src/components/society/companion/CreaturePicker.tsx@@ -1,15 +1,14 @@import { useState } from "react";-import { Dices } from "lucide-react";import { useT } from "@/i18n";import {CREATURE_EYES, CREATURE_PALETTES, CREATURE_SEED_MAX, CREATURE_STATES, randomCreature, type CreatureLook, type CreatureState,} from "./creature";import { PixelCreature } from "./PixelCreature";import { SegmentedChoice } from "./SegmentedChoice";+import "../calmSheet.css";const CHOICES = 8;const rollSeed = () => Math.floor(Math.random() * (CREATURE_SEED_MAX + 1));-const chip = (on: boolean) => `rounded-full border px-2.5 py-1 text-xs ${on ? "border-transparent bg-primary text-primary-foreground" : "border-border bg-background text-foreground hover:bg-secondary"}`;/*** Everything a pixel creature has to choose: one of eight rolled figures, a@@ -35,35 +34,34 @@ export function CreaturePicker({ value, onChange, mood, onMood }: {return <div className="flex flex-col gap-5" data-testid="creature-picker"><div><div className="mb-2 flex items-center justify-between gap-3">- <span className="text-sm font-medium">{t("society.companion.creature.figure")}</span>- <button type="button" onClick={roll}- className="inline-flex h-9 items-center gap-2 rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-popover">- <Dices size={18} aria-hidden />{t("society.companion.creature.roll")}+ <span className="text-[14px] font-medium">{t("society.companion.creature.figure")}</span>+ <button type="button" onClick={roll} className="cs-btn" data-variant="soft" data-size="sm">+ {t("society.companion.creature.roll")}</button></div><div className="flex flex-wrap gap-2">{seeds.map((seed, index) => <button key={`${index}-${seed}`} type="button"aria-label={t("society.companion.creature.number").replace("{0}", String(seed))} aria-pressed={value.seed === seed} onClick={() => onChange({ ...value, seed })}- className={`grid h-14 w-14 place-items-center rounded-lg border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${value.seed === seed ? "border-foreground bg-secondary" : "border-border hover:bg-secondary"}`}>+ className="calm-tile h-14 w-14" data-on={value.seed === seed}><PixelCreature creature={{ ...value, seed }} size={40} /></button>)}</div></div><div>- <span className="mb-2 block text-sm font-medium">{t("society.companion.creature.palette")}</span>+ <span className="mb-2 block text-[14px] font-medium">{t("society.companion.creature.palette")}</span><div className="flex flex-wrap gap-2">{CREATURE_PALETTES.map(palette => <button key={palette.id} type="button"aria-label={t(`society.companion.creature.palettes.${palette.id}`)} title={t(`society.companion.creature.palettes.${palette.id}`)}aria-pressed={value.palette === palette.id} onClick={() => onChange({ ...value, palette: palette.id })}- className={`h-9 w-9 rounded-full border border-border ring-offset-2 ring-offset-popover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${value.palette === palette.id ? "ring-2 ring-foreground" : ""}`}+ className={`h-9 w-9 rounded-full shadow-[inset_0_0_0_1px_hsl(var(--border)/0.6)] ring-offset-2 ring-offset-popover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${value.palette === palette.id ? "ring-2 ring-foreground" : ""}`}style={{ background: `linear-gradient(180deg, ${palette.colors.join(", ")})` }} />)}</div></div>- <div className="flex flex-col gap-1.5 text-sm"><span className="font-medium">{t("society.companion.eyes")}</span>+ <div className="flex flex-col gap-2"><span className="text-[14px] font-medium">{t("society.companion.eyes")}</span><SegmentedChoice label={t("society.companion.eyes")} value={value.eyes} onChange={eyes => onChange({ ...value, eyes })}options={CREATURE_EYES.map(id => ({ id, label: t(`society.companion.creature.eye_kinds.${id}`) }))} /></div><div>- <span className="mb-1 block text-sm font-medium">{t("society.companion.creature.states")}</span>- <p className="mb-2 text-xs text-muted-foreground">{t("society.companion.creature.states_hint")}</p>- <div className="flex flex-wrap gap-1.5" role="group" aria-label={t("society.companion.creature.states")}>- {CREATURE_STATES.map(state => <button key={state} type="button" aria-pressed={mood === state} onClick={() => onMood(state)} className={chip(mood === state)}>+ <span className="mb-1 block text-[14px] font-medium">{t("society.companion.creature.states")}</span>+ <p className="mb-2 text-[13px] text-muted-foreground">{t("society.companion.creature.states_hint")}</p>+ <div className="flex flex-wrap gap-1" role="group" aria-label={t("society.companion.creature.states")}>+ {CREATURE_STATES.map(state => <button key={state} type="button" aria-pressed={mood === state} onClick={() => onMood(state)} className="cs-chip">{t(`society.companion.creature.state_names.${state}`)}</button>)}</div>diff --git a/dodaios/ui/web/frontend/src/components/society/companion/SegmentedChoice.tsx b/dodaios/ui/web/frontend/src/components/society/companion/SegmentedChoice.tsxindex 4c11cdcf8c..5c5853f466 100644--- a/dodaios/ui/web/frontend/src/components/society/companion/SegmentedChoice.tsx+++ b/dodaios/ui/web/frontend/src/components/society/companion/SegmentedChoice.tsx@@ -1,3 +1,5 @@+import "../calmSheet.css";+/*** One of a few choices as a single switch across the full width: the look* editor's rows (look, eyes, accessory slot) all read and click alike.@@ -11,10 +13,10 @@ export function SegmentedChoice<T extends string>({ options, value, onChange, la/** Choices that carry a small dot (a slot that already wears something). */marked?: ReadonlySet<T>;}) {- return <div className="flex gap-1 rounded-lg border border-border p-1" role={role} aria-label={label}>+ return <div className="cs-tabs" data-fill="true" role={role} aria-label={label}>{options.map(option => <button key={option.id} type="button" onClick={() => onChange(option.id)}{...(role === "tablist" ? { role: "tab", "aria-selected": value === option.id } : { "aria-pressed": value === option.id })}- className={`min-w-0 flex-1 truncate rounded-md px-3 py-1.5 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${value === option.id ? "bg-secondary text-foreground" : "text-muted-foreground hover:bg-secondary hover:text-foreground"}`}>+ className="cs-tab">{option.label}{marked?.has(option.id) && <span aria-hidden className="ml-1.5 inline-block h-1.5 w-1.5 rounded-full bg-current align-middle" />}</button>)}diff --git a/dodaios/ui/web/frontend/src/components/society/create/AccessChoice.tsx b/dodaios/ui/web/frontend/src/components/society/create/AccessChoice.tsxindex a2604621cb..aca59702ec 100644--- a/dodaios/ui/web/frontend/src/components/society/create/AccessChoice.tsx+++ b/dodaios/ui/web/frontend/src/components/society/create/AccessChoice.tsx@@ -6,10 +6,10 @@* message would fail.*/import { useId, useRef, type KeyboardEvent } from "react";-import { TriangleAlert } from "lucide-react";import { useT } from "@/i18n";import { cn } from "@/lib/utils";import { blockedReasonKey, type AccessOption } from "./seatChoice";+import "../calmSheet.css";export function AccessChoice({ options, value, hint, warn = false, disabled, onChange }: {options: AccessOption[];@@ -39,10 +39,11 @@ export function AccessChoice({ options, value, hint, warn = false, disabled, onC}return (- <div className="flex flex-col gap-1.5 text-sm">- <span className="font-medium" id={`${id}-label`}>{t("society.create_agent.access_label")}</span>+ <div className="flex flex-col gap-2">+ <span className="cs-label" id={`${id}-label`}>{t("society.create_agent.access_label")}</span><div- className="flex gap-1 rounded-lg border border-border p-1"+ className="cs-tabs"+ data-fill="true"role="radiogroup"aria-labelledby={`${id}-label`}aria-describedby={hint ? `${id}-hint` : undefined}@@ -62,14 +63,7 @@ export function AccessChoice({ options, value, hint, warn = false, disabled, onCdisabled={disabled || Boolean(entry.blocked)}onClick={() => onChange(entry.kind)}onKeyDown={(event) => onKeyDown(event, entry.kind)}- className={cn(- "min-w-0 flex-1 truncate rounded-md px-3 py-1.5 text-sm transition-colors disabled:opacity-50",- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",- checked- ? "bg-secondary text-foreground"- : "text-muted-foreground hover:bg-secondary hover:text-foreground",- entry.blocked && "line-through hover:bg-transparent hover:text-muted-foreground",- )}+ className={cn("cs-tab", entry.blocked && "line-through")}>{t(`society.create.kind_${entry.kind}`)}</button>@@ -77,14 +71,13 @@ export function AccessChoice({ options, value, hint, warn = false, disabled, onC})}</div>{hint ? (- <p id={`${id}-hint`} className={cn("flex items-start gap-1.5 text-xs", warn ? "text-warning" : "text-muted-foreground")}+ <p id={`${id}-hint`} className="cs-hint" data-tone={warn ? "warn" : undefined}data-testid={warn ? "create-agent-access-cost" : undefined}>- {warn ? <TriangleAlert className="mt-px size-3.5 shrink-0" aria-hidden /> : null}- <span>{hint}</span>+ {hint}</p>) : null}{options.filter((entry) => entry.blocked).map((entry) => (- <p key={entry.kind} id={`${id}-blocked-${entry.kind}`} role="note" className="text-xs text-warning"+ <p key={entry.kind} id={`${id}-blocked-${entry.kind}`} role="note" className="cs-hint" data-tone="warn"data-testid={`create-agent-access-blocked-${entry.kind}`}>{t(blockedReasonKey(entry.blocked ?? ""))}</p>diff --git a/dodaios/ui/web/frontend/src/components/society/create/ComputerPicker.tsx b/dodaios/ui/web/frontend/src/components/society/create/ComputerPicker.tsxindex dee0fbaacf..b6eaedc7bf 100644--- a/dodaios/ui/web/frontend/src/components/society/create/ComputerPicker.tsx+++ b/dodaios/ui/web/frontend/src/components/society/create/ComputerPicker.tsx@@ -31,11 +31,14 @@ export function ComputerPicker({value,onChange,labelClass,+ layout = "field",testId = "society-computer-picker",}: {value: string;onChange: (computerId: string) => void;labelClass?: string;+ /** "row": a pane card line, label left and a quiet picker right, the hint below. */+ layout?: "field" | "row";testId?: string;}) {const t = useT();@@ -45,9 +48,12 @@ export function ComputerPicker({const rows = (computers.data ?? []).filter((c) => c.enabled !== false || c.id === value);const chosen = rows.find((c) => c.id === value);+ const row = layout === "row";return (<div data-testid={testId}>- <span className={labelClass}>{t("society.create.runs_on")}</span>+ <div className={row ? "ap-line" : undefined}>+ <span className={row ? "ap-line-label" : labelClass}>{t("society.create.runs_on")}</span>+ <span className={row ? "ml-auto min-w-0 shrink-0" : undefined}><Comboboxvalue={value}groups={[@@ -70,8 +76,13 @@ export function ComputerPicker({]}onChange={onChange}ariaLabel={t("society.create.runs_on")}+ className={row ? "ap-pick" : undefined}+ triggerIcon={!row}+ triggerHint={!row}/>- <p className="mt-1 text-xs text-muted-foreground">+ </span>+ </div>+ <p className={row ? "ap-hint ap-line-hint" : "mt-1 text-xs text-muted-foreground"}>{chosen? chosen.health.status === "online"? t("society.create.runs_on_remote_hint")diff --git a/dodaios/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx b/dodaios/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsxindex 2633c5cc60..b58b2e6b87 100644--- a/dodaios/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx+++ b/dodaios/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx@@ -14,11 +14,10 @@* (fixed for the agent's life) and any connected provider. Mounted once* (App.tsx); every plus opens it through `useCreateAgentDialog`.*/-import { useEffect, useMemo, useRef, useState, Suspense, lazy, type KeyboardEvent, type ReactNode } from "react";+import { useEffect, useMemo, useRef, useState, Suspense, lazy, type KeyboardEvent } from "react";import * as Dialog from "@radix-ui/react-dialog";import { useQueryClient } from "@tanstack/react-query";-import { ArrowLeft, FileInput, LayoutGrid, Loader2, PencilLine, TriangleAlert, X } from "lucide-react";-import { Button } from "@/components/ui/button";+import { ArrowLeft, Loader2, X } from "lucide-react";import { Input } from "@/components/ui/input";import { fill, useT } from "@/i18n";import { cn } from "@/lib/utils";@@ -33,19 +32,15 @@ import { EMPTY_IMPORT, ImportTemplatePane, type ImportState } from "./ImportTempimport { SeatFields, SeatSummary, useCreateSeat, type SeatPick } from "./SeatFields";import { StarterGallery } from "./StarterGallery";import { defaultTools, starterCopy, type AreaFilter } from "./starterFilters";-import { StarterIcon } from "./starterIcons";import { installStarter, useStarters, type InstallStarterResult, type Starter, type StarterSeat } from "./startersApi";import { TemplatePreviewCard } from "./TemplatePreviewCard";+import "../calmSheet.css";const CompanionEditor = lazy(() =>import("../companion/CompanionEditor").then((m) => ({ default: m.CompanionEditor })),);-const MODES: readonly { id: CreateAgentMode; icon: ReactNode }[] = [- { id: "quick", icon: <PencilLine className="size-3.5" aria-hidden /> },- { id: "starter", icon: <LayoutGrid className="size-3.5" aria-hidden /> },- { id: "import", icon: <FileInput className="size-3.5" aria-hidden /> },-];+const MODES: readonly { id: CreateAgentMode }[] = [{ id: "quick" }, { id: "starter" }, { id: "import" }];/** A new agent starts as a pixel creature; the shape underneath is there for a change of mind. */function randomCompanion(): CompanionAppearance {@@ -233,22 +228,22 @@ function CreateAgentDialog() {aria-describedby={undefined}className={cn("fixed left-1/2 top-1/2 z-50 flex max-h-[92dvh] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden",- "rounded-[18px] border border-border bg-popover text-foreground shadow-float",- mode === "quick" ? "w-[min(880px,calc(100vw-24px))]" : "h-[min(720px,92dvh)] w-[min(960px,calc(100vw-24px))]",+ // One sheet size for every tab, so switching Blank / starter / Import never jumps.+ "cs-sheet h-[min(720px,92dvh)] w-[min(960px,calc(100vw-24px))]",)}>- <header className="flex shrink-0 flex-col gap-3 border-b border-border px-5 pb-3 pt-4">- <div className="flex items-start gap-3">+ <header className="cs-head">+ <div className="cs-head-row"><div className="min-w-0 flex-1">- <Dialog.Title className="text-lg font-semibold text-foreground-strong">{t("society.create_agent.title")}</Dialog.Title>- <p className="text-sm text-muted-foreground" data-testid="create-agent-subtitle">{t(`agent_create.mode.${mode}_hint`)}</p>+ <Dialog.Title className="cs-title">{t("society.create_agent.title")}</Dialog.Title>+ <p className="cs-sub" data-testid="create-agent-subtitle">{t(`agent_create.mode.${mode}_hint`)}</p></div><button type="button" aria-label={t("society.card.close")} onClick={() => { if (!saving) (created ? finish(created.agent) : cancel()); }}- className="rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">- <X size={18} />+ className="cs-close">+ <X size={16} aria-hidden /></button></div>- <div role="tablist" aria-label={t("agent_create.mode.label")} className="flex w-full gap-1 rounded-[10px] border border-border bg-background/60 p-1 sm:w-auto sm:self-start">+ <div role="tablist" aria-label={t("agent_create.mode.label")} className="cs-tabs">{MODES.map((entry, index) => {const on = entry.id === mode;return (@@ -263,13 +258,8 @@ function CreateAgentDialog() {disabled={saving || Boolean(created)}onClick={() => { setMode(entry.id); setError(null); }}data-testid={`create-agent-mode-${entry.id}`}- className={cn(- "inline-flex flex-1 items-center justify-center gap-1.5 rounded-[7px] px-3 py-1.5 text-sm transition-colors duration-150 sm:flex-none",- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",- on ? "bg-secondary text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground",- )}+ className="cs-tab">- {entry.icon}{t(`agent_create.mode.${entry.id}`)}</button>);@@ -280,9 +270,9 @@ function CreateAgentDialog() {<form className="flex min-h-0 flex-1 flex-col" onSubmit={(event) => { event.preventDefault(); void submit(); }}>{mode === "quick" ? (<div className="grid min-h-0 flex-1 overflow-y-auto md:grid-cols-2 md:overflow-hidden">- <div className="flex min-h-0 flex-col gap-5 p-5 md:overflow-y-auto">- <label className="flex flex-col gap-1.5 text-sm">- <span className="font-medium">{t("society.create_agent.name_label")}</span>+ <div className="flex min-h-0 flex-col gap-5 px-6 pb-6 pt-3 md:overflow-y-auto">+ <label className="flex flex-col gap-2">+ <span className="cs-label">{t("society.create_agent.name_label")}</span><InputautoFocusvalue={name}@@ -293,10 +283,10 @@ function CreateAgentDialog() {data-testid="create-agent-name"/></label>- <label className="flex flex-col gap-1.5 text-sm">+ <label className="flex flex-col gap-2"><span className="flex items-baseline justify-between gap-2">- <span className="font-medium">{t("agent_create.quick.job_label")}</span>- <span className="text-xs text-foreground-faint">{t("agent_create.quick.optional")}</span>+ <span className="cs-label">{t("agent_create.quick.job_label")}</span>+ <span className="cs-hint">{t("agent_create.quick.optional")}</span></span><Inputvalue={job}@@ -306,24 +296,24 @@ function CreateAgentDialog() {disabled={saving}data-testid="create-agent-job"/>- <span className="text-xs text-muted-foreground">{t("agent_create.quick.job_hint")}</span>+ <span className="cs-hint">{t("agent_create.quick.job_hint")}</span></label>- <div className="flex flex-col gap-1.5 text-sm">- <span className="font-medium">{t("society.create_agent.companion_label")}</span>- <div className="-mx-5">+ <div className="flex flex-col gap-2">+ <span className="cs-label">{t("society.create_agent.companion_label")}</span>+ <div className="-mx-4"><Suspense fallback={null}><CompanionEditor value={companion} onChange={setCompanion} disabled={saving} /></Suspense></div></div></div>- <div className="min-h-0 border-t border-border p-5 md:overflow-y-auto md:border-l md:border-t-0">+ <div className="min-h-0 px-6 pb-6 pt-3 md:overflow-y-auto"><SeatFields seat={seat} disabled={saving} /></div></div>) : mode === "starter" ? (<div className="grid min-h-0 flex-1 md:grid-cols-[320px_minmax(0,1fr)]">- <div className={cn("flex min-h-0 flex-col p-4 md:border-r md:border-border", mobilePreview && "hidden md:flex")}>+ <div className={cn("flex min-h-0 flex-col px-4 pb-4 pt-2", mobilePreview && "hidden md:flex")}><StarterGallerystarters={starterList}areas={starters.data?.areas ?? []}@@ -338,14 +328,14 @@ function CreateAgentDialog() {onSelect={pickStarter}/></div>- <div className={cn("flex min-h-0 flex-col gap-4 overflow-y-auto p-5", !mobilePreview && "hidden md:flex")}>- <button type="button" onClick={() => setMobilePreview(false)}- className="inline-flex items-center gap-1.5 self-start rounded text-xs text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring md:hidden">- <ArrowLeft className="size-3.5" aria-hidden /> {t("agent_create.gallery.back")}- </button>+ <div className={cn("flex min-h-0 flex-col gap-5 overflow-y-auto px-6 pb-6 pt-2", !mobilePreview && "hidden md:flex")}>+ <div className="md:hidden">+ <button type="button" onClick={() => setMobilePreview(false)} className="cs-link">+ <ArrowLeft className="size-3.5" aria-hidden /> {t("agent_create.gallery.back")}+ </button>+ </div>{starter && copy ? (<TemplatePreviewCard- icon={<StarterIcon name={starter.icon} />}name={starterName}defaultName={copy.name}onNameChange={setStarterName}@@ -369,13 +359,12 @@ function CreateAgentDialog() {</div>) : (<div className="grid min-h-0 flex-1 overflow-y-auto md:grid-cols-[minmax(0,5fr)_minmax(0,6fr)] md:overflow-hidden">- <div className="min-h-0 p-5 md:overflow-y-auto md:border-r md:border-border">+ <div className="min-h-0 px-6 pb-6 pt-3 md:overflow-y-auto"><ImportTemplatePane text={importText} onTextChange={setImportText} onChange={setImported} disabled={saving} /></div>- <div className="flex min-h-0 flex-col gap-4 p-5 md:overflow-y-auto">+ <div className="flex min-h-0 flex-col gap-5 px-6 pb-6 pt-3 md:overflow-y-auto">{imported.preview?.template && imported.preview.summary ? (<TemplatePreviewCard- icon={<FileInput />}name={importName}defaultName={imported.preview.template.name}onNameChange={setImportName}@@ -386,7 +375,7 @@ function CreateAgentDialog() {picked={importPicked}onToggleTool={(id) => setImportPicked((current) => toggle(current, id))}disabled={saving || Boolean(created)}- note={<p className="text-xs text-foreground-faint">{t("agent_create.import.design_only")}</p>}+ note={<p className="cs-hint">{t("agent_create.import.design_only")}</p>}/>) : (<EmptyPreview text={t("agent_create.import.empty_preview")} />@@ -396,26 +385,25 @@ function CreateAgentDialog() {</div>)}- <footer className="flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-border px-5 py-3">+ <footer className="cs-foot">{created ? (- <p role="alert" className="mr-auto flex items-center gap-1.5 text-sm text-warning" data-testid="create-agent-routine-error">- <TriangleAlert className="size-4 shrink-0" aria-hidden />+ <p role="alert" className="cs-foot-note cs-hint" data-tone="warn" data-testid="create-agent-routine-error">{fill(t("agent_create.routine_failed"), { agent: created.agent.name })}</p>) : error ? (- <p role="alert" className="mr-auto text-sm text-destructive">{error}</p>+ <p role="alert" className="cs-foot-note cs-hint" data-tone="error">{error}</p>) : (- <p className="mr-auto hidden text-xs text-muted-foreground sm:block">{t(`agent_create.footer.${mode}`)}</p>+ <p className="cs-foot-note hidden sm:block">{t(`agent_create.footer.${mode}`)}</p>)}{!created ? (- <Button type="button" variant="ghost" onClick={() => cancel()} disabled={saving}>+ <button type="button" className="cs-btn" data-variant="ghost" onClick={() => cancel()} disabled={saving}>{t("society.create_agent.cancel")}- </Button>+ </button>) : null}- <Button type="submit" disabled={!created && !canCreate} data-testid="create-agent-submit">- {saving ? <Loader2 className="animate-spin" aria-hidden /> : null}+ <button type="submit" className="cs-btn" data-variant="primary" disabled={!created && !canCreate} data-testid="create-agent-submit">+ {saving ? <Loader2 className="size-4 animate-spin" aria-hidden /> : null}{submitLabel}- </Button>+ </button></footer></form></Dialog.Content>@@ -426,9 +414,8 @@ function CreateAgentDialog() {function EmptyPreview({ text }: { text: string }) {return (- <div className="flex min-h-[220px] flex-1 flex-col items-center justify-center gap-2 rounded-[12px] border border-dashed border-border px-6 text-center" data-testid="create-agent-empty-preview">- <LayoutGrid className="size-5 text-foreground-faint" aria-hidden />- <p className="max-w-[28ch] text-sm text-muted-foreground">{text}</p>+ <div className="cs-empty" data-testid="create-agent-empty-preview">+ <p className="max-w-[30ch]">{text}</p></div>);}diff --git a/dodaios/ui/web/frontend/src/components/society/create/ImportTemplatePane.tsx b/dodaios/ui/web/frontend/src/components/society/create/ImportTemplatePane.tsxindex 7424291d26..3bba432408 100644--- a/dodaios/ui/web/frontend/src/components/society/create/ImportTemplatePane.tsx+++ b/dodaios/ui/web/frontend/src/components/society/create/ImportTemplatePane.tsx@@ -6,7 +6,8 @@* Create.*/import { useEffect, useRef, useState } from "react";-import { FileJson, Loader2, ShieldAlert, Upload } from "lucide-react";+import { Loader2 } from "lucide-react";+import "../calmSheet.css";import { Textarea } from "@/components/ui/textarea";import { useT } from "@/i18n";import { readFileText } from "@/lib/agentShare";@@ -96,15 +97,17 @@ export function ImportTemplatePane({ text, onTextChange, onChange, disabled }: Preturn (<div className="flex flex-col gap-3" data-testid="import-pane"><div className="flex items-center justify-between gap-2">- <label htmlFor="agent-import-text" className="text-sm font-medium">{t("agent_create.import.paste_label")}</label>+ <label htmlFor="agent-import-text" className="cs-label">{t("agent_create.import.paste_label")}</label><buttontype="button"onClick={() => fileInput.current?.click()}disabled={disabled}- className="inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1 text-xs text-foreground transition-colors hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50"+ className="cs-btn"+ data-variant="soft"+ data-size="sm"data-testid="import-open-file">- <Upload className="size-3.5" aria-hidden /> {t("agent_create.import.open_file")}+ {t("agent_create.import.open_file")}</button><inputref={fileInput}@@ -122,29 +125,25 @@ export function ImportTemplatePane({ text, onTextChange, onChange, disabled }: Pplaceholder={t("agent_create.import.paste_placeholder")}disabled={disabled}spellCheck={false}- className="min-h-[120px] font-mono text-sm"+ className="min-h-[180px] font-mono text-[13px]"data-testid="import-text"/>{checking ? (- <p className="flex items-center gap-2 text-xs text-muted-foreground" role="status">+ <p className="cs-hint flex items-center gap-2" role="status"><Loader2 className="size-3.5 animate-spin" aria-hidden /> {t("agent_create.import.checking")}</p>) : null}- {problem ? <p role="alert" className="text-xs text-destructive">{problem}</p> : null}+ {problem ? <p role="alert" className="cs-hint" data-tone="error">{problem}</p> : null}{errors.length ? (- <div role="alert" className="flex flex-col gap-1 rounded-[10px] border border-destructive/30 bg-destructive/5 px-3 py-2.5 text-xs" data-testid="import-errors">- <p className="flex items-center gap-1.5 font-medium text-destructive">- <ShieldAlert className="size-3.5" aria-hidden /> {t("agent_create.import.errors_title")}- </p>- <ul className="list-disc pl-5 text-foreground-secondary">+ <div role="alert" className="cs-card gap-1.5 bg-destructive/5" data-pad="true" data-testid="import-errors">+ <p className="cs-label text-destructive">{t("agent_create.import.errors_title")}</p>+ <ul className="cs-hint list-disc pl-5">{errors.map((error) => <li key={error}>{error}</li>)}</ul></div>) : null}{!text.trim() ? (- <p className="flex items-start gap-2 text-xs text-muted-foreground">- <FileJson className="mt-0.5 size-3.5 shrink-0" aria-hidden /> {t("agent_create.import.safety_note")}- </p>+ <p className="cs-hint">{t("agent_create.import.safety_note")}</p>) : null}</div>);diff --git a/dodaios/ui/web/frontend/src/components/society/create/SeatFields.tsx b/dodaios/ui/web/frontend/src/components/society/create/SeatFields.tsxindex 6783f23288..f9e0f7baa2 100644--- a/dodaios/ui/web/frontend/src/components/society/create/SeatFields.tsx+++ b/dodaios/ui/web/frontend/src/components/society/create/SeatFields.tsx@@ -7,7 +7,7 @@* on any runtime and any provider exactly like a blank agent.*/import { useEffect, useMemo, useState } from "react";-import { ChevronDown, Loader2, RefreshCw, TriangleAlert } from "lucide-react";+import { ChevronDown, Loader2, RefreshCw } from "lucide-react";import { BrandedSelect } from "@/components/ui/select";import { AgentMark } from "@/components/agentic/AgentMark";import { ProviderLogo } from "@/components/providers/ProviderLogo";@@ -21,6 +21,7 @@ import { modelSeats, runtimeSeats } from "../chat/modelChoices";import { useModelMenuData } from "../chat/useModelMenuData";import { accountChoice, accountHint } from "./brainPicker";import { AccessChoice } from "./AccessChoice";+import "../calmSheet.css";import { accessModels, billedPerUse, defaultModel, pickableOption, providerChoices, type AccessBlocked, type AccessOption, type ProviderChoice } from "./seatChoice";/** A model list this long gets a search field. */@@ -157,17 +158,17 @@ export function SeatFields({ seat, disabled }: { seat: CreateSeat; disabled: booconst t = useT();const { chosen, option, choices, menu, runtimes, models, accounts } = seat;return (- <div className="flex flex-col gap-5">- <div className="flex flex-col gap-1.5 text-sm">- <span className="font-medium">{t("society.create_agent.type_label")}</span>+ <div className="flex flex-col gap-6">+ <div className="flex flex-col gap-2">+ <span className="cs-label">{t("society.create_agent.type_label")}</span><RuntimeChoice value={seat.runtime} onChange={seat.setRuntime} disabled={disabled} />- <p className="text-xs text-muted-foreground" data-testid="create-agent-runtime-note">+ <p className="cs-hint" data-testid="create-agent-runtime-note">{t(`agent_create.runtime_note.${seat.runtime}`)}</p></div>- <div className="flex flex-col gap-1.5 text-sm">- <span className="font-medium">{t("society.create_agent.provider_label")}</span>+ <div className="flex flex-col gap-2">+ <span className="cs-label">{t("society.create_agent.provider_label")}</span>{chosen ? (<BrandedSelectvalue={chosen.id}@@ -185,7 +186,7 @@ export function SeatFields({ seat, disabled }: { seat: CreateSeat; disabled: boo}))}/>) : (- <p className="text-xs text-muted-foreground">+ <p className="cs-hint">{menu.loading? t("society.create.catalog_loading"): t(seat.external ? "society.create_agent.no_provider" : "society.create_agent.no_provider_jarvis")}@@ -206,8 +207,8 @@ export function SeatFields({ seat, disabled }: { seat: CreateSeat; disabled: boo{!seat.external ? <SandboxChoice value={seat.executionEnvironment} onChange={seat.setExecutionEnvironment} disabled={disabled} /> : null}{chosen && option && accounts.length ? (- <div className="flex flex-col gap-1.5 text-sm">- <span className="font-medium">{t("society.create_agent.account_label")}</span>+ <div className="flex flex-col gap-2">+ <span className="cs-label">{t("society.create_agent.account_label")}</span><BrandedSelectvalue={seat.accountValue}onValueChange={seat.setAccount}@@ -223,12 +224,12 @@ export function SeatFields({ seat, disabled }: { seat: CreateSeat; disabled: boo) : null}{chosen && option ? (- <div className="flex flex-col gap-1.5 text-sm">+ <div className="flex flex-col gap-2"><div className="flex items-center justify-between gap-2">- <span className="font-medium">{t("society.create_agent.model_label")}</span>+ <span className="cs-label">{t("society.create_agent.model_label")}</span><button type="button" disabled={disabled || menu.refreshing} onClick={() => void Promise.all([menu.refresh(), runtimes.refetch()])}aria-label={t("society.chat.model_refresh")} title={t("society.chat.model_refresh")}- className="rounded p-1 text-muted-foreground hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50">+ className="inline-flex size-7 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50">{menu.refreshing ? <Loader2 className="h-3.5 w-3.5 animate-spin" aria-hidden /> : <RefreshCw className="h-3.5 w-3.5" aria-hidden />}</button></div>@@ -245,9 +246,9 @@ export function SeatFields({ seat, disabled }: { seat: CreateSeat; disabled: boolabel: entry.label || entry.id || seat.defaultModelLabel,}))}/>- <p className="text-xs text-muted-foreground">{t("society.create_agent.model_hint")}</p>- {menu.refreshing ? <p role="status" className="text-xs text-muted-foreground">{t("society.chat.models_loading")}</p> : null}- {menu.refreshFailed || seat.selectedModelsFailed ? <p role="alert" className="text-xs text-destructive">{t("society.chat.model_load_failed")}</p> : null}+ <p className="cs-hint">{t("society.create_agent.model_hint")}</p>+ {menu.refreshing ? <p role="status" className="cs-hint">{t("society.chat.models_loading")}</p> : null}+ {menu.refreshFailed || seat.selectedModelsFailed ? <p role="alert" className="cs-hint" data-tone="error">{t("society.chat.model_load_failed")}</p> : null}</div>) : null}</div>@@ -272,39 +273,33 @@ export function SeatSummary({ seat, disabled }: { seat: CreateSeat; disabled: bo// Still reading the seats: not a missing choice, just a moment.const blocked = !seat.ready && !seat.seatsPending;return (- <section className="rounded-[10px] border border-border bg-sheen/[0.02]" data-testid="create-agent-seat-summary">+ <section className="cs-card" data-testid="create-agent-seat-summary"><buttontype="button"onClick={() => setOpen((value) => !value)}aria-expanded={open}disabled={disabled}- className="flex w-full items-center gap-3 rounded-[10px] px-3 py-2.5 text-left transition-colors hover:bg-secondary/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"+ className="cs-row">- <span className="flex size-7 shrink-0 items-center justify-center rounded-md border border-border bg-background">- {chosen?.mark- ? <AgentMark agent={chosen.mark} label={chosen.label} logoUrl={chosen.logoUrl} variant="plain" size="sm" />- : chosen ? <ProviderLogo providerId={chosen.logo} label={chosen.label} size="sm" /> : null}- </span><span className="min-w-0 flex-1">- <span className="block text-xs text-muted-foreground">{t("agent_create.seat.runs_on")}</span>- <span className={cn("block truncate text-sm", blocked ? "text-warning" : "text-foreground")}>+ <span className="cs-row-detail">{t("agent_create.seat.runs_on")}</span>+ <span className={cn("block truncate text-[14px]", blocked ? "text-warning" : "text-foreground")}>{seat.seatsPending ? t("society.create.catalog_loading") : blocked ? t("agent_create.seat.needs_choice") : parts.join(" · ")}</span></span>- <span className="flex shrink-0 items-center gap-1 text-xs text-muted-foreground">+ <span className="cs-row-end flex items-center gap-1">{t(open ? "agent_create.seat.hide" : "agent_create.seat.change")}<ChevronDown className={cn("size-3.5 transition-transform duration-200 motion-reduce:transition-none", open && "rotate-180")} aria-hidden /></span></button>{billedPerUse(option) && option ? (// Billed per use: said in plain sight, not only behind "Change".- <p className="flex items-start gap-1.5 border-t border-border px-3 py-2 text-xs text-warning" data-testid="create-agent-seat-cost">- <TriangleAlert className="mt-px size-3.5 shrink-0" aria-hidden />- <span>{accessHint(t, option)}</span>+ <p className="cs-hint px-3 pb-2.5" data-tone="warn" data-testid="create-agent-seat-cost">+ {accessHint(t, option)}</p>) : null}{open || blocked ? (- <div className="border-t border-border px-3 py-4">+ <div className="px-3 pb-4 pt-3"><SeatFields seat={seat} disabled={disabled} /></div>) : null}diff --git a/dodaios/ui/web/frontend/src/components/society/create/StarterGallery.tsx b/dodaios/ui/web/frontend/src/components/society/create/StarterGallery.tsxindex 32b4e29c39..a5660cd192 100644--- a/dodaios/ui/web/frontend/src/components/society/create/StarterGallery.tsx+++ b/dodaios/ui/web/frontend/src/components/society/create/StarterGallery.tsx@@ -1,14 +1,12 @@/**- * The starter list: a search, one chip per area with its live count, and- * dense rows (icon, name, the outcome in one line). Arrow keys move through+ * The starter list: a search, one round chip per area with its live count,+ * and plain rows (the name, the outcome in one line). Arrow keys move through* the rows; the picked row carries the selection wash.*/import { useMemo, useRef, type KeyboardEvent } from "react";-import { Loader2, Search } from "lucide-react";+import { Loader2 } from "lucide-react";import { Input } from "@/components/ui/input";import { useT } from "@/i18n";-import { cn } from "@/lib/utils";-import { AreaIcon, StarterIcon } from "./starterIcons";import { areaCounts, filterStarters, starterCopy, type AreaFilter } from "./starterFilters";import type { Starter, StarterArea } from "./startersApi";@@ -63,18 +61,16 @@ export function StarterGallery(props: Props) {return (<div className="flex min-h-0 flex-1 flex-col gap-3" data-testid="starter-gallery">- <div className="relative">- <Search className="pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-foreground-faint" aria-hidden />+ <div className="cs-search"><Inputvalue={props.query}onChange={(event) => props.onQueryChange(event.target.value)}placeholder={t("agent_create.gallery.search")}aria-label={t("agent_create.gallery.search")}- className="pl-9"data-testid="starter-search"/></div>- <div className="flex flex-wrap gap-1.5" role="group" aria-label={t("agent_create.gallery.areas")}>+ <div className="flex flex-wrap gap-1" role="group" aria-label={t("agent_create.gallery.areas")}>{chips.map((area) => {const on = props.area === area;return (@@ -84,17 +80,10 @@ export function StarterGallery(props: Props) {aria-pressed={on}onClick={() => props.onAreaChange(area)}data-testid={`starter-area-${area}`}- className={cn(- "inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs transition-colors",- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",- on- ? "border-foreground/30 bg-secondary text-foreground"- : "border-border text-muted-foreground hover:bg-secondary hover:text-foreground",- )}+ className="cs-chip">- <AreaIcon area={area} className="size-3.5" />{t(`agent_create.area.${area}`)}- <span className="tabular-nums text-foreground-faint">{counts[area] ?? 0}</span>+ <span className="cs-chip-count">{counts[area] ?? 0}</span></button>);})}@@ -108,7 +97,7 @@ export function StarterGallery(props: Props) {) : props.failed ? (<div className="flex flex-col items-start gap-2 px-2 py-6 text-sm"><p role="alert" className="text-destructive">{t("agent_create.gallery.failed")}</p>- <button type="button" onClick={props.onRetry} className="rounded-full border border-border px-2.5 py-1 text-xs hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">+ <button type="button" onClick={props.onRetry} className="cs-btn" data-variant="soft" data-size="sm">{t("agent_create.gallery.retry")}</button></div>@@ -130,21 +119,11 @@ export function StarterGallery(props: Props) {onClick={() => props.onSelect(starter)}onKeyDown={(event) => onRowKey(event, index)}data-testid={`starter-${starter.id}`}- className={cn(- "group flex w-full items-center gap-3 rounded-[10px] px-2.5 py-2 text-left transition-colors duration-150",- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",- selected ? "bg-accent-soft" : "hover:bg-secondary/70",- )}+ className="cs-row">- <span className={cn(- "flex size-8 shrink-0 items-center justify-center rounded-[8px] border transition-colors",- selected ? "border-accent/40 bg-background text-accent" : "border-border bg-secondary/60 text-foreground-secondary group-hover:text-foreground",- )}>- <StarterIcon name={starter.icon} className="size-4" />- </span><span className="min-w-0 flex-1">- <span className="block truncate text-sm font-medium text-foreground">{copy.name}</span>- <span className="block truncate text-xs text-muted-foreground">{copy.outcome}</span>+ <span className="cs-row-name">{copy.name}</span>+ <span className="cs-row-detail">{copy.outcome}</span></span></button></li>diff --git a/dodaios/ui/web/frontend/src/components/society/create/TemplatePreviewCard.tsx b/dodaios/ui/web/frontend/src/components/society/create/TemplatePreviewCard.tsxindex 2cb938d62a..86286b346e 100644--- a/dodaios/ui/web/frontend/src/components/society/create/TemplatePreviewCard.tsx+++ b/dodaios/ui/web/frontend/src/components/society/create/TemplatePreviewCard.tsx@@ -5,9 +5,12 @@* their state on THIS machine, the optional routine, and the first message* the chat will open with. One card for both paths, so a stranger's template* is read exactly as carefully as one of ours.+ *+ * Calm on purpose: label and value rows on soft cards, round ticks, plain+ * words for a tool's state, and no decorative icons.*/import { useId, useState, type ReactNode } from "react";-import { BookText, Check, ChevronDown, Clock, Repeat, ShieldCheck, Sparkles, Wrench } from "lucide-react";+import { Check, ChevronDown } from "lucide-react";import { Input } from "@/components/ui/input";import { Switch } from "@/components/ui/switch";import { fill, useT } from "@/i18n";@@ -21,7 +24,6 @@ export interface PreviewRoutine {}interface Props {- icon: ReactNode;name: string;/** The starter's or template's own name: the field starts with it, and an* emptied field falls back to it. */@@ -43,14 +45,11 @@ interface Props {note?: ReactNode;}-function Stat({ icon, label, value, testId }: { icon: ReactNode; label: string; value: string; testId: string }) {+function Stat({ label, value, testId }: { label: string; value: string; testId: string }) {return (- <div className="flex min-w-0 flex-col gap-1 rounded-[10px] border border-border bg-background/60 px-3 py-2.5" data-testid={testId}>- <span className="flex items-center gap-1.5 text-xs text-muted-foreground">- <span className="text-foreground-faint [&>svg]:size-3.5" aria-hidden>{icon}</span>- {label}- </span>- <span className="truncate text-sm font-medium text-foreground-strong">{value}</span>+ <div className="cs-row" data-testid={testId}>+ <span className="cs-row-text">{label}</span>+ <span className="cs-row-end min-w-0 truncate text-right">{value}</span></div>);}@@ -72,24 +71,19 @@ export function TemplatePreviewCard(props: Props) {const routineCount = routine ? (props.routineOn ? 1 : 0) : summary.routines;return (- <article className="flex flex-col gap-5" data-testid="template-preview">- <header className="flex items-start gap-3">- <span className="flex size-11 shrink-0 items-center justify-center rounded-[12px] border border-border bg-secondary text-foreground [&>svg]:size-5" aria-hidden>- {props.icon}- </span>- <div className="flex min-w-0 flex-1 flex-col gap-1">- <h2 className="truncate text-lg font-semibold text-foreground-strong" data-testid="template-preview-title">- {props.name.trim() || props.defaultName || t("agent_create.preview.name_label")}- </h2>- <p className="text-sm text-foreground-secondary">{props.outcome}</p>- {props.note}- </div>+ <article className="flex flex-col gap-6" data-testid="template-preview">+ <header className="flex min-w-0 flex-col gap-1">+ <h2 className="cs-title truncate text-[20px]" data-testid="template-preview-title">+ {props.name.trim() || props.defaultName || t("agent_create.preview.name_label")}+ </h2>+ <p className="cs-sub text-[14px]">{props.outcome}</p>+ {props.note}</header>- <div className="flex flex-col gap-1.5 text-sm">+ <div className="flex flex-col gap-2"><span className="flex items-baseline justify-between gap-2">- <label htmlFor={nameId} className="font-medium">{t("agent_create.preview.name_label")}</label>- <span className="text-xs text-foreground-faint">{t("agent_create.quick.optional")}</span>+ <label htmlFor={nameId} className="cs-label">{t("agent_create.preview.name_label")}</label>+ <span className="cs-hint">{t("agent_create.quick.optional")}</span></span><Inputid={nameId}@@ -103,42 +97,35 @@ export function TemplatePreviewCard(props: Props) {</div><section aria-label={t("agent_create.preview.brings")} className="flex flex-col gap-2">- <h3 className="text-xs font-medium text-muted-foreground">{t("agent_create.preview.brings")}</h3>- <div className="grid grid-cols-2 gap-2 sm:grid-cols-4">- <Stat icon={<BookText />} label={t("agent_create.preview.instructions")} value={instructionsValue} testId="preview-count-instructions" />- <Stat icon={<Sparkles />} label={t("agent_create.preview.skills")}+ <h3 className="cs-section-title">{t("agent_create.preview.brings")}</h3>+ <div className="cs-card">+ <Stat label={t("agent_create.preview.instructions")} value={instructionsValue} testId="preview-count-instructions" />+ <Stat label={t("agent_create.preview.skills")}value={summary.skills === null ? t("agent_create.preview.skills_all") : String(summary.skills)} testId="preview-count-skills" />- <Stat icon={<Repeat />} label={t("agent_create.preview.routines")} value={String(routineCount)} testId="preview-count-routines" />- <Stat icon={<Wrench />} label={t("agent_create.preview.tools")}+ <Stat label={t("agent_create.preview.routines")} value={String(routineCount)} testId="preview-count-routines" />+ <Stat label={t("agent_create.preview.tools")}value={tools.length ? fill(t("agent_create.preview.tools_value"), { picked: pickedCount, total: tools.length }) : "0"} testId="preview-count-tools" /></div>{summary.asks_before > 0 ? (- <p className="flex items-center gap-1.5 text-xs text-muted-foreground" data-testid="preview-asks-before">- <ShieldCheck className="size-3.5 text-success" aria-hidden />+ <p className="cs-hint px-1" data-testid="preview-asks-before">{fill(t(summary.asks_before === 1 ? "agent_create.preview.asks_before_one" : "agent_create.preview.asks_before_other"), { count: summary.asks_before })}</p>) : null}{summary.limited_tools ? (- <p className="text-xs text-muted-foreground">{t("agent_create.preview.limited_tools")}</p>+ <p className="cs-hint px-1">{t("agent_create.preview.limited_tools")}</p>) : null}</section>{tools.length ? (<section className="flex flex-col gap-2">- <div className="flex items-baseline justify-between gap-2">- <h3 className="text-xs font-medium text-muted-foreground">{t("agent_create.preview.tools_title")}</h3>- <span className="text-xs text-foreground-faint">{t("agent_create.preview.tools_hint")}</span>- </div>- <ul className="flex flex-col divide-y divide-border overflow-hidden rounded-[10px] border border-border">+ <h3 className="cs-section-title">{t("agent_create.preview.tools_title")}</h3>+ <ul className="cs-card">{tools.map((tool) => {const state = toolState(tool);const on = picked.has(tool.id);return (<li key={tool.id}>- <label className={cn(- "flex cursor-pointer items-center gap-3 px-3 py-2 text-sm transition-colors hover:bg-secondary/50",- props.disabled && "cursor-default opacity-60",- )}>+ <label className={cn("cs-row", props.disabled && "cursor-default opacity-60")}><inputtype="checkbox"className="peer sr-only"@@ -147,19 +134,11 @@ export function TemplatePreviewCard(props: Props) {onChange={() => props.onToggleTool(tool.id)}data-testid={`preview-tool-${tool.id}`}/>- <span className={cn(- "flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors peer-focus-visible:ring-2 peer-focus-visible:ring-ring",- on ? "border-foreground bg-foreground text-background" : "border-border-strong bg-transparent",- )} aria-hidden>- {on ? <Check className="size-3" strokeWidth={3} /> : null}+ <span className="cs-tick peer-focus-visible:ring-2 peer-focus-visible:ring-ring" data-on={on} aria-hidden>+ {on ? <Check className="size-3.5" strokeWidth={3} /> : null}</span>- <span className="min-w-0 flex-1 truncate text-foreground">{tool.label}</span>- <span className={cn(- "shrink-0 rounded-full px-2 py-0.5 text-xs",- state === "connected" && "bg-success/10 text-success",- state === "not_connected" && "bg-warning/10 text-warning",- state === "missing" && "bg-secondary text-muted-foreground",- )}>+ <span className="cs-row-text">{tool.label}</span>+ <span className="cs-row-end" data-tone={state === "not_connected" ? "warn" : undefined}>{t(`agent_create.preview.tool_${state}`)}</span></label>@@ -167,54 +146,56 @@ export function TemplatePreviewCard(props: Props) {);})}</ul>+ <p className="cs-hint px-1">{t("agent_create.preview.tools_hint")}</p></section>) : null}{routine && props.onRoutineChange ? (- <section className="flex items-start gap-3 rounded-[10px] border border-border px-3 py-3" data-testid="preview-routine">- <Clock className="mt-0.5 size-4 shrink-0 text-muted-foreground" aria-hidden />- <div className="min-w-0 flex-1">- <p className="text-sm text-foreground">{routine.title}</p>- <p className="text-xs text-muted-foreground">- {t(`agent_create.when.${routine.when}`)} · {t("agent_create.preview.routine_hint")}- </p>+ <section className="cs-card" data-testid="preview-routine">+ <div className="cs-row">+ <div className="min-w-0 flex-1">+ <p className="cs-row-text">{routine.title}</p>+ <p className="cs-hint">+ {t(`agent_create.when.${routine.when}`)} · {t("agent_create.preview.routine_hint")}+ </p>+ </div>+ <Switch+ checked={Boolean(props.routineOn)}+ onCheckedChange={props.onRoutineChange}+ disabled={props.disabled}+ aria-label={t("agent_create.preview.routine_toggle")}+ data-testid="preview-routine-toggle"+ /></div>- <Switch- checked={Boolean(props.routineOn)}- onCheckedChange={props.onRoutineChange}- disabled={props.disabled}- aria-label={t("agent_create.preview.routine_toggle")}- data-testid="preview-routine-toggle"- /></section>) : null}- <section className="flex flex-col gap-2">+ {props.firstMessage ? (+ <section className="flex flex-col gap-2">+ <h3 className="cs-section-title">{t("agent_create.preview.first_message")}</h3>+ <p className="cs-card text-[14px] leading-relaxed text-foreground" data-pad="true" data-testid="preview-first-message">+ {props.firstMessage}+ </p>+ <p className="cs-hint px-1">{t("agent_create.preview.first_message_hint")}</p>+ </section>+ ) : null}++ <section className="flex flex-col gap-2 px-1"><buttontype="button"onClick={() => setShowInstructions((value) => !value)}aria-expanded={showInstructions}- className="flex items-center gap-1.5 self-start rounded text-xs font-medium text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"+ className="cs-link">{t("agent_create.preview.read_instructions")}<ChevronDown className={cn("size-3.5 transition-transform duration-200 motion-reduce:transition-none", showInstructions && "rotate-180")} aria-hidden /></button>{showInstructions ? (- <pre className="max-h-48 overflow-y-auto whitespace-pre-wrap rounded-[10px] border border-border bg-background/60 px-3 py-2.5 font-sans text-sm text-foreground-secondary" data-testid="preview-instructions">+ <pre className="cs-card max-h-56 overflow-y-auto whitespace-pre-wrap font-sans text-[14px] leading-relaxed text-foreground-secondary" data-pad="true" data-testid="preview-instructions">{props.instructions}</pre>) : null}</section>-- {props.firstMessage ? (- <section className="flex flex-col gap-1.5">- <h3 className="text-xs font-medium text-muted-foreground">{t("agent_create.preview.first_message")}</h3>- <p className="rounded-[10px] border border-dashed border-border-strong px-3 py-2.5 text-sm text-foreground" data-testid="preview-first-message">- {props.firstMessage}- </p>- <p className="text-xs text-foreground-faint">{t("agent_create.preview.first_message_hint")}</p>- </section>- ) : null}</article>);}diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/de.json b/dodaios/ui/web/frontend/src/i18n/locales/society/de.jsonindex a26d41cd59..69c0030430 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/de.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/de.json@@ -58,6 +58,7 @@"tool_block": "Sperren","tool_on": "An","tool_first": "Zuerst nutzen",+ "tool_blocked": "Gesperrt","show_all": "Alle {0} zeigen","show_less": "Weniger zeigen","approvals": "Berechtigungen",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/en.json b/dodaios/ui/web/frontend/src/i18n/locales/society/en.jsonindex 461a61083c..4d3e3834c1 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/en.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/en.json@@ -58,6 +58,7 @@"tool_block": "Block","tool_on": "On","tool_first": "Reach first",+ "tool_blocked": "Blocked","show_all": "Show all {0}","show_less": "Show fewer","approvals": "Permissions",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/es.json b/dodaios/ui/web/frontend/src/i18n/locales/society/es.jsonindex 742d30587b..0314496aff 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/es.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/es.json@@ -58,6 +58,7 @@"tool_block": "Bloquear","tool_on": "Activada","tool_first": "Usar primero",+ "tool_blocked": "Bloqueada","show_all": "Mostrar las {0}","show_less": "Mostrar menos","approvals": "Permisos",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json b/dodaios/ui/web/frontend/src/i18n/locales/society/pt.jsonindex bb2201ec82..4997d0bb98 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json@@ -58,6 +58,7 @@"tool_block": "Bloquear","tool_on": "Ligada","tool_first": "Usar primeiro",+ "tool_blocked": "Bloqueada","show_all": "Mostrar todas as {0}","show_less": "Mostrar menos","approvals": "Permissões",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json b/dodaios/ui/web/frontend/src/i18n/locales/society/zh.jsonindex 24bc10d669..dde6d99f25 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json@@ -58,6 +58,7 @@"tool_block": "屏蔽","tool_on": "开启","tool_first": "优先使用",+ "tool_blocked": "已屏蔽","show_all": "显示全部 {0} 个","show_less": "收起","approvals": "权限",