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, simple Agent section — chat first, details on demand (#1022)
Ruben Lütke981b1024677f
diff --git a/dodaios/ui/web/frontend/src/components/agentchat/ChatCommands.tsx b/dodaios/ui/web/frontend/src/components/agentchat/ChatCommands.tsxindex 684a10234f..471fc05b53 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/ChatCommands.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/ChatCommands.tsx@@ -186,7 +186,7 @@ export function ChatCommandPanel({ control, anchorRef }: { control: ReturnType<tconst goal = control.state?.goal;return <div className="relative text-xs" data-testid="chat-commands">{control.state?.mode === "plan" ? <div className="mb-2 rounded-md border border-border bg-secondary px-3 py-2">{t("slash.plan_active")}</div> : null}- {control.state?.mode === "build" ? <div className="mb-2 px-1 text-muted-foreground">{t("slash.build_active")}</div> : null}+ {/* Build is the ordinary mode: only Plan, the exception, gets a banner. */}{goal && goal.status !== "cleared" ? <div className="mb-2 rounded-lg border border-border bg-card p-3" data-testid="chat-goal"><div className="flex items-center gap-2"><span className="font-medium">{t(`slash.goal_${goal.status}`)}</span><span className="ml-auto text-muted-foreground">{goal.steps} {t("slash.steps")}</span>@@ -214,7 +214,7 @@ export function ChatCommandPanel({ control, anchorRef }: { control: ReturnType<tonMouseEnter={() => control.setActiveIndex(index)} onMouseDown={(e) => e.preventDefault()} onClick={() => control.select(row)}className={cn("block w-full rounded-lg px-3 py-2 text-left", index === control.activeIndex && "bg-secondary", !row.available && "opacity-50")}><span className="font-medium">/{row.name}</span><span className="ml-3 text-muted-foreground">{t(`slash.commands.${row.name}`)}</span>- <span className="mt-0.5 block text-[11px] text-muted-foreground">{row.available ? row.example : row.reason}</span>+ <span className="mt-0.5 block text-xs text-muted-foreground">{row.available ? row.example : row.reason}</span></button>)}</div>, anchorRef.current?.closest<HTMLElement>('[role="dialog"]') ?? document.body) : null}</div>;diff --git a/dodaios/ui/web/frontend/src/components/agentchat/InternalMessageBubble.tsx b/dodaios/ui/web/frontend/src/components/agentchat/InternalMessageBubble.tsxindex 34c9bba0b5..a9be384cbe 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/InternalMessageBubble.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/InternalMessageBubble.tsx@@ -149,13 +149,13 @@ export function InternalMessageBubble({<span className="ml-auto flex shrink-0 items-center gap-1.5"><spanclassName={cn(- "hidden rounded-full border border-border px-1.5 py-px text-[10px] sm:inline",+ "hidden rounded-full border border-border px-1.5 py-px text-xs sm:inline","text-muted-foreground",)}>{t("agent_chat.internal_message")}</span>- <span className={cn("flex items-center gap-1 text-[11px]", statusTone)} aria-live="polite">+ <span className={cn("flex items-center gap-1 text-xs", statusTone)} aria-live="polite"><spanaria-hiddenclassName={cn(diff --git a/dodaios/ui/web/frontend/src/components/agentchat/WorkTrace.tsx b/dodaios/ui/web/frontend/src/components/agentchat/WorkTrace.tsxindex 5db7ae264a..d08c335bf8 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/WorkTrace.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/WorkTrace.tsx@@ -335,7 +335,7 @@ function ToolDetails({ block }: { block: ToolBlock }) {{memoryFile && file.path === memoryFile.path ? <buttontype="button"onClick={() => setMemoryOpen(true)}- className="shrink-0 rounded-md border border-border px-2 py-0.5 text-[11px] text-foreground hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"+ className="shrink-0 rounded-md border border-border px-2 py-0.5 text-xs text-foreground hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">{t("society.chat.memory_open_file")}</button> : null}</div>{file.lines.map((line, n) => <div key={n} className={cn("whitespace-pre-wrap [overflow-wrap:anywhere]", line.kind === "add" && "diff-line-add", line.kind === "del" && "diff-line-del")}>@@ -347,7 +347,7 @@ function ToolDetails({ block }: { block: ToolBlock }) {{memoryFile && !diff ? <buttontype="button"onClick={() => setMemoryOpen(true)}- className="rounded-md border border-border px-2 py-1 text-[11px] text-foreground hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"+ className="rounded-md border border-border px-2 py-1 text-xs text-foreground hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">{t("society.chat.memory_open_file")}: {memoryFile.path}</button> : null}{block.output !== null ? <Detail label={t(block.isError ? "work_trace.error" : "work_trace.output")} text={block.output || t("work_trace.empty_output")} /> : null}{memoryOpen && memoryFile ? <MemoryFileDialog path={memoryFile.path} before={memoryFile.before} after={memoryFile.after} onClose={() => setMemoryOpen(false)} /> : null}diff --git a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.tsx b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.tsxindex ccd3301a42..de9dccae27 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.tsx@@ -309,7 +309,7 @@ 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-[11px] text-destructive">{error}</span> : null,+ </span> : error ? <span role="alert" className="text-xs 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}diff --git a/dodaios/ui/web/frontend/src/components/society/CapabilityChip.tsx b/dodaios/ui/web/frontend/src/components/society/CapabilityChip.tsxindex f289555e5b..7579beaa2e 100644--- a/dodaios/ui/web/frontend/src/components/society/CapabilityChip.tsx+++ b/dodaios/ui/web/frontend/src/components/society/CapabilityChip.tsx@@ -72,12 +72,12 @@ export function CapabilityChip({{brand.logoUrl ? (<img src={brand.logoUrl} alt="" className="h-full w-full object-contain p-[2px]" draggable={false} />) : (- <span className="font-mono text-xs font-semibold uppercase text-muted-foreground">{brand.monogram}</span>+ <span className="font-mono text-xs font-medium text-muted-foreground">{brand.monogram}</span>)}</span><span className="truncate">{label}</span>{kind && kind !== "plugin" ? (- <span className="shrink-0 rounded-sm bg-secondary px-1 font-mono text-xs uppercase text-muted-foreground">+ <span className="shrink-0 rounded-sm bg-secondary px-1 font-mono text-xs font-medium text-muted-foreground">{kind}</span>) : null}diff --git a/dodaios/ui/web/frontend/src/components/society/agentSection.css b/dodaios/ui/web/frontend/src/components/society/agentSection.cssindex e1d72048e6..7fbc60ffbd 100644--- a/dodaios/ui/web/frontend/src/components/society/agentSection.css+++ b/dodaios/ui/web/frontend/src/components/society/agentSection.css@@ -10,6 +10,10 @@** Tokens are scoped to `.agent-section` so nothing leaks into the rest of the* app. Dark is the product default; light uses the same rules.+ *+ * The section is deliberately quiet: round buttons and pills, soft rounded+ * rows instead of boxes and rules, 14px primary and 13px secondary text+ * (nothing below 12px), and icons only where a word would be worse.*/.agent-section {@@ -198,95 +202,251 @@outline: none;}-/* --- the chat header ------------------------------------------------------ */+/* --- round buttons ---------------------------------------------------------- */-.as-header {- display: flex;- height: 52px;+/* Every icon button in the section is a circle on a soft lift: search, "+",+ send, mic, the row's "…". Pressing it dips a little. */+.as-round-button {+ display: inline-flex;+ height: 34px;+ width: 34px;flex-shrink: 0;align-items: center;- gap: 10px;- padding: 0 10px 0 14px;- border-bottom: 1px solid hsl(var(--border));- background: hsl(var(--background));- container: as-header / inline-size;+ justify-content: center;+ border-radius: 999px;+ background: hsl(var(--secondary));+ color: hsl(var(--muted-foreground));+ /* A hairline keeps the circle visible where the lift and the rail are close (light). */+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.5);+ transition:+ background-color var(--as-dur-2) var(--as-ease),+ color var(--as-dur-2) var(--as-ease),+ opacity var(--as-dur-2) var(--as-ease),+ transform var(--as-dur-1) var(--as-ease);}-/* Control labels show once the header has room; the icon stays either way. */-.as-header-label {- display: none;+.as-round-button[data-size="sm"] {+ height: 28px;+ width: 28px;+ background: transparent;+ box-shadow: none;}-@container as-header (min-width: 600px) {- .as-header-label {- display: inline;- }+.as-round-button:hover:not(:disabled),+.as-round-button[aria-expanded="true"],+.as-round-button[aria-pressed="true"] {+ background: hsl(var(--border));+ color: hsl(var(--foreground));+}++.as-round-button:active:not(:disabled) {+ transform: scale(0.93);+}++.as-round-button:focus-visible {+ outline: none;+ box-shadow: 0 0 0 2px hsl(var(--ring));+}++.as-round-button:disabled {+ opacity: 0.4;+}++.as-round-button[data-tone="ink"] {+ background: hsl(var(--foreground));+ color: hsl(var(--background));+}++.as-round-button[data-tone="send"] {+ background: hsl(var(--chat-send-background));+ color: hsl(var(--chat-send-foreground));+ box-shadow: var(--as-shadow-control);}-.as-header-control {+.as-round-button[data-tone="send"]:disabled {+ opacity: 1;+}++.as-round-button[data-tone="send"]:disabled svg {+ opacity: 0.4;+}++/* A text button, fully round. */+.as-pill-button {display: inline-flex;- height: 30px;- min-width: 0;+ height: 34px;align-items: center;+ justify-content: center;gap: 6px;- border-radius: var(--as-radius-xs);- padding: 0 8px;- font-size: 12px;- color: hsl(var(--muted-foreground));+ border-radius: 999px;+ padding: 0 16px;+ font-size: 13px;+ font-weight: 500;+ background: hsl(var(--secondary));+ color: hsl(var(--foreground));transition:background-color var(--as-dur-2) var(--as-ease),- color var(--as-dur-2) var(--as-ease);+ transform var(--as-dur-1) var(--as-ease);+}++.as-pill-button:hover:not(:disabled) {+ background: hsl(var(--border));+}++.as-pill-button:active:not(:disabled) {+ transform: scale(0.97);+}++.as-pill-button:focus-visible {+ outline: none;+ box-shadow: 0 0 0 2px hsl(var(--ring));+}++.as-pill-button[data-tone="ink"] {+ background: hsl(var(--primary));+ color: hsl(var(--primary-foreground));+}++.as-pill-button[data-tone="ink"]:hover:not(:disabled) {+ opacity: 0.9;}-.as-header-control:hover:not(:disabled),-.as-header-control[aria-expanded="true"],-.as-header-control[aria-pressed="true"] {+.as-quiet-link {+ border-radius: 999px;+ padding: 4px 12px;+ font-size: 13px;+ color: hsl(var(--muted-foreground));+ transition: background-color var(--as-dur-2) var(--as-ease), color var(--as-dur-2) var(--as-ease);+}++.as-quiet-link:hover {background: hsl(var(--secondary));color: hsl(var(--foreground));}-.as-header-control:focus-visible {+/* --- the chat header ------------------------------------------------------ */++/* Nearly nothing: the agent's face and name as one small pill in the middle. */+.as-header {+ display: flex;+ height: 56px;+ flex-shrink: 0;+ align-items: center;+ justify-content: center;+ padding: 0 16px;+ background: transparent;+}++.as-name-pill {+ display: inline-flex;+ min-width: 0;+ max-width: min(100%, 480px);+ height: 38px;+ align-items: center;+ gap: 8px;+ border-radius: 999px;+ padding: 0 14px 0 7px;+ background: hsl(var(--secondary) / 0.7);+ color: hsl(var(--foreground));+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.6);+ transition:+ background-color var(--as-dur-2) var(--as-ease),+ transform var(--as-dur-1) var(--as-ease);+}++button.as-name-pill:hover,+button.as-name-pill[aria-expanded="true"] {+ background: hsl(var(--secondary));+}++button.as-name-pill:active {+ transform: scale(0.98);+}++button.as-name-pill:focus-visible {outline: none;box-shadow: 0 0 0 2px hsl(var(--ring));}-.as-header-control:disabled {- opacity: 0.5;+.as-name-pill .as-status {+ background: hsl(var(--secondary));}-/* The brain picker keeps its own trigger; the header only frames it. */-.as-header-slot {- display: flex;+.as-pill-name {min-width: 0;max-width: 260px;- height: 30px;- align-items: center;+ flex-shrink: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ font-size: 14px;+ font-weight: 600;+ color: hsl(var(--foreground-strong));+}++.as-pill-status {+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ font-size: 13px;+ color: hsl(var(--muted-foreground));}/* --- menus and popovers ---------------------------------------------------- */.as-menu {border: 1px solid hsl(var(--border));- border-radius: var(--as-radius-md);+ border-radius: var(--as-radius-lg);background: hsl(var(--popover));color: hsl(var(--popover-foreground));box-shadow: var(--as-shadow-pop), var(--as-sheen-edge);- padding: 4px;+ padding: 6px;transform-origin: top;animation: as-pop-in var(--as-dur-2) var(--as-ease-out);}+/* A plain text row in a menu; an optional value sits muted on the right. */+.as-menu-row {+ display: flex;+ width: 100%;+ min-height: 36px;+ align-items: center;+ gap: 12px;+ border-radius: var(--as-radius-md);+ padding: 7px 12px;+ text-align: left;+ font-size: 14px;+ color: hsl(var(--foreground));+ transition: background-color var(--as-dur-1) var(--as-ease);+}++.as-menu-row:hover:not(:disabled),+.as-menu-row:focus-visible {+ background: hsl(var(--secondary));+ outline: none;+}++.as-menu-row-value {+ max-width: 55%;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ font-size: 13px;+ color: hsl(var(--muted-foreground));+}+.as-menu-item {display: flex;width: 100%;- min-height: 30px;+ min-height: 36px;align-items: flex-start;gap: 10px;- border-radius: 8px;- padding: 7px 10px;+ border-radius: var(--as-radius-md);+ padding: 8px 12px;text-align: left;- font-size: 13px;- line-height: 18px;+ font-size: 14px;+ line-height: 20px;}.as-menu-item:hover:not(:disabled),@@ -303,7 +463,7 @@@keyframes as-pop-in {from {opacity: 0;- transform: translateY(-4px) scale(0.99);+ transform: translateY(-4px) scale(0.98);}}@@ -342,45 +502,168 @@}}+/* --- segmented words (the lead's Voice | Chat) ------------------------------ */++.as-seg-pills {+ display: inline-flex;+ gap: 2px;+ border-radius: 999px;+ padding: 3px;+ background: hsl(var(--secondary));+}++.as-seg-pill {+ display: inline-flex;+ height: 28px;+ align-items: center;+ border-radius: 999px;+ padding: 0 14px;+ font-size: 13px;+ font-weight: 500;+ color: hsl(var(--muted-foreground));+ transition:+ background-color var(--as-dur-2) var(--as-ease),+ color var(--as-dur-2) var(--as-ease);+}++.as-seg-pill:hover {+ color: hsl(var(--foreground));+}++.as-seg-pill[aria-selected="true"],+.as-seg-pill-on {+ background: hsl(var(--background));+ color: hsl(var(--foreground-strong));+ box-shadow: var(--as-shadow-control);+}++.as-seg-pill:focus-visible {+ outline: none;+ box-shadow: 0 0 0 2px hsl(var(--ring));+}++/* --- the composer ------------------------------------------------------------ */++/* One rounded pill: "+", the field, mic and send. */+.as-composer {+ min-height: 52px;+ border-radius: 26px;+ padding: 8px;+ background: hsl(var(--card));+ box-shadow: inset 0 0 0 1px hsl(var(--border)), var(--as-shadow-card);+ transition: box-shadow var(--as-dur-2) var(--as-ease);+}++.as-composer:focus-within {+ box-shadow: inset 0 0 0 1px hsl(var(--border-strong)), var(--as-shadow-card);+}+/* --- roster ---------------------------------------------------------------- */.as-roster {background: hsl(var(--sidebar));}+.as-roster-top {+ display: flex;+ height: 58px;+ flex-shrink: 0;+ align-items: center;+ justify-content: flex-end;+ gap: 8px;+ padding: 0 14px;+}++.as-search {+ height: 38px;+ width: 100%;+ border-radius: 999px;+ border: 0;+ padding: 0 16px;+ font-size: 14px;+ background: hsl(var(--secondary));+ color: hsl(var(--foreground));+ animation: as-pop-in var(--as-dur-2) var(--as-ease-out);+}++.as-search::placeholder {+ color: hsl(var(--muted-foreground));+}++.as-search:focus-visible {+ outline: none;+ box-shadow: 0 0 0 2px hsl(var(--ring) / 0.5);+}++/* The lead, large and centred above the list. */+.as-hero {+ display: flex;+ min-width: 0;+ max-width: 100%;+ flex-direction: column;+ align-items: center;+ gap: 8px;+ border-radius: var(--as-radius-2xl);+ padding: 12px 28px 10px;+ transition:+ background-color var(--as-dur-2) var(--as-ease),+ transform var(--as-dur-1) var(--as-ease);+}++.as-hero:hover {+ background: hsl(var(--secondary) / 0.6);+}++.as-hero:active {+ transform: scale(0.98);+}++.as-hero[data-active="true"] {+ background: hsl(var(--secondary));+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.6);+}++.as-hero:focus-visible {+ outline: none;+ box-shadow: 0 0 0 2px hsl(var(--ring));+}++.as-hero .as-status {+ right: 1px;+ bottom: 1px;+}++.as-hero-name {+ max-width: 100%;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ font-size: 14px;+ font-weight: 600;+ color: hsl(var(--foreground-strong));+}+.as-row {position: relative;display: flex;- height: 54px;+ height: 60px;width: 100%;align-items: center;- gap: 8px;- border-radius: var(--as-radius-sm);- padding: 0 8px;+ gap: 12px;+ border-radius: var(--as-radius-lg);+ padding: 0 10px;text-align: left;transition: background-color var(--as-dur-2) var(--as-ease);}.as-row:hover {- background: hsl(var(--secondary));+ background: hsl(var(--secondary) / 0.6);}.as-row[data-active="true"] {- background: var(--as-tint-wash);-}--/* A short tint bar marks the open agent, so selection never relies on colour- of the whole row alone. */-.as-row[data-active="true"]::before {- content: "";- position: absolute;- left: 0;- top: 50%;- height: 20px;- width: 3px;- margin-top: -10px;- border-radius: 0 3px 3px 0;- background: var(--as-tint);+ background: hsl(var(--secondary));+ /* In light the lift and the rail are close: a hairline keeps the selection readable. */+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.6);}.as-row[data-dragging="true"] {@@ -401,28 +684,20 @@overflow: hidden;text-overflow: ellipsis;white-space: nowrap;- font-size: 13px;- line-height: 18px;+ font-size: 14px;+ line-height: 19px;font-weight: 500;color: hsl(var(--foreground));}-.as-row-time {- flex-shrink: 0;- font-size: 11px;- line-height: 16px;- font-variant-numeric: tabular-nums;- color: hsl(var(--muted-foreground));-}-.as-row-preview {display: block;min-width: 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;- font-size: 12px;- line-height: 17px;+ font-size: 13px;+ line-height: 18px;color: hsl(var(--muted-foreground));}@@ -443,15 +718,15 @@.as-drop-line {pointer-events: none;position: absolute;- left: 8px;- right: 8px;+ left: 10px;+ right: 10px;z-index: 10;height: 2px;border-radius: 999px;background: hsl(var(--accent));}-/* --- the avatar and its corner status ------------------------------------- */+/* --- the avatar and its corner mark ---------------------------------------- */.as-avatar {position: relative;@@ -459,22 +734,29 @@flex-shrink: 0;}+/* A mark only when it says something: working, unread, waiting on the+ person. An idle agent's face stays clean; a paused one fades a little. */.as-status {position: absolute;right: -1px;bottom: -1px;display: grid;place-items: center;- width: 12px;- height: 12px;+ width: 13px;+ height: 13px;border-radius: 999px;background: hsl(var(--sidebar));}+.as-status[data-status="idle"],+.as-status[data-status="paused"] {+ opacity: 0;+}+.as-status::after {content: "";- width: 8px;- height: 8px;+ width: 9px;+ height: 9px;border-radius: 999px;background: hsl(var(--muted-foreground));}@@ -488,21 +770,17 @@background: hsl(var(--accent));}-.as-status[data-status="paused"]::after {- background: hsl(var(--border-strong));-}-/* Needs you: a ring, larger than a dot, so it reads before colour does. */.as-status[data-status="needs-you"] {- width: 15px;- height: 15px;+ width: 16px;+ height: 16px;right: -3px;bottom: -3px;}.as-status[data-status="needs-you"]::after {- width: 11px;- height: 11px;+ width: 12px;+ height: 12px;background: hsl(var(--sidebar));box-shadow: inset 0 0 0 3px hsl(var(--warning));}@@ -519,33 +797,16 @@}}-/* The unread marker at the end of a row. */-.as-unread-badge {- display: inline-flex;- height: 16px;- min-width: 16px;- flex-shrink: 0;- align-items: center;- justify-content: center;- border-radius: 999px;- padding: 0 5px;- font-size: 10px;- font-weight: 600;- line-height: 1;- background: hsl(var(--accent));- color: hsl(var(--accent-foreground));-}-.as-shortcut-badge {position: absolute;left: -4px;top: -4px;display: grid;place-items: center;- width: 16px;- height: 16px;- border-radius: 5px;- font-size: 10px;+ width: 18px;+ height: 18px;+ border-radius: 999px;+ font-size: 12px;font-weight: 600;background: hsl(var(--foreground));color: hsl(var(--background));@@ -566,19 +827,19 @@min-width: 0;flex-direction: column;align-items: center;- gap: 4px;- border-radius: var(--as-radius-sm);- padding: 8px 2px 6px;+ gap: 6px;+ border-radius: var(--as-radius-lg);+ padding: 10px 2px 8px;transition: background-color var(--as-dur-2) var(--as-ease);animation: as-pin-in var(--as-dur-3) var(--as-spring);}.as-pin:hover {- background: hsl(var(--secondary));+ background: hsl(var(--secondary) / 0.6);}.as-pin[data-active="true"] {- background: var(--as-tint-wash);+ background: hsl(var(--secondary));}.as-pin-name {@@ -586,8 +847,8 @@overflow: hidden;text-overflow: ellipsis;white-space: nowrap;- font-size: 11px;- line-height: 14px;+ font-size: 12px;+ line-height: 16px;color: hsl(var(--muted-foreground));}@@ -602,134 +863,6 @@}}-/* --- section headings, filter and search ---------------------------------- */--.as-section-head {- display: flex;- height: 28px;- align-items: center;- gap: 6px;- padding: 0 10px;- font-size: 11px;- font-weight: 500;- letter-spacing: 0.02em;- color: hsl(var(--muted-foreground));-}--.as-section-count {- font-variant-numeric: tabular-nums;- color: hsl(var(--faint-foreground));-}--.as-seg {- display: flex;- gap: 2px;- border-radius: 8px;- padding: 2px;- background: hsl(var(--secondary));-}--.as-seg-item {- display: inline-flex;- min-width: 0;- flex: 1;- height: 24px;- align-items: center;- justify-content: center;- gap: 4px;- border-radius: 6px;- padding: 0 6px;- font-size: 12px;- color: hsl(var(--muted-foreground));- white-space: nowrap;- transition:- background-color var(--as-dur-2) var(--as-ease),- color var(--as-dur-2) var(--as-ease);-}--.as-seg-item:hover {- color: hsl(var(--foreground));-}--.as-seg-item[aria-pressed="true"],-.as-seg-item[aria-selected="true"] {- background: hsl(var(--background));- color: hsl(var(--foreground-strong));- box-shadow: var(--as-shadow-control);-}--.as-seg-item:focus-visible {- outline: none;- box-shadow: 0 0 0 2px hsl(var(--ring));-}--.as-seg-count {- font-size: 10px;- font-variant-numeric: tabular-nums;- color: hsl(var(--warning));-}--/* The primary action wears ink, not a hue. */-.as-ink-button {- display: inline-flex;- height: 28px;- align-items: center;- gap: 5px;- border-radius: 8px;- padding: 0 10px;- font-size: 12px;- font-weight: 500;- background: hsl(var(--primary));- color: hsl(var(--primary-foreground));- box-shadow: var(--as-shadow-control);- transition:- opacity var(--as-dur-2) var(--as-ease),- transform var(--as-dur-1) var(--as-ease);-}--.as-ink-button:hover {- opacity: 0.9;-}--.as-ink-button:active {- transform: scale(0.98);-}--.as-ink-button:focus-visible {- outline: none;- box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));-}--.as-ghost-button {- display: inline-flex;- height: 28px;- min-width: 28px;- align-items: center;- justify-content: center;- gap: 5px;- border-radius: 8px;- padding: 0 8px;- font-size: 12px;- color: hsl(var(--muted-foreground));- transition:- background-color var(--as-dur-2) var(--as-ease),- color var(--as-dur-2) var(--as-ease);-}--.as-ghost-button:hover:not(:disabled) {- background: hsl(var(--secondary));- color: hsl(var(--foreground));-}--.as-ghost-button:focus-visible {- outline: none;- box-shadow: 0 0 0 2px hsl(var(--ring));-}--.as-ghost-button:disabled {- opacity: 0.45;-}-/* --- hover card ------------------------------------------------------------ */.as-hovercard {@@ -737,7 +870,7 @@z-index: 90;width: 280px;border: 1px solid hsl(var(--border));- border-radius: var(--as-radius-md);+ border-radius: var(--as-radius-lg);background: hsl(var(--popover));color: hsl(var(--popover-foreground));box-shadow: var(--as-shadow-pop), var(--as-sheen-edge);@@ -756,9 +889,17 @@display: flex;flex-direction: column;align-items: flex-start;- gap: 10px;- padding: 14px 12px;- font-size: 12px;- line-height: 18px;+ gap: 12px;+ padding: 16px 12px;+ font-size: 13px;+ line-height: 19px;color: hsl(var(--muted-foreground));}++@media (prefers-reduced-motion: reduce) {+ .as-search,+ .as-menu,+ .as-pin {+ animation: none;+ }+}diff --git a/dodaios/ui/web/frontend/src/components/society/attention/AttentionInbox.tsx b/dodaios/ui/web/frontend/src/components/society/attention/AttentionInbox.tsxindex e169c4d8f4..bfb77334df 100644--- a/dodaios/ui/web/frontend/src/components/society/attention/AttentionInbox.tsx+++ b/dodaios/ui/web/frontend/src/components/society/attention/AttentionInbox.tsx@@ -178,7 +178,7 @@ function AgentGroupRow({ group, agent, now, onOpened }: {{fill(t("agent_attention.waiting_count"), { count: group.items.length })}</span><span className="flex-1" />- {muted && <span className="text-[11px] text-muted-foreground">{t("agent_attention.muted")}</span>}+ {muted && <span className="text-xs text-muted-foreground">{t("agent_attention.muted")}</span>}<buttontype="button"onClick={() => toggleAgentMuted(group.agentId)}@@ -329,7 +329,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-[10px] text-muted-foreground">{LETTERS[action.index]}</span>+ <span aria-hidden className="font-mono text-xs text-muted-foreground">{LETTERS[action.index]}</span><span className="truncate">{label}</span></button>);@@ -395,7 +395,7 @@ function SettingRow({ id, label, hint, checked, disabled = false, onChange }: {<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-[11px] leading-relaxed text-muted-foreground">{hint}</p>+ <p id={`${id}-hint`} className="m-0 mt-0.5 text-xs 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/browser/BrowserProfilesButton.tsx b/dodaios/ui/web/frontend/src/components/society/browser/BrowserProfilesButton.tsxindex 4a56e39cfc..0fb93be156 100644--- a/dodaios/ui/web/frontend/src/components/society/browser/BrowserProfilesButton.tsx+++ b/dodaios/ui/web/frontend/src/components/society/browser/BrowserProfilesButton.tsx@@ -24,8 +24,7 @@ export function BrowserProfilesButton({ agentId, className, connectChrome = falsdata-testid="browser-profiles-button" className={cn(CAPTION_ICON_BUTTON, className)}><Globe aria-hidden className={CAPTION_ICON_CLASS} strokeWidth={CAPTION_ICON_STROKE} /></button> : <button type="button" onClick={() => setOpen(true)}- className={cn("inline-flex items-center justify-center gap-1.5 rounded-md border border-border bg-background px-2 py-1 text-xs text-foreground hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", className)}>- <Globe size={13} aria-hidden="true" />+ className={cn("inline-flex items-center justify-center rounded-full bg-secondary px-3.5 py-1.5 text-[13px] text-foreground transition-colors duration-150 hover:bg-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", className)}>{label}</button>}{open && <Suspense fallback={<span role="status" className="text-xs text-muted-foreground">{t("society.browser_profiles.loading")}</span>}>diff --git a/dodaios/ui/web/frontend/src/components/society/browser/BrowserProfilesDialog.tsx b/dodaios/ui/web/frontend/src/components/society/browser/BrowserProfilesDialog.tsxindex 0f5b1ffece..20f3d64c88 100644--- a/dodaios/ui/web/frontend/src/components/society/browser/BrowserProfilesDialog.tsx+++ b/dodaios/ui/web/frontend/src/components/society/browser/BrowserProfilesDialog.tsx@@ -259,7 +259,7 @@ function ProfileCard({ profile, data, open, onToggle, onSaved, onRemoved }: {const t = useT();const panel = useId();const badge = (text: ReactNode, tone = "bg-secondary text-muted-foreground") =>- <span className={cn("rounded-full px-2 py-0.5 text-[11px] font-medium", tone)}>{text}</span>;+ <span className={cn("rounded-full px-2 py-0.5 text-xs font-medium", tone)}>{text}</span>;return <article className="rounded-xl border border-border bg-background" data-testid={`browser-profile-${profile.id}`}><button type="button" className="flex w-full items-start gap-3 rounded-xl p-4 text-left hover:bg-secondary/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"aria-expanded={open} aria-controls={panel} onClick={onToggle}>diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentBrowserPreview.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentBrowserPreview.tsxindex 0d6fc71056..bfff5850f9 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentBrowserPreview.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentBrowserPreview.tsx@@ -97,7 +97,7 @@ export function AgentBrowserPreview({ agent }: { agent: SocietyAgent }) {<div data-testid="agent-browser-preview" className={cn("shrink-0", expanded && "fixed inset-4 z-[60] flex flex-col rounded-xl border border-border bg-background p-3 shadow-xl",)}>- <div className="mb-1 flex items-center justify-between gap-1 text-[10px] text-muted-foreground">+ <div className="mb-1 flex items-center justify-between gap-1 text-[12px] text-muted-foreground"><div className="min-w-0"><div className="truncate">{displayName}{running.data?.profileName ? ` · ${running.data.profileName}` : ""} · {status}</div></div>diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentCardOverlay.test.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentCardOverlay.test.tsxindex 762bcbfd1a..c5a0d5efd9 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentCardOverlay.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentCardOverlay.test.tsx@@ -1,7 +1,7 @@/*** The workspace wires the frame together: roster, header and chat in one- * grid, the brain picker handed from the composer to the header, and the- * keyboard shortcuts live only while the section is on screen.+ * grid, a model save in the details pane held against the composer's Send,+ * and the keyboard shortcuts live only while the section is on screen.*/import { cleanup, fireEvent, render, screen } from "@testing-library/react";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";@@ -12,7 +12,11 @@ import { useHeaderModelSlot } from "./headerModelSlot";import { AgentCardOverlay } from "./AgentCardOverlay";vi.mock("@/i18n", () => ({ useT: () => (key: string) => key, useLocaleChunk: () => true, useUiLanguage: () => "en" }));-vi.mock("./OptionsRail", () => ({ OptionsRail: ({ agent }: { agent: SocietyAgent }) => <aside aria-label="Details">{agent.name}</aside> }));+vi.mock("./OptionsRail", () => ({+ OptionsRail: ({ agent, onModelSavingChange }: { agent: SocietyAgent; onModelSavingChange?: (saving: boolean) => void }) => (+ <aside aria-label="Details">{agent.name}<button type="button" onClick={() => onModelSavingChange?.(true)}>save model</button></aside>+ ),+}));vi.mock("../chat/AgentModelPicker", () => ({ AgentModelPicker: () => <button type="button">brain</button> }));const renders = vi.hoisted(() => ({ chat: 0 }));vi.mock("../chat/AgentChatPanel", async () => {@@ -21,7 +25,7 @@ vi.mock("../chat/AgentChatPanel", async () => {function ChatProbe({ agent }: { agent: SocietyAgent }) {renders.chat += 1;const slot = useHeaderModelSlot();- return <div data-testid="chat-probe" data-header-picker={slot ? "yes" : "no"}>{agent.name}</div>;+ return <div data-testid="chat-probe" data-saving={slot?.saving ? "yes" : "no"}>{agent.name}</div>;}return { AgentChatPanel: ChatProbe, useSocietyChatStore: store };});@@ -61,22 +65,24 @@ describe("AgentCardOverlay", () => {mount();expect(screen.getByTestId("society-roster-rail")).toBeTruthy();expect(screen.getByTestId("agent-header-name").textContent).toBe("Alpha");- expect(screen.getByRole("complementary", { name: "Details" }).textContent).toBe("Alpha");+ // The details pane is mounted but closed: the section opens on a plain chat.+ expect(screen.getByRole("complementary", { name: "Details", hidden: true }).textContent).toContain("Alpha");+ expect(screen.getByTestId("shell-details").hidden).toBe(true);expect(renders.chat).toBeLessThan(5);});- it("moves the brain picker into the header for a specialist", () => {+ it("keeps the header free of pickers and holds Send while the details pane saves a model", () => {mount();- expect(screen.getByTestId("chat-probe").dataset.headerPicker).toBe("yes");- expect(screen.getByRole("button", { name: "brain" })).toBeTruthy();+ expect(screen.queryByRole("button", { name: "brain" })).toBeNull();+ expect(screen.getByTestId("chat-probe").dataset.saving).toBe("no");+ fireEvent.click(screen.getByRole("button", { name: "save model", hidden: true }));+ expect(screen.getByTestId("chat-probe").dataset.saving).toBe("yes");});- it("leaves the lead's chat its own model controls", () => {- const roster = [agent({ agentId: "lead", name: "Lead", tier: "lead" })];- vi.stubGlobal("fetch", vi.fn(async () => ({ ok: true, status: 200, json: async () => ({}) })));- const client = new QueryClient();- render(<QueryClientProvider client={client}><AgentCardOverlay embedded agent={roster[0]} roster={roster} onClose={() => undefined} /></QueryClientProvider>);- expect(screen.getByTestId("chat-probe").dataset.headerPicker).toBe("no");+ it("opens the details pane from the name pill", () => {+ mount();+ fireEvent.click(screen.getByTestId("shell-details-toggle"));+ expect(screen.getByTestId("shell-details").hidden).toBe(false);});it("steps to the next agent with Alt + Arrow Down only while active", () => {diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentCardOverlay.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentCardOverlay.tsxindex 7ef158a112..c52aec0b1b 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentCardOverlay.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentCardOverlay.tsx@@ -112,13 +112,11 @@ export function AgentCardOverlay({keyboard={active}/>)}- header={(detailsToggle) => (- <AgentHeader agent={agent} sample={sample} detailsToggle={detailsToggle} onModelSavingChange={setModelSaving} />- )}- options={<OptionsRail agent={agent} onRetired={onClose} sample={sample} />}+ header={(details) => <AgentHeader agent={agent} details={details} />}+ options={<OptionsRail agent={agent} onRetired={onClose} sample={sample} onModelSavingChange={setModelSaving} />}><section className="flex min-h-0 min-w-0 flex-1 flex-col" aria-label={t("society.card.chat")} data-testid="agent-card-chat">- <HeaderModelSlotContext.Provider value={agent.tier === "lead" ? null : { saving: modelSaving }}>+ <HeaderModelSlotContext.Provider value={{ saving: modelSaving }}><AgentChatPanel key={agent.agentId} agent={agent} roster={roster} /></HeaderModelSlotContext.Provider></section>diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentChatLayout.test.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentChatLayout.test.tsxindex b713836f84..cbba954cd4 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentChatLayout.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentChatLayout.test.tsx@@ -1,12 +1,12 @@import { act, cleanup, fireEvent, render, screen } from "@testing-library/react";import { afterEach, describe, expect, it, vi } from "vitest";-import { AgentChatLayout } from "./AgentChatLayout";+import { AgentChatLayout, useDetailsPane } from "./AgentChatLayout";import { CHAT_MIN, ROSTER_DEFAULT, ROSTER_RAIL } from "./shellLayout";vi.mock("@/i18n", () => ({ useT: () => (key: string) => key, useLocaleChunk: () => true }));-const STORE = "society.shell.layout.v1";+const STORE = "society.shell.layout.v2";afterEach(() => {cleanup();@@ -22,6 +22,12 @@ function frameWidth(width: number) {});}+/** The pane's own close button, as the details pane renders it. */+function PaneProbe() {+ const pane = useDetailsPane();+ return <aside aria-label="Details">details<button type="button" onClick={pane?.close}>close pane</button></aside>;+}+function mount() {const rosterState: { collapsed?: boolean; toggle?: () => void } = {};render(@@ -32,8 +38,14 @@ function mount() {rosterState.toggle = onToggleCollapsed;return <nav aria-label="Roster" data-collapsed={String(collapsed)}>roster</nav>;}}- header={(toggle) => <header aria-label="Chat header">{toggle}</header>}- options={<aside aria-label="Details">details</aside>}+ header={(details) => (+ <header aria-label="Chat header">+ <button ref={details.ref} type="button" onClick={details.toggle} aria-expanded={details.open} aria-controls={details.controlsId}>+ Name pill+ </button>+ </header>+ )}+ options={<PaneProbe />}><textarea aria-label="Draft" /></AgentChatLayout>,@@ -41,30 +53,40 @@ function mount() {return rosterState;}+const pill = () => screen.getByRole("button", { name: "Name pill" });+describe("AgentChatLayout", () => {- it("lays out roster | chat | details and puts the details toggle into the header", () => {+ it("opens on a plain chat: the details pane is closed until the name pill opens it", () => {mount();const shell = screen.getByTestId("agent-shell");+ expect(shell.style.gridTemplateColumns).toBe(`${ROSTER_DEFAULT}px minmax(0, 1fr) 0px`);+ expect(screen.getByTestId("shell-details").hidden).toBe(true);+ expect(pill().getAttribute("aria-expanded")).toBe("false");+ expect(pill().getAttribute("aria-controls")).toBe(screen.getByTestId("shell-details").id);++ fireEvent.click(pill());expect(shell.style.gridTemplateColumns).toBe(`${ROSTER_DEFAULT}px minmax(0, 1fr) 320px`);- const toggle = screen.getByRole("button", { name: "society.card.options_collapse" });- expect(screen.getByRole("banner", { name: "Chat header" }).contains(toggle)).toBe(true);- expect(toggle.getAttribute("aria-expanded")).toBe("true");+ expect(pill().getAttribute("aria-expanded")).toBe("true");+ expect(JSON.parse(localStorage.getItem(STORE) ?? "{}").paneOpen).toBe(true);});- it("folds the details pane without unmounting anything and remembers it", () => {+ it("remembers an opened pane, and closes it from inside without unmounting anything", () => {mount();const draft = screen.getByLabelText("Draft") as HTMLTextAreaElement;fireEvent.change(draft, { target: { value: "unsent" } });- fireEvent.click(screen.getByRole("button", { name: "society.card.options_collapse" }));- expect(screen.getByTestId("shell-details").hidden).toBe(true);- expect(screen.getByLabelText("Draft")).toBe(draft);- expect(draft.value).toBe("unsent");- expect(JSON.parse(localStorage.getItem(STORE) ?? "{}").paneOpen).toBe(false);-+ fireEvent.click(pill());cleanup();+mount();+ expect(screen.getByTestId("shell-details").hidden).toBe(false);+ const again = screen.getByLabelText("Draft") as HTMLTextAreaElement;+ fireEvent.change(again, { target: { value: "unsent" } });+ fireEvent.click(screen.getByRole("button", { name: "close pane" }));expect(screen.getByTestId("shell-details").hidden).toBe(true);- expect(screen.getByRole("button", { name: "society.card.options_expand" })).toBeTruthy();+ expect(screen.getByLabelText("Draft")).toBe(again);+ expect(again.value).toBe("unsent");+ expect(document.activeElement).toBe(pill());+ expect(JSON.parse(localStorage.getItem(STORE) ?? "{}").paneOpen).toBe(false);});it("resizes the roster from the keyboard and keeps the width across reloads", () => {@@ -85,7 +107,8 @@ describe("AgentChatLayout", () => {expect(screen.getByTestId("agent-shell").style.gridTemplateColumns.startsWith(`${ROSTER_RAIL}px`)).toBe(true);});- it("gives way in order on a narrow window and shows a closed pane as a sheet", () => {+ it("gives way in order on a narrow window and shows the pane as a sheet", () => {+ localStorage.setItem(STORE, JSON.stringify({ rosterWidth: ROSTER_DEFAULT, rosterCollapsed: false, paneOpen: true, paneWidth: 320 }));frameWidth(ROSTER_DEFAULT + CHAT_MIN + 100);mount();const shell = screen.getByTestId("agent-shell");@@ -93,7 +116,7 @@ describe("AgentChatLayout", () => {expect(shell.style.gridTemplateColumns).toBe(`${ROSTER_DEFAULT}px minmax(0, 1fr) 0px`);expect(screen.getByTestId("shell-details").hidden).toBe(true);// Opening it now lays it over the chat instead of squeezing the chat.- fireEvent.click(screen.getByRole("button", { name: "society.card.options_expand" }));+ fireEvent.click(pill());const pane = screen.getByTestId("shell-details");expect(pane.hidden).toBe(false);expect(pane.dataset.overlay).toBe("true");@@ -111,9 +134,11 @@ describe("AgentChatLayout", () => {expect(screen.getByTestId("agent-shell").style.gridTemplateColumns).toBe(`${ROSTER_RAIL}px minmax(0, 1fr) 0px`);});- it("keeps a slim bar with the toggle when no header is given", () => {+ it("keeps a slim bar with a text toggle when no header is given", () => {render(<AgentChatLayout options={<aside>details</aside>}><div>chat</div></AgentChatLayout>);- expect(screen.getByRole("button", { name: "society.card.options_collapse" }).textContent).toContain("society.card.options");+ const toggle = screen.getByRole("button", { name: "society.card.options_expand" });+ expect(toggle.textContent).toContain("society.card.options");+ fireEvent.click(toggle);expect(screen.getByTestId("agent-shell").style.gridTemplateColumns).toBe("minmax(0, 1fr) 320px");});});diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentChatLayout.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentChatLayout.tsxindex d59641e431..50fcfc973b 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentChatLayout.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentChatLayout.tsx@@ -12,8 +12,7 @@* Every region stays mounted: folding the pane must not reset a browser* stream, a routine draft or the chat's unsent text.*/-import { useCallback, useEffect, useId, useLayoutEffect, useReducer, useRef, useState, type CSSProperties, type KeyboardEvent, type PointerEvent as ReactPointerEvent, type ReactNode, type RefObject } from "react";-import { PanelRightClose, PanelRightOpen } from "lucide-react";+import { createContext, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useReducer, useRef, useState, type CSSProperties, type KeyboardEvent, type PointerEvent as ReactPointerEvent, type ReactNode, type Ref, type RefObject } from "react";import { useLocaleChunk, useT } from "@/i18n";import { cn } from "@/lib/utils";@@ -41,6 +40,23 @@ export interface RosterSlotState {onToggleCollapsed: () => void;}+/** What the chat header needs to open and close the details pane from its name pill. */+export interface DetailsControl {+ open: boolean;+ toggle: () => void;+ /** The pane's element id, for `aria-controls`. */+ controlsId: string;+ /** The pill's ref: a press on it must not count as a press outside the pane's sheet. */+ ref: Ref<HTMLButtonElement>;+}++/** Lets the pane's own close button reach the layout that owns its open state. */+const DetailsPaneContext = createContext<{ close: () => void } | null>(null);++export function useDetailsPane(): { close: () => void } | null {+ return useContext(DetailsPaneContext);+}+export interface AgentChatLayoutProps {/** The chat column. */children: ReactNode;@@ -48,8 +64,8 @@ export interface AgentChatLayoutProps {options: ReactNode;/** The roster column; without it the frame is chat | details only. */roster?: (state: RosterSlotState) => ReactNode;- /** The chat header, handed the details toggle to place. Without it a slim bar carries the toggle. */- header?: (detailsToggle: ReactNode) => ReactNode;+ /** The chat header, handed the details control for its name pill. Without it a slim bar carries a text toggle. */+ header?: (details: DetailsControl) => ReactNode;/** Closes the sheets when it changes (the open agent's id). */resetKey?: string;}@@ -135,7 +151,6 @@ export function AgentChatLayout({ children, options, roster, header, resetKey }:const paneVisible = layout.paneOpen || paneSheet;const toggleLabel = t(paneVisible ? "society.card.options_collapse" : "society.card.options_expand");- const ToggleIcon = paneVisible ? PanelRightClose : PanelRightOpen;const togglePane = useCallback(() => {if (layout.paneForced) setPaneSheet((value) => !value);else {@@ -225,22 +240,13 @@ export function AgentChatLayout({ children, options, roster, header, resetKey }:/>);- const detailsToggle = (- <button- ref={toggleRef}- type="button"- onClick={togglePane}- title={toggleLabel}- aria-label={toggleLabel}- aria-expanded={paneVisible}- aria-controls={panelId}- data-testid="shell-details-toggle"- className="as-header-control"- >- <ToggleIcon aria-hidden className="h-4 w-4" />- {header ? null : <span>{t("society.card.options")}</span>}- </button>- );+ const closePane = useCallback(() => {+ if (paneSheet) setPaneSheet(false);+ else dispatch({ type: "set-pane-open", open: false });+ toggleRef.current?.focus();+ }, [paneSheet]);+ const paneContext = useMemo(() => ({ close: closePane }), [closePane]);+ const details: DetailsControl = { open: paneVisible, toggle: togglePane, controlsId: panelId, ref: toggleRef };const columns = roster? `${rosterWidth}px minmax(0, 1fr) ${layout.paneWidth}px`@@ -266,9 +272,14 @@ export function AgentChatLayout({ children, options, roster, header, resetKey }:{layout.roster === "full" ? separator("roster", rosterWidth) : null}</div>) : null}- <div className={cn("as-region as-stage", roster && "border-l border-border")} data-testid="shell-stage">- {header ? header(detailsToggle) : (- <div className="flex shrink-0 justify-end border-b border-border px-2 py-1">{detailsToggle}</div>+ <div className="as-region as-stage" data-testid="shell-stage">+ {header ? header(details) : (+ <div className="flex shrink-0 justify-end px-3 py-2">+ <button ref={toggleRef} type="button" onClick={togglePane} aria-expanded={paneVisible} aria-controls={panelId}+ aria-label={toggleLabel} data-testid="shell-details-toggle" className="as-pill-button">+ {t("society.card.options")}+ </button>+ </div>)}<div className="flex min-h-0 min-w-0 flex-1 flex-col">{children}</div></div>@@ -282,7 +293,7 @@ export function AgentChatLayout({ children, options, roster, header, resetKey }:data-testid="shell-details">{layout.paneOpen && !paneSheet ? separator("pane", layout.paneWidth) : null}- {options}+ <DetailsPaneContext.Provider value={paneContext}>{options}</DetailsPaneContext.Provider></div></div>);diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentHeader.test.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentHeader.test.tsxindex 376698aa17..06a6e40708 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentHeader.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentHeader.test.tsx@@ -1,21 +1,12 @@import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import { afterEach, describe, expect, it, vi } from "vitest";-import { create } from "zustand";import type { SocietyAgent } from "../data";import { modeSupported, runnerFor } from "./approvalModes";-import { AgentHeader } from "./AgentHeader";+import { AgentHeader, ApprovalModePicker } from "./AgentHeader";vi.mock("@/i18n", () => ({ useT: () => (key: string) => key, useUiLanguage: () => "en" }));-vi.mock("../chat/AgentModelPicker", () => ({- AgentModelPicker: ({ agent }: { agent: SocietyAgent }) => <button type="button">model:{agent.model || "default"}</button>,-}));-const chatStore = vi.hoisted(() => ({ hook: null as unknown }));-vi.mock("../chat/AgentChatPanel", () => {- chatStore.hook = create(() => ({ busy: false, activeSessionId: null }));- return { useSocietyChatStore: chatStore.hook };-});function agent(over: Partial<SocietyAgent> = {}): SocietyAgent {return {@@ -65,8 +56,12 @@ function json(body: unknown, status = 200) {function mount(row: SocietyAgent, fetcher = vi.fn(async (url: string) => (String(url).endsWith("/providers") ? json({ providers }) : json({})))) {vi.stubGlobal("fetch", fetcher);const client = new QueryClient({ defaultOptions: { queries: { retry: false } } });- render(<QueryClientProvider client={client}><AgentHeader agent={row} detailsToggle={<button type="button">details</button>} /></QueryClientProvider>);- return { fetcher, client };+ const toggle = vi.fn();+ render(<QueryClientProvider client={client}>+ <AgentHeader agent={row} details={{ open: false, toggle, controlsId: "pane", ref: { current: null } }} />+ <ApprovalModePicker agent={row} />+ </QueryClientProvider>);+ return { fetcher, client, toggle };}afterEach(() => {@@ -94,13 +89,23 @@ describe("approval mode support", () => {});});-describe("AgentHeader", () => {- it("shows identity, the live phrase, the brain picker and the details toggle", () => {- mount(agent({ state: "working" }));+describe("AgentHeader and the approval picker", () => {+ it("is one name pill that opens the details, with the live phrase only while it works", () => {+ const { toggle } = mount(agent({ state: "working" }));expect(screen.getByTestId("agent-header-name").textContent).toBe("Scout");expect(screen.getByTestId("agent-header-status").textContent).toBe("society.shell.preview_working");- expect(screen.getByRole("button", { name: "model:gpt-x" })).toBeTruthy();- expect(screen.getByRole("button", { name: "details" })).toBeTruthy();+ const pill = screen.getByTestId("shell-details-toggle");+ expect(pill.getAttribute("aria-expanded")).toBe("false");+ expect(pill.getAttribute("aria-controls")).toBe("pane");+ fireEvent.click(pill);+ expect(toggle).toHaveBeenCalledTimes(1);+ // No pickers in the header any more: model and permissions live in the composer and the Details tab.+ expect(screen.getByTestId("agent-header").querySelectorAll("button")).toHaveLength(1);+ });++ it("says nothing more than the name while the agent is idle", () => {+ mount(agent({ state: "idle" }));+ expect(screen.getByTestId("agent-header-status").textContent).toBe("");});it("says why the agent waits when the backend names a reason", () => {@@ -108,15 +113,9 @@ describe("AgentHeader", () => {expect(screen.getByTestId("agent-header-status").textContent).toBe("society.shell.preview_needs_you · Send the invoice?");});- it("shows no brain or approval picker for the lead, whose chat follows the app's own choice", () => {- mount(agent({ tier: "lead", agentId: "jarvis", name: "Jarvis" }));- expect(screen.queryByTestId("agent-header-model")).toBeNull();- expect(screen.queryByTestId("agent-header-approval")).toBeNull();- });-it("offers only the modes the runner can honour", async () => {mount(agent({ provider: "claude-api", approvalMode: "ask" }));- fireEvent.click(screen.getByTestId("agent-header-approval"));+ fireEvent.click(screen.getByTestId("agent-approval-mode"));await waitFor(() => expect((screen.getByTestId("approval-mode-ask") as HTMLButtonElement).disabled).toBe(false));expect((screen.getByTestId("approval-mode-always_ask") as HTMLButtonElement).disabled).toBe(true);expect((screen.getByTestId("approval-mode-bypass") as HTMLButtonElement).disabled).toBe(false);@@ -124,7 +123,7 @@ describe("AgentHeader", () => {it("lets a Hermes agent ask but not always ask", async () => {mount(agent({ provider: "codex", runtime: "hermes", approvalMode: "bypass" }));- fireEvent.click(screen.getByTestId("agent-header-approval"));+ fireEvent.click(screen.getByTestId("agent-approval-mode"));await waitFor(() => expect((screen.getByTestId("approval-mode-ask") as HTMLButtonElement).disabled).toBe(false));expect((screen.getByTestId("approval-mode-always_ask") as HTMLButtonElement).disabled).toBe(true);});@@ -138,13 +137,13 @@ describe("AgentHeader", () => {mount(agent({ approvalMode: "ask" }), fetcher);const patches = () => fetcher.mock.calls.filter(([, init]) => (init as RequestInit | undefined)?.method === "PATCH");- fireEvent.click(screen.getByTestId("agent-header-approval"));+ fireEvent.click(screen.getByTestId("agent-approval-mode"));await waitFor(() => expect((screen.getByTestId("approval-mode-always_ask") as HTMLButtonElement).disabled).toBe(false));fireEvent.click(screen.getByTestId("approval-mode-always_ask"));await waitFor(() => expect(patches()).toHaveLength(1));expect(JSON.parse(String((patches()[0][1] as RequestInit).body))).toEqual({ approval_mode: "always_ask" });- fireEvent.click(screen.getByTestId("agent-header-approval"));+ fireEvent.click(screen.getByTestId("agent-approval-mode"));fireEvent.click(await screen.findByTestId("approval-mode-bypass"));expect(patches()).toHaveLength(1);expect(screen.getByTestId("approval-mode-bypass").textContent).toContain("society.shell.approval_confirm");@@ -160,7 +159,7 @@ describe("AgentHeader", () => {return json({});});mount(agent({ approvalMode: "bypass" }), fetcher);- fireEvent.click(screen.getByTestId("agent-header-approval"));+ fireEvent.click(screen.getByTestId("agent-approval-mode"));await waitFor(() => expect((screen.getByTestId("approval-mode-ask") as HTMLButtonElement).disabled).toBe(false));fireEvent.click(screen.getByTestId("approval-mode-ask"));expect((await screen.findByRole("alert")).textContent).toContain("cannot provide");diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentHeader.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentHeader.tsxindex c8d507a290..ce67e05d27 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentHeader.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentHeader.tsx@@ -1,18 +1,18 @@/**- * The chat's header bar: who this is and what it is doing on the left; what- * it thinks with and how freely it may act on the right; then the details- * toggle. "Who and how" lives here, "what to say" lives in the composer.+ * The chat's header: one small pill in the middle with the agent's face and+ * name. Pressing it opens and closes the details pane. While the agent works+ * or waits on the person, the pill says so in a few words; an idle agent+ * shows nothing more than its name.*- * The brain picker is the composer's own `AgentModelPicker`, moved up; it- * already knows every runtime (a Hermes or OpenClaw agent shows its- * runtime-locked state inside it). The approval picker only offers what the- * agent's runner can honour and asks once more before loosening a mode.+ * What the agent thinks with lives in the composer's "+" menu and in the+ * Details tab; how freely it may act lives in the Details tab+ * (`ApprovalModePicker`). The approval picker only offers what the agent's+ * runner can honour and asks once more before loosening a mode.*/import { useEffect, useId, useRef, useState, type KeyboardEvent as ReactKeyboardEvent, type ReactNode } from "react";import { useQuery, useQueryClient } from "@tanstack/react-query";-import { Check, ChevronDown, Shield, ShieldAlert, ShieldOff, ShieldQuestion } from "lucide-react";+import { Check } from "lucide-react";-import { AgentChatStoreProvider } from "@/components/agentchat/AgentChatStoreContext";import { useT } from "@/i18n";import { fetchSocietyProviders, type AgentApprovalMode, type SocietyAgentRow } from "@/lib/societyApi";import { societyDisplayName } from "@/lib/societyDisplayName";@@ -22,80 +22,79 @@ import { useEventStore } from "@/store/events";import { AgentSwatch } from "../AgentSwatch";import { agentTint } from "../agentTint";import { rowToAgent, type SocietyAgent } from "../data";-import { AgentModelPicker } from "../chat/AgentModelPicker";-import { useSocietyChatStore } from "../chat/AgentChatPanel";import { previewText, rosterStatus, waitingReasonOf } from "../roster/rosterPreview";import { StatusMark } from "../roster/RosterRow";+import type { DetailsControl } from "./AgentChatLayout";import { AGENT_APPROVAL_MODES, modeSupported, runnerFor } from "./approvalModes";-const MODE_ICON: Record<AgentApprovalMode | "legacy", typeof Shield> = {- bypass: ShieldOff,- ask: ShieldQuestion,- always_ask: ShieldAlert,- legacy: Shield,-};-/** How strict a mode is; choosing a lower number loosens what the agent may do unasked. */const STRICTNESS: Record<AgentApprovalMode | "legacy", number> = { bypass: 0, legacy: 1, ask: 1, always_ask: 2 };export interface AgentHeaderProps {agent: SocietyAgent;- sample?: boolean;- /** The details-pane toggle; the layout owns it so its state and focus survive. */- detailsToggle?: ReactNode;- /** Reports a model save in flight so the composer holds Send meanwhile. */- onModelSavingChange?: (saving: boolean) => void;+ /** The details pane's state and toggle; the layout owns them so they survive agent switches. */+ details?: DetailsControl;}-export function AgentHeader({ agent, sample = false, detailsToggle, onModelSavingChange }: AgentHeaderProps) {+export function AgentHeader({ agent, details }: AgentHeaderProps) {const t = useT();const assistantName = useEventStore((state) => state.assistantName);const displayName = societyDisplayName(agent, assistantName);- const lead = agent.tier === "lead";- const busy = useSocietyChatStore((state) => state.busy && state.activeSessionId === agent.chatSessionId);const status = rosterStatus(agent, false);const reason = waitingReasonOf(agent);- let phrase: ReactNode;+ let phrase: ReactNode = null;if (status === "needs-you") {const summary = previewText(reason?.summary);- phrase = <span className="truncate text-warning">{summary ? `${t("society.shell.preview_needs_you")} · ${summary}` : t("society.shell.status_waiting")}</span>;+ phrase = <span className="as-pill-status text-warning">{summary ? `${t("society.shell.preview_needs_you")} · ${summary}` : t("society.shell.status_waiting")}</span>;} else if (status === "working") {- phrase = <span className="as-shimmer truncate">{t("society.shell.preview_working")}</span>;+ phrase = <span className="as-pill-status as-shimmer">{t("society.shell.preview_working")}</span>;} else if (status === "paused") {- phrase = <span className="truncate">{t("society.state.paused")}</span>;- } else {- phrase = <span className="truncate">{agent.title || t("society.state.idle")}</span>;+ phrase = <span className="as-pill-status">{t("society.state.paused")}</span>;}+ const label = details+ ? `${displayName}. ${t(details.open ? "society.card.options_collapse" : "society.card.options_expand")}`+ : displayName;- return (- <header className="as-header" data-testid="agent-header" style={agentTint(agent)}>+ const content = (+ <><span className="as-avatar">- <AgentSwatch agent={agent} size={30} />- <StatusMark status={status} className="[background:hsl(var(--background))]" />+ <AgentSwatch agent={agent} size={24} />+ {status === "needs-you" || status === "working" ? <StatusMark status={status} /> : null}</span>- <div className="flex min-w-0 flex-1 flex-col">- <h2 className="truncate text-[13.5px] font-semibold leading-[18px] text-foreground-strong" data-testid="agent-header-name">{displayName}</h2>- <p className="flex min-w-0 text-xs leading-4 text-muted-foreground" aria-live="polite" data-testid="agent-header-status">{phrase}</p>- </div>- {!lead ? (- <div className="as-header-slot" data-testid="agent-header-model">- <AgentChatStoreProvider store={useSocietyChatStore}>- <AgentModelPicker key={agent.agentId} agent={agent} busy={busy} onSavingChange={(saving) => onModelSavingChange?.(saving)} />- </AgentChatStoreProvider>- </div>- ) : null}- {!lead && !sample ? <ApprovalModePicker agent={agent} /> : null}- {detailsToggle ? (- <>- <span aria-hidden className="mx-0.5 h-5 w-px bg-border" />- {detailsToggle}- </>- ) : null}+ <span className="as-pill-name" data-testid="agent-header-name">{displayName}</span>+ <span className="contents" aria-live="polite" data-testid="agent-header-status">{phrase}</span>+ </>+ );++ return (+ <header className="as-header" data-testid="agent-header" style={agentTint(agent)}>+ <h2 className="sr-only">{displayName}</h2>+ {details ? (+ <button+ ref={details.ref}+ type="button"+ className="as-name-pill"+ onClick={details.toggle}+ aria-expanded={details.open}+ aria-controls={details.controlsId}+ aria-label={label}+ title={t(details.open ? "society.card.options_collapse" : "society.card.options_expand")}+ data-testid="shell-details-toggle"+ >+ {content}+ </button>+ ) : (+ <div className="as-name-pill">{content}</div>+ )}</header>);}+/**+ * How freely the agent may act, as one quiet row: the mode's name on the+ * right, a menu of the modes its runner can honour below.+ */export function ApprovalModePicker({ agent }: { agent: SocietyAgent }) {const t = useT();const client = useQueryClient();@@ -109,7 +108,6 @@ export function ApprovalModePicker({ agent }: { agent: SocietyAgent }) {const runner = runnerFor(agent, providers.data);const current = agent.approvalMode ?? null;const currentKey = current ?? "legacy";- const Icon = MODE_ICON[currentKey];const label = current ? t(`society.approval_mode.${current}`) : t("society.shell.approval_legacy");useEffect(() => {@@ -191,7 +189,7 @@ export function ApprovalModePicker({ agent }: { agent: SocietyAgent }) {<buttontype="button"data-approval-trigger- data-testid="agent-header-approval"+ data-testid="agent-approval-mode"aria-haspopup="menu"aria-expanded={open}aria-controls={open ? menuId : undefined}@@ -203,19 +201,16 @@ export function ApprovalModePicker({ agent }: { agent: SocietyAgent }) {setError("");setOpen((value) => !value);}}- className="as-header-control"+ className="ap-line">- <Icon className="h-3.5 w-3.5 shrink-0" aria-hidden />- <span className="as-header-label truncate">{label}</span>- <ChevronDown className="h-3 w-3 shrink-0 opacity-70" aria-hidden />+ <span className="ap-line-label">{t("society.agent_pane.approvals")}</span>+ <span className="ap-line-value">{label}</span></button>{open ? (<div id={menuId} role="menu" aria-label={t("society.approval_mode.title")} onKeyDown={onMenuKeyDown}- className="as-menu absolute right-0 top-full z-50 mt-1.5 w-72">- <p className="px-2.5 pb-1 pt-1.5 text-[11px] font-medium text-muted-foreground">{t("society.approval_mode.title")}</p>+ className="as-menu absolute inset-x-0 top-full z-50 mt-1.5">{AGENT_APPROVAL_MODES.map((mode) => {const supported = modeSupported(runner, mode);- const ModeIcon = MODE_ICON[mode];const selected = mode === current;const confirm = confirming === mode;return (@@ -230,12 +225,11 @@ export function ApprovalModePicker({ agent }: { agent: SocietyAgent }) {className="as-menu-item"data-testid={`approval-mode-${mode}`}>- <ModeIcon className="mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" aria-hidden /><span className="min-w-0 flex-1"><span className={cn("block font-medium", confirm ? "text-warning" : "text-foreground")}>{confirm ? t("society.shell.approval_confirm") : t(`society.approval_mode.${mode}`)}</span>- <span className="block text-xs leading-4 text-muted-foreground">+ <span className="block text-[13px] leading-[18px] text-muted-foreground">{supported ? t(`society.approval_mode.${mode}_hint`) : t("society.approval_mode.unavailable")}</span></span>@@ -243,7 +237,7 @@ export function ApprovalModePicker({ agent }: { agent: SocietyAgent }) {</button>);})}- {error ? <p role="alert" className="px-2.5 pb-1.5 pt-1 text-xs text-destructive">{error}</p> : null}+ {error ? <p role="alert" className="px-2.5 pb-1.5 pt-1 text-[13px] text-destructive">{error}</p> : null}</div>) : null}</div>diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutineDetail.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutineDetail.tsxindex 0f207bdd33..5916181a23 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutineDetail.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutineDetail.tsx@@ -7,7 +7,7 @@*/import { useEffect, useState } from "react";import { useQueries, useQueryClient } from "@tanstack/react-query";-import { AlertTriangle, ArrowLeft, Clock, Loader2, MessageSquareText, Play, Plus, Trash2 } from "lucide-react";+import { ArrowLeft, Loader2 } from "lucide-react";import { useT } from "@/i18n";import { useRunLocale } from "@/components/runs/format";import { Switch } from "@/components/ui/switch";@@ -22,7 +22,7 @@ import { SourceControls } from "./SourceControls";import { RoutineSeatPicker, type RoutineSeat } from "./RoutineSeatPicker";import { useRoutineNavigation } from "../chat/routineNavigation";import { routineSkipReason } from "@/lib/skipReasons";-import { TriggerIcon, type RoutineTone } from "./routines/TriggerIcon";+import type { RoutineTone } from "./routines/TriggerIcon";import { humanSchedule } from "./routines/humanSchedule";import { fill, formatDuration, relativeTime } from "./routines/format";import { markRoutinesSeen, useRoutineRuns } from "./routines/routinesApi";@@ -34,9 +34,9 @@ import { useNow } from "./routines/useNow";export { routineRuns } from "./routines/runs";const field = "w-full rounded-lg border border-border bg-background px-3 py-2 text-[12px] text-foreground transition-colors focus:border-border-strong focus:outline-none disabled:opacity-60";-const button = "inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-[12px] font-medium text-foreground transition-colors duration-150 hover:bg-secondary disabled:opacity-40";-const primary = "inline-flex items-center gap-1.5 rounded-lg bg-foreground px-3 py-1.5 text-[12px] font-medium text-background transition-colors duration-150 hover:bg-foreground/90 disabled:opacity-40";-const heading = "text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground";+const button = "inline-flex items-center gap-1.5 rounded-full bg-secondary px-3.5 py-1.5 text-[13px] font-medium text-foreground transition-colors duration-150 hover:bg-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40";+const primary = "inline-flex items-center gap-1.5 rounded-full bg-foreground px-3.5 py-1.5 text-[13px] font-medium text-background transition-colors duration-150 hover:bg-foreground/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40";+const heading = "text-xs font-medium text-muted-foreground";const recurring = ["every", "calendar", "cron", "webhook", "event_hook", "source", "on_event"];const terminal = ["completed", "failed", "cancelled", "interrupted"];const timeKinds = ["every", "calendar", "cron"];@@ -162,24 +162,23 @@ export function AgentRoutineDetail({ agentId, routine, onClose, parked = false }return <section className="min-h-0 flex-1 space-y-4 overflow-y-auto pb-4 text-foreground" data-testid="agent-routine-detail"><button type="button" className="-ml-1 flex items-center gap-1 rounded-md px-1 py-0.5 text-[12px] text-muted-foreground transition-colors hover:text-foreground" disabled={pending} onClick={onClose}><ArrowLeft size={14} />{t("society.card.routines")}</button>- <header className="rounded-2xl border border-border bg-card p-3 shadow-[0_1px_2px_rgb(var(--scrim-rgb)/0.05),0_6px_16px_-10px_rgb(var(--scrim-rgb)/0.18)]">+ <header className="rounded-2xl bg-card p-4"><div className="flex items-start gap-3">- <TriggerIcon trigger={headTrigger} tone={tone} size="lg" /><div className="min-w-0 flex-1"><h3 className="truncate text-[14px] font-semibold leading-5 text-foreground-strong" title={saved.title}>{saved.title}</h3>{sentence && <p className="text-[12px] leading-snug text-foreground-secondary" data-testid="routine-schedule-sentence">{sentence}</p>}- <p className={cn("mt-0.5 text-[11px] leading-4", tone === "parked" ? "text-warning" : tone === "running" ? "text-primary" : "text-muted-foreground")}+ <p className={cn("mt-0.5 text-xs leading-4", tone === "parked" ? "text-warning" : tone === "running" ? "text-primary" : "text-muted-foreground")}title={nextMs ? new Date(nextMs).toLocaleString(locale, { timeZoneName: "short" }) : undefined}>{status}</p></div>- <label className="flex shrink-0 items-center gap-1.5 text-[11px] text-muted-foreground"><Switch aria-label={label("active")} checked={shownActive} disabled={pending || !editable} onCheckedChange={(enabled) => void act(async () => {+ <label className="flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground"><Switch aria-label={label("active")} checked={shownActive} disabled={pending || !editable} onCheckedChange={(enabled) => void act(async () => {for (const detail of details) if (detail && !terminal.includes(detail.state) && (detail.state === "paused") === enabled) await setTaskEnabled(detail.id, enabled);})} /><span className="sr-only sm:not-sr-only" aria-hidden data-testid="routine-switch-state">{label(shownActive ? "active" : "paused")}</span></label></div><div className="mt-3 flex flex-wrap items-center gap-1.5"><button type="button" className={primary} disabled={!canTest} onClick={() => void act(async () => {await runTaskNow(routine.id); setNotice(label("test_started"));- })}>{running ? <Loader2 size={13} className="motion-safe:animate-spin" /> : <Play size={13} />}{label("test")}</button>- <button type="button" className={button} onClick={editInChat}><MessageSquareText size={13} />{own("edit_in_chat")}</button>+ })}>{running ? <Loader2 size={13} className="motion-safe:animate-spin" /> : null}{label("test")}</button>+ <button type="button" className={button} onClick={editInChat}>{own("edit_in_chat")}</button></div></header>@@ -189,30 +188,30 @@ export function AgentRoutineDetail({ agentId, routine, onClose, parked = false }{notice && <p role="status" className="text-[12px] text-success">{notice}</p>}{showFailure && <div className="rounded-xl border border-destructive/30 bg-destructive/[0.05] p-3" data-testid="routine-last-failure">- <div className="flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-[0.08em] text-destructive">- <AlertTriangle size={13} aria-hidden />{own("last_failure")}+ <div className="flex items-center gap-1.5 text-xs font-medium text-destructive">+ {own("last_failure")}<span className="ml-auto font-normal normal-case tracking-normal text-muted-foreground">{relativeTime(showFailure.finishedMs ?? showFailure.timestamp, now, locale)}</span></div><p className="mt-1.5 break-words text-[12px] leading-snug text-foreground-secondary">{runReason(t, showFailure) || own("failed_no_detail")}</p>- <button type="button" className="mt-2 text-[11px] text-muted-foreground underline-offset-2 hover:text-foreground hover:underline" onClick={() => openRun(showFailure)}>{own("open_failed_run")}</button>+ <button type="button" className="mt-2 text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline" onClick={() => openRun(showFailure)}>{own("open_failed_run")}</button></div>}<section className="space-y-2"><h4 className={heading}>{own("instruction")}</h4>- <label className="block space-y-1 text-[11px] text-muted-foreground">{label("name")}<input className={field} aria-label={label("name")} maxLength={200} disabled={pending || !editable || Boolean(editing)} value={values.title} onChange={(event) => setDraft({ ...values, title: event.target.value })} /></label>- <label className="block space-y-1 text-[11px] text-muted-foreground">{label("prompt")}<textarea className={cn(field, "resize-y leading-relaxed")} aria-label={label("prompt")} maxLength={16000} rows={6} disabled={pending || !editable || Boolean(editing) || (first?.spec?.action as { kind?: string } | undefined)?.kind !== "agent"} value={values.prompt} onChange={(event) => setDraft({ ...values, prompt: event.target.value })} /></label>+ <label className="block space-y-1 text-xs text-muted-foreground">{label("name")}<input className={field} aria-label={label("name")} maxLength={200} disabled={pending || !editable || Boolean(editing)} value={values.title} onChange={(event) => setDraft({ ...values, title: event.target.value })} /></label>+ <label className="block space-y-1 text-xs text-muted-foreground">{label("prompt")}<textarea className={cn(field, "resize-y leading-relaxed")} aria-label={label("prompt")} maxLength={16000} rows={6} disabled={pending || !editable || Boolean(editing) || (first?.spec?.action as { kind?: string } | undefined)?.kind !== "agent"} value={values.prompt} onChange={(event) => setDraft({ ...values, prompt: event.target.value })} /></label>{draft && <div className="flex gap-2"><button className={primary} disabled={pending || !valid || !editable || Boolean(editing)} onClick={() => void act(async () => {for (const [index, member] of members.entries()) if (!terminal.includes(details[index]!.state)) await update(member, details[index]?.trigger);setDraft(null); setSeatDraft(null); setSeatOpen(false); setNotice(label("saved"));})}>{label("save")}</button><button className={button} disabled={pending} onClick={() => setDraft(null)}>{label("cancel")}</button></div>}</section>- {seatEditable && <div className="space-y-2 rounded-xl border border-border p-3">+ {seatEditable && <div className="space-y-2 rounded-2xl bg-card p-4"><div className="flex items-center justify-between gap-2"><h4 className={heading}>{label("model")}</h4><buttontype="button"- className="text-[11px] text-muted-foreground underline-offset-2 hover:text-foreground hover:underline disabled:opacity-50"+ className="text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline disabled:opacity-50"disabled={pending || !editable || Boolean(editing)}onClick={() => setSeatOpen((open) => !open)}>@@ -231,24 +230,24 @@ export function AgentRoutineDetail({ agentId, routine, onClose, parked = false }<section className="space-y-2"><h4 className={heading}>{label("when")}</h4>- <div className="divide-y divide-border/70 overflow-hidden rounded-xl border border-border">+ <div className="divide-y divide-border/50 overflow-hidden rounded-2xl bg-card">{members.map((member, index) => {const detail = details[index];if (index > 0 && detail && terminal.includes(detail.state)) return null;return <div key={member.id} className="space-y-1 px-3 py-2.5"><button className="flex w-full items-start gap-2 rounded text-left text-[12px] transition-colors enabled:hover:text-foreground disabled:opacity-80" disabled={pending || !editable || Boolean(draft) || !detail || !timeKinds.includes(detail.trigger_type)} onClick={() => { setEditing({ ...member, trigger: detail?.trigger }); setSchedule(null); }}>- <Clock size={14} className="mt-0.5 shrink-0 text-muted-foreground" /><span>{sentenceOf(detail?.trigger ?? member.trigger)}</span>+ <span>{sentenceOf(detail?.trigger ?? member.trigger)}</span></button>- {detail?.due_at_ns && detail.state === "scheduled" ? <p className="pl-5 text-[11px] text-muted-foreground">{t("society.card.next_run")}: {new Date(detail.due_at_ns / 1e6).toLocaleString(locale, { timeZoneName: "short" })}</p> : null}- {detail && <div className="pl-5">{renderConnection(detail)}</div>}- {index > 0 && <button className="pl-5 text-[11px] text-muted-foreground hover:text-foreground" disabled={pending || !editable || Boolean(draft)} onClick={() => void act(async () => { await cancelTask(member.id); })}>{label("remove_schedule")}</button>}+ {detail?.due_at_ns && detail.state === "scheduled" ? <p className="text-xs text-muted-foreground">{t("society.card.next_run")}: {new Date(detail.due_at_ns / 1e6).toLocaleString(locale, { timeZoneName: "short" })}</p> : null}+ {detail && <div>{renderConnection(detail)}</div>}+ {index > 0 && <button className="text-xs text-muted-foreground hover:text-foreground" disabled={pending || !editable || Boolean(draft)} onClick={() => void act(async () => { await cancelTask(member.id); })}>{label("remove_schedule")}</button>}</div>;})}<div className="px-3 py-2">- <button className="flex items-center gap-1 text-[12px] text-muted-foreground transition-colors enabled:hover:text-foreground disabled:opacity-50" disabled={pending || !editable || Boolean(draft)} onClick={() => { setEditing("new"); setSchedule(null); }}><Plus size={14} />{label("add_schedule")}</button>+ <button className="flex items-center gap-1 text-[12px] text-muted-foreground transition-colors enabled:hover:text-foreground disabled:opacity-50" disabled={pending || !editable || Boolean(draft)} onClick={() => { setEditing("new"); setSchedule(null); }}>{label("add_schedule")}</button></div></div>- {editing && <div className="space-y-2 rounded-xl border border-border bg-card p-3">+ {editing && <div className="space-y-2 rounded-2xl bg-card p-4"><TriggerBuilder key={editing === "new" ? "new" : editing.id} timeOnly initialValue={editing === "new" ? undefined : editing.trigger as Record<string, unknown>} onChange={setSchedule} /><button className={primary} disabled={pending || !schedule || !valid} onClick={() => void act(async () => {if (editing === "new") await writeRoutine(url, { title: values.title, prompt: values.prompt, schedule, parent_task_id: routine.id }, "POST");@@ -261,10 +260,10 @@ export function AgentRoutineDetail({ agentId, routine, onClose, parked = false }<RunHistory runs={runs} ready={ready} locale={locale} onOpen={openRun} /><footer className="space-y-2 border-t border-border/70 pt-3">- <button type="button" className="inline-flex items-center gap-1.5 rounded-md px-1 py-0.5 text-[12px] text-muted-foreground transition-colors hover:text-destructive disabled:opacity-40" disabled={pending || !ready || running} onClick={() => setConfirmDelete(true)}><Trash2 size={13} aria-hidden />{label("delete")}</button>+ <button type="button" className="inline-flex items-center rounded-full px-3 py-1.5 text-[13px] text-muted-foreground transition-colors hover:bg-secondary hover:text-destructive disabled:opacity-40" disabled={pending || !ready || running} onClick={() => setConfirmDelete(true)}>{label("delete")}</button>{confirmDelete && <div className="space-y-2 rounded-xl border border-destructive/30 bg-destructive/[0.04] p-3" role="alert"><p className="text-[12px] text-foreground">{label("delete_confirm")}</p>- <p className="text-[11px] text-muted-foreground">{own("delete_note")}</p>+ <p className="text-xs text-muted-foreground">{own("delete_note")}</p><div className="flex gap-2"><button className="rounded-lg bg-destructive px-2.5 py-1.5 text-[12px] font-medium text-destructive-foreground disabled:opacity-50" disabled={pending} onClick={() => void act(async () => {for (const detail of [...details].reverse()) if (detail) await cancelAndDeleteTask(detail.id, !terminal.includes(detail.state));diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.test.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.test.tsxindex 45f125810a..46525deaff 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.test.tsx@@ -105,13 +105,13 @@ describe("AgentRoutinesList", () => {await screen.findByText("No routines yet.");});- test.each(["schedule", "next-run", "icon", "padding"])("opens the routine when clicking %s", async (area) => {+ test.each(["schedule", "next-run", "padding"])("opens the routine when clicking %s", async (area) => {routines[0].due_at_ns = Date.UTC(2026, 8, 13, 8) * 1e6;mount();const card = await screen.findByRole("button", { name: "Morning inbox" });const target = area === "schedule" ? screen.getByText("Every hour"): area === "next-run" ? screen.getByText(/^Next run:/)- : area === "icon" ? card.querySelector("svg")! : card;+ : card;expect(card.contains(target)).toBe(true);fireEvent.click(target);expect(await screen.findByTestId("routine-opened")).toBeTruthy();diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.tsxindex 6007b37a88..61393eeb9d 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.tsx@@ -5,7 +5,7 @@* pause/test actions, "set one up in chat", and the away-parking note.*/import { useEffect, useMemo, useState } from "react";-import { MessageSquarePlus, Plus, Sparkles, X } from "lucide-react";+import { Plus, X } from "lucide-react";import { useLocaleChunk, useT } from "@/i18n";import { useRunLocale } from "@/components/runs/format";import { cn } from "@/lib/utils";@@ -59,16 +59,13 @@ export function AgentRoutinesList({ agentId, sampleRoutines, variant = "rail", cconst lastRunOf = (routine: LiveRoutine) => (routine.members ?? [routine]).map((member) => lastRuns[member.id]).filter(Boolean).sort((a, b) => (b!.started_ms ?? 0) - (a!.started_ms ?? 0))[0] ?? null;- const activeCount = rows.filter((row) => row.state !== "paused").length;return <section className={cn("flex min-h-0 flex-col", className)} data-testid="agent-routines"><div className="mb-2 flex shrink-0 items-center justify-between gap-2">- <h3 className={variant === "sheet" ? "ac-head" : "font-display text-[13px] font-semibold text-foreground"}>+ <h3 className={variant === "sheet" ? "ac-head" : "px-1 text-[13px] font-medium text-muted-foreground"}>{t("society.card.routines")}- {rows.length > 0 && <span className="ml-1.5 font-normal text-muted-foreground" title={own("active_hint")}>{activeCount === rows.length ? rows.length : `${activeCount}/${rows.length}`}</span>}</h3><div className="flex items-center gap-0.5">- {!isSample && <button type="button" data-testid="agent-routines-chat" className="rounded-md p-1 text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground" aria-label={own("setup_in_chat")} title={own("setup_in_chat")} onClick={setUpInChat}><MessageSquarePlus size={14} /></button>}- <button type="button" data-testid="agent-routines-add" className="rounded-md p-1 text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground" aria-label={t("society.card.routines_add")} aria-expanded={open} onClick={() => setOpen((v) => !v)}>{open ? <X size={14} /> : <Plus size={14} />}</button>+ <button type="button" data-testid="agent-routines-add" className="as-round-button h-7 w-7" aria-label={t("society.card.routines_add")} aria-expanded={open} onClick={() => setOpen((v) => !v)}>{open ? <X size={14} /> : <Plus size={14} />}</button></div></div>{parking?.banner && parking.parked_ids.length > 0 && <ParkingBanner agentId={agentId} parking={parking} onAnswered={() => void refresh()} />}@@ -77,23 +74,24 @@ export function AgentRoutinesList({ agentId, sampleRoutines, variant = "rail", c<textarea className={cn(field, "resize-y leading-snug")} aria-label={t("society.card.routines_prompt")} placeholder={t("society.card.routines_prompt")} value={prompt} onChange={(e) => setPrompt(e.target.value)} rows={3} /><TriggerBuilder onChange={setSchedule} /><div className="flex items-center justify-between gap-2 pt-0.5">- {!isSample ? <button type="button" className="text-[11px] text-muted-foreground underline-offset-2 hover:text-foreground hover:underline" onClick={() => { setOpen(false); setUpInChat(); }}>{own("or_chat")}</button> : <span />}- <button type="submit" disabled={saving || !title.trim() || !prompt.trim() || !schedule} className="rounded-lg bg-foreground px-3 py-1 text-[12px] font-medium text-background transition-colors hover:bg-foreground/90 disabled:opacity-40">{t(saving ? "society.card.saving" : "society.card.routines_save")}</button>+ {!isSample ? <button type="button" className="text-[12px] text-muted-foreground underline-offset-2 hover:text-foreground hover:underline" onClick={() => { setOpen(false); setUpInChat(); }}>{own("or_chat")}</button> : <span />}+ <button type="submit" disabled={saving || !title.trim() || !prompt.trim() || !schedule} className="rounded-full bg-foreground px-3.5 py-1.5 text-[13px] font-medium text-background transition-colors hover:bg-foreground/90 disabled:opacity-40">{t(saving ? "society.card.saving" : "society.card.routines_save")}</button></div>- {error && <p role="alert" className="text-[11px] text-destructive">{error}</p>}+ {error && <p role="alert" className="text-[12px] text-destructive">{error}</p>}</form>}- <ul className="-mx-1 min-h-0 flex-1 space-y-0.5 overflow-y-auto px-1">+ <ul className={cn("min-h-0 shrink overflow-y-auto", rows.length > 0 && "rounded-2xl bg-card p-1")}>{live.error && !live.data && <li role="alert" className="text-[12px] text-destructive">{t("tasks_view.load_error")}</li>}{rows.length === 0 && live.isPending && <li className="text-[12px] text-muted-foreground">{t("society.profile_card.loading")}</li>}- {rows.length === 0 && !live.isPending && !live.error && <li className="rounded-xl border border-dashed border-border px-3 py-4 text-center">- <Sparkles size={16} aria-hidden className="mx-auto mb-1.5 text-faint-foreground" />- <p className="text-[12.5px] font-medium text-foreground">{t("society.card.no_routines")}</p>- <p className="mx-auto mt-1 max-w-[30ch] text-[11.5px] leading-snug text-muted-foreground">{own("empty_body")}</p>- {!isSample && <button type="button" onClick={setUpInChat} className="mt-2.5 inline-flex items-center gap-1.5 rounded-full border border-border px-2.5 py-1 text-[11.5px] text-foreground transition-colors hover:bg-secondary"><MessageSquarePlus size={12} />{own("setup_in_chat")}</button>}+ {rows.length === 0 && !live.isPending && !live.error && <li className="rounded-2xl bg-card px-4 py-5 text-center">+ <p className="text-[14px] font-medium text-foreground">{t("society.card.no_routines")}</p>+ <p className="mx-auto mt-1 max-w-[30ch] text-[13px] leading-snug text-muted-foreground">{own("empty_body")}</p>+ {!isSample && <button type="button" onClick={setUpInChat} className="mt-3 inline-flex items-center rounded-full bg-secondary px-3.5 py-1.5 text-[13px] text-foreground transition-colors hover:bg-border">{own("setup_in_chat")}</button>}</li>}{rows.map((routine) => <RoutineRow key={routine.id} routine={routine} lastRun={lastRunOf(routine)} parked={parked.has(routine.id)}locale={locale} now={now} onOpen={() => setSelected(routine.id)} onChanged={() => void refresh()} />)}</ul>+ {!isSample && rows.length > 0 && <button type="button" data-testid="agent-routines-chat" onClick={setUpInChat}+ className="mt-2 self-start rounded-full px-3 py-1.5 text-[13px] 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">{own("setup_in_chat")}</button>}{!isSample && rows.length > 0 && <AwaySetting agentId={agentId} neverAsk={Boolean(parking?.never_ask)} onChanged={() => void refresh()} />}</section>;}diff --git a/dodaios/ui/web/frontend/src/components/society/card/BuildingCardOverlay.tsx b/dodaios/ui/web/frontend/src/components/society/card/BuildingCardOverlay.tsxindex a01c267dc9..1d1c5f6c47 100644--- a/dodaios/ui/web/frontend/src/components/society/card/BuildingCardOverlay.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/BuildingCardOverlay.tsx@@ -79,20 +79,20 @@ export function BuildingCardOverlay({ place, onClose, onCreateAgent }: BuildingC<ScrollArea className="min-h-0 flex-1"><div className="flex flex-col gap-5 p-5"><div>- <h3 className="mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground">+ <h3 className="mb-1.5 text-xs font-medium text-muted-foreground">{t("society.world.card_does_title")}</h3><p className="text-sm leading-relaxed text-foreground">{t(`society.world.${card.doesKey}`)}</p></div><div>- <h3 className="mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground">+ <h3 className="mb-1.5 text-xs font-medium text-muted-foreground">{t("society.world.card_how_title")}</h3><p className="text-sm leading-relaxed text-foreground">{t(`society.world.${card.howKey}`)}</p></div>{place && hasInside(place) ? (<div>- <h3 className="mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground">+ <h3 className="mb-1.5 text-xs font-medium text-muted-foreground">{t("society.world.card_inside_title")}</h3><BuildingInside place={place} className="-mx-2" />diff --git a/dodaios/ui/web/frontend/src/components/society/card/LeadSections.tsx b/dodaios/ui/web/frontend/src/components/society/card/LeadSections.tsxindex a07eff9162..7b6cd438c4 100644--- a/dodaios/ui/web/frontend/src/components/society/card/LeadSections.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/LeadSections.tsx@@ -46,13 +46,13 @@ export function LeadBrain() {) : (<Badge variant="outline">{t("society.card.default_brain")}</Badge>)}- <Badge variant="secondary" className="font-mono text-[11px]">+ <Badge variant="secondary" className="font-mono text-xs">{draft.model || t("society.chat.model_provider_default")}</Badge>{draft.effort ? <Badge variant="outline">{draft.effort}</Badge> : null}<Badge variant="outline">{t("society.tier.lead")}</Badge></div>- <p className="text-[11px] text-muted-foreground">{t("society.card.brain_shared_hint")}</p>+ <p className="text-xs text-muted-foreground">{t("society.card.brain_shared_hint")}</p></div>);}@@ -106,7 +106,7 @@ export function LeadInstructions() {return (<div><div className="mb-2 flex items-center justify-between gap-2">- <h3 className="text-[11px] font-semibold uppercase tracking-wide text-muted-foreground">+ <h3 className="text-xs font-medium text-muted-foreground">{payload?.filename? t("society.card.instructions_file").replace("{0}", payload.filename): t("society.card.description")}@@ -118,7 +118,7 @@ export function LeadInstructions() {setDraft(content || payload?.template || "");setEditing(true);}}- className="flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[11px] text-muted-foreground hover:bg-secondary hover:text-foreground"+ className="flex items-center gap-1 rounded-md px-1.5 py-0.5 text-xs text-muted-foreground hover:bg-secondary hover:text-foreground"><Pencil className="h-3 w-3" aria-hidden />{t("society.card.edit")}@@ -134,7 +134,7 @@ export function LeadInstructions() {className="w-full resize-y rounded-md border border-border bg-background px-3 py-2 font-mono text-[12px] leading-relaxed text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-strong"/>{error ? (- <p role="alert" className="text-[11px] text-destructive">+ <p role="alert" className="text-xs text-destructive">{error}</p>) : null}@@ -152,7 +152,7 @@ export function LeadInstructions() {) : (<p className="text-xs text-muted-foreground">{t("society.card.instructions_empty")}</p>)}- <p className="mt-1 text-[11px] text-muted-foreground">{t("society.card.instructions_hint")}</p>+ <p className="mt-1 text-xs text-muted-foreground">{t("society.card.instructions_hint")}</p></div>);}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 a3b4049b6d..628603e382 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@@ -1,7 +1,8 @@/**- * The agent pane beside the chat: tabs that persist, an Overview with the- * six-part anatomy, in-pane drill-down with Back, the review queue with- * "Review in chat", Retire behind ⋯ (still two-press), and a switch of agent+ * The agent pane beside the chat: word tabs that persist, a calm Details tab+ * (instructions, model and permissions, routines with a switch, a few rows),+ * in-pane drill-down with Back, the review queue with "Review in chat", look,+ * share and Retire behind ⋯ (Retire still two-press), and a switch of agent* that swaps everything.*/import { QueryClient, QueryClientProvider } from "@tanstack/react-query";@@ -46,6 +47,10 @@ function agent(over: Partial<SocietyAgent> = {}): SocietyAgent {}function mount(row: SocietyAgent, onRetired = vi.fn()) {+ // The pane starts closed for a new person; these cases look inside it.+ if (!window.localStorage.getItem("society.shell.layout.v2")) {+ window.localStorage.setItem("society.shell.layout.v2", JSON.stringify({ paneOpen: true }));+ }const client = new QueryClient({defaultOptions: { queries: { retry: false, staleTime: Infinity, refetchInterval: false } },});@@ -155,18 +160,41 @@ describe("OptionsRail (agent pane)", () => {vi.unstubAllGlobals();});- test("opens on the Overview with the six-part anatomy and a calm header", async () => {+ test("opens on Details: word tabs, a few rows, routines with a switch, actions behind ⋯", async () => {mount(agent());- const anatomy = await screen.findByTestId("agent-pane-anatomy");- for (const row of ["instructions", "memory", "skills", "routines", "tools", "files"]) {+ await screen.findByTestId("agent-pane-anatomy");+ await waitFor(() => expect(screen.getAllByRole("tab").map((tab) => tab.textContent)).toEqual(["Details", "Memory", "Tasks", "Computer"]));+ for (const row of ["tools", "skills", "files"]) {expect(screen.getByTestId(`agent-pane-row-${row}`)).toBeTruthy();}- await waitFor(() => expect(screen.getByTestId("agent-pane-row-routines").textContent).toContain("1"));- await waitFor(() => expect(screen.getByTestId("agent-pane-row-memory").textContent).toContain("2 waiting"));- expect(anatomy).toBeTruthy();+ const routine = await screen.findByTestId("agent-pane-routine-gm1");+ expect(routine.textContent).toContain("Inbox sweep");+ expect(within(routine).getByRole("switch").getAttribute("aria-checked")).toBe("true");+ // No icons in the tabs or rows.+ expect(screen.getByRole("tablist").querySelector("svg")).toBeNull();+ expect(screen.getByTestId("agent-pane-anatomy").querySelector("svg")).toBeNull();+ expect(screen.queryByTestId("edit-agent-appearance")).toBeNull();+ fireEvent.click(screen.getByTestId("agent-card-options-more"));expect(screen.getByTestId("edit-agent-appearance")).toBeTruthy();expect(screen.getByTestId("share-agent")).toBeTruthy();- expect(screen.queryByTestId("agent-card-retire")).toBeNull();+ expect(screen.getByTestId("agent-card-retire")).toBeTruthy();+ });++ test("a routine switch pauses every part of the routine", async () => {+ mount(agent());+ const routine = await screen.findByTestId("agent-pane-routine-gm1");+ fireEvent.click(within(routine).getByRole("switch"));+ await waitFor(() => {+ const call = fetchMock.mock.calls.find(([url, init]) => String(url) === "/api/tasks/gm1" && (init as RequestInit)?.method === "PATCH");+ expect(JSON.parse(String((call?.[1] as RequestInit).body))).toEqual({ enabled: false });+ });+ });++ test("name and role are edited in the pane header", async () => {+ mount(agent());+ expect(screen.getByTestId("agent-pane-name").textContent).toBe("Gamil agent");+ fireEvent.click(screen.getByTestId("agent-pane-role"));+ expect((screen.getByTestId("agent-pane-role-input") as HTMLInputElement).value).toBe("Specialist");});test("Retire lives behind ⋯ and still only arms on the first press", async () => {@@ -192,9 +220,10 @@ describe("OptionsRail (agent pane)", () => {test("folding the pane keeps routine and chat drafts", async () => {window.localStorage.setItem("society.agentPane.tab", "tasks");+ window.localStorage.setItem("society.shell.layout.v2", JSON.stringify({ paneOpen: true }));mount(agent());await screen.findByText("Inbox sweep");- const toggle = await screen.findByRole("button", { name: "Collapse Options" });+ const toggle = await screen.findByRole("button", { name: "Hide details" });const panel = document.getElementById(toggle.getAttribute("aria-controls")!)!;fireEvent.click(screen.getByTestId("agent-routines-add"));const title = screen.getByRole("textbox", { name: "Title" }) as HTMLInputElement;@@ -205,7 +234,7 @@ describe("OptionsRail (agent pane)", () => {fireEvent.click(toggle);expect(panel.hidden).toBe(true);expect(chat.value).toBe("Unsent message");- fireEvent.click(screen.getByRole("button", { name: "Expand Options" }));+ fireEvent.click(screen.getByRole("button", { name: "Show details" }));expect(panel.hidden).toBe(false);expect(screen.getByRole("textbox", { name: "Title" })).toBe(title);expect(title.value).toBe("Unsaved routine");@@ -230,9 +259,9 @@ describe("OptionsRail (agent pane)", () => {await waitFor(() => expect(screen.getByTestId("agent-browser-preview")).toBeTruthy());});- test("an anatomy row drills down in place and Back returns", async () => {+ test("instructions open in place and Back returns", async () => {mount(agent());- fireEvent.click(await screen.findByTestId("agent-pane-row-instructions"));+ fireEvent.click(await screen.findByTestId("agent-pane-edit-instructions"));const input = (await screen.findByTestId("agent-pane-instructions-input")) as HTMLTextAreaElement;expect(input.value).toBe("Look after the mail.");expect(screen.getByTestId("agent-pane-subpage").textContent).toContain("Instructions");@@ -290,12 +319,12 @@ describe("OptionsRail (agent pane)", () => {test("only real decisions mark the Memory tab, and the review nudge can be dismissed", async () => {const first = mount(agent());- await waitFor(() => expect(screen.getByTestId("agent-pane-row-memory").textContent).toContain("2 waiting"));+ await waitFor(() => expect(screen.getByTestId("agent-pane-suggestion-review").textContent).toContain("2"));expect(screen.getByTestId("agent-pane-tab-memory").querySelector(".ap-tab-badge")).toBeTruthy();first.unmount();mount(agent({ agentId: "notes-agent", chatSessionId: "society:notes-agent" }));- await waitFor(() => expect(screen.getByTestId("agent-pane-row-memory").textContent).toContain("1 waiting"));+ await waitFor(() => expect(screen.getByTestId("agent-pane-suggestion-review").textContent).toContain("1"));// A notebook write is listed, but it does not raise a mark on the tab.expect(screen.getByTestId("agent-pane-tab-memory").querySelector(".ap-tab-badge")).toBeNull();const nudge = await screen.findByTestId("agent-pane-suggestion-review");@@ -303,9 +332,13 @@ describe("OptionsRail (agent pane)", () => {await waitFor(() => expect(screen.queryByTestId("agent-pane-suggestion-review")).toBeNull());});- test("the lead gets a History tab and no Share", async () => {+ test("the lead gets a History row that opens with a way back, and no Share", async () => {mount(agent({ agentId: "jarvis", name: "Jarvis", tier: "lead", chatSessionId: null }));- expect(await screen.findByTestId("agent-pane-tab-history")).toBeTruthy();+ fireEvent.click(await screen.findByTestId("agent-pane-row-history"));+ expect(screen.getByTestId("agent-pane-subpage").textContent).toContain("History");+ fireEvent.click(screen.getByTestId("agent-pane-back"));+ expect(screen.queryByTestId("agent-pane-subpage")).toBeNull();+ fireEvent.click(screen.getByTestId("agent-card-options-more"));expect(screen.queryByTestId("share-agent")).toBeNull();});});diff --git a/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.tsx b/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.tsxindex 1519cff38d..0723fd0b5f 100644--- a/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.tsx@@ -1,38 +1,27 @@/*** The agent's home beside its chat: one details pane with the same anatomy- * for every agent, in tabs that remember where the person was.+ * for every agent. It is closed until the person opens it from the name pill+ * in the chat header.*- * - Overview: identity (name, role, instructions edited in place), what it- * runs on, its six-part anatomy as counted rows, and a few next steps.- * - Tools & access: reach, tools, approvals and rules, limits, its browser- * and where it works, saved together; widening changes ask first.- * - Memory: its notebooks, learned rules and skills, plus the review queue- * of what it learned or proposed, with "Review in chat".- * - Tasks: its routines. Browser: its live screen. History: the lead's chats- * and calls.+ * On top: the agent's face and name, large and centred, with "…" (look,+ * share, pause, retire) and close as two round buttons. Below: four tabs as+ * plain words that remember where the person was.*- * Drill-downs (instructions, a memory file, skills, files) open IN the pane- * with a Back button instead of stacking a modal. Look and Share are header- * actions; Pause and Retire live in the header's "…" menu. The file keeps its- * historical name and export: the layout mounts `<OptionsRail …>`.+ * - Details: name and role, instructions, its model and permissions, its+ * routines with a switch each, a few rows to everything else, and a+ * one-line record.+ * - Memory: its notebooks, learned rules and skills, plus the review queue.+ * - Tasks: its routines in full. Computer: its live browser screen.+ *+ * Tools & access (and the lead's History) open from rows in Details as a+ * page with a way back; they stay mounted once visited so unsaved access+ * edits survive. Drill-downs (instructions, a memory file, skills, files)+ * open in the pane the same way. The file keeps its historical name and+ * export: the layout mounts `<OptionsRail …>`.*/import { lazy, Suspense, useEffect, useRef, useState, type CSSProperties } from "react";import * as Tabs from "@radix-ui/react-tabs";-import {- ChevronLeft,- History,- LayoutGrid,- Lightbulb,- ListChecks,- Monitor,- MoreHorizontal,- Palette,- Pause,- Play,- Share2,- Wrench,- type LucideIcon,-} from "lucide-react";+import { ChevronLeft, MoreHorizontal, X } from "lucide-react";import { useLocaleChunk, useT } from "@/i18n";import { societyDisplayName } from "@/lib/societyDisplayName";@@ -40,9 +29,10 @@ import { cn } from "@/lib/utils";import { useEventStore } from "@/store/events";import { AgentSwatch } from "../AgentSwatch";-import { useSetAgentPaused, type SocietyAgent } from "../data";+import { useSetAgentPaused, useUpdateAgentConfig, type SocietyAgent } from "../data";import { DodaiosHistoryRail } from "../chat/DodaiosHistoryRail";import { AgentBrowserPreview } from "./AgentBrowserPreview";+import { useDetailsPane } from "./AgentChatLayout";import { AgentRoutinesList } from "./AgentRoutinesList";import { RetireButton } from "./RetireButton";import { MemoryTab } from "./pane/MemoryTab";@@ -50,6 +40,7 @@ import { OverviewTab } from "./pane/OverviewTab";import { usePaneStack, usePaneTab, type PaneTab } from "./pane/paneState";import { useReviewQueue } from "./pane/reviewQueue";import { FilesPage, InstructionsPage, MemoryFilePage, SkillsPage } from "./pane/SubPages";+import { InlineEdit } from "./pane/ui";import { ToolsTab } from "./pane/ToolsTab";import "./pane/agentPane.css";@@ -61,24 +52,21 @@ export interface OptionsRailProps {onRetired: () => void;/** True when rows come from the sample roster rather than society.db. */sample?: boolean;- /** The width the layout gives the pane, in px; the pane adapts its tab labels to it. */+ /** The width the layout gives the pane, in px. */width?: number;+ /** Reports a model save from the Details tab, so the composer holds Send meanwhile. */+ onModelSavingChange?: (saving: boolean) => void;}-const TAB_ICONS: Record<PaneTab, LucideIcon> = {- overview: LayoutGrid,- tools: Wrench,- memory: Lightbulb,- tasks: ListChecks,- browser: Monitor,- history: History,-};+/** The tabs shown as words; the others open from rows in Details. */+const PRIMARY_TABS: readonly PaneTab[] = ["overview", "memory", "tasks", "browser"];-export function OptionsRail({ agent, onRetired, sample = false, width }: OptionsRailProps) {+export function OptionsRail({ agent, onRetired, sample = false, width, onModelSavingChange }: OptionsRailProps) {const t = useT();useLocaleChunk("society");const lead = agent.tier === "lead";const assistantName = useEventStore((s) => s.assistantName);+ const pane = useDetailsPane();const available: PaneTab[] = lead? ["overview", "tools", "memory", "tasks", "browser", "history"]: ["overview", "tools", "memory", "tasks", "browser"];@@ -92,6 +80,7 @@ export function OptionsRail({ agent, onRetired, sample = false, width }: Options// agent's routine notebook writes wait quietly in the list.const pending = (queue.data?.counts?.proposal ?? 0) + (queue.data?.counts?.memory_share ?? 0);const { reset } = stack;+ const name = societyDisplayName(agent, assistantName);useEffect(() => {setAppearanceOpen(false);@@ -110,6 +99,7 @@ export function OptionsRail({ agent, onRetired, sample = false, width }: Optionsconst page = stack.page;const tabLabel = (id: PaneTab) => t(`society.agent_pane.tab_${id}`);+ const secondary = !PRIMARY_TABS.includes(tab);return (<aside@@ -122,38 +112,35 @@ export function OptionsRail({ agent, onRetired, sample = false, width }: Options<PaneHeaderagent={agent}sample={sample}- name={societyDisplayName(agent, assistantName)}+ name={name}onLook={() => setAppearanceOpen(true)}onShare={() => setShareOpen(true)}onRetired={onRetired}+ onClose={pane?.close}/><Tabs.Root value={tab} onValueChange={(value) => choose(value as PaneTab)} className="flex min-h-0 flex-1 flex-col"><Tabs.List className="ap-tabs" aria-label={t("society.agent_pane.tabs")}>- {available.map((id) => {- const Icon = TAB_ICONS[id];- return (- <Tabs.Trigger- key={id}- value={id}- className="ap-tab"- aria-label={tabLabel(id)}- title={tabLabel(id)}- data-testid={`agent-pane-tab-${id}`}- >- <Icon className="h-3.5 w-3.5 shrink-0" aria-hidden />- <span className="ap-tab-label">{tabLabel(id)}</span>- {id === "memory" && pending > 0 ? <span className="ap-tab-badge" aria-hidden /> : null}- </Tabs.Trigger>- );- })}+ {PRIMARY_TABS.map((id) => (+ <Tabs.Trigger key={id} value={id} className="ap-tab" data-testid={`agent-pane-tab-${id}`}>+ {tabLabel(id)}+ {id === "memory" && pending > 0 ? <span className="ap-tab-badge" aria-hidden /> : null}+ </Tabs.Trigger>+ ))}</Tabs.List>- {page ? (+ {page || secondary ? (<div className="ap-sub" data-testid="agent-pane-subpage">- <button type="button" className="ap-icon-btn" onClick={stack.back} aria-label={t("society.agent_pane.back")} title={t("society.agent_pane.back")} data-testid="agent-pane-back">+ <button+ type="button"+ className="ap-icon-btn"+ onClick={page ? stack.back : () => choose("overview")}+ aria-label={t("society.agent_pane.back")}+ title={t("society.agent_pane.back")}+ data-testid="agent-pane-back"+ ><ChevronLeft className="h-4 w-4" aria-hidden /></button>- <span className="truncate">{page.title}</span>+ <span className="truncate">{page ? page.title : tabLabel(tab)}</span></div>) : null}{page ? (@@ -181,7 +168,8 @@ export function OptionsRail({ agent, onRetired, sample = false, width }: OptionsclassName={cn("min-h-0 flex-1 flex-col outline-none", active ? "flex" : "hidden")}>{id === "overview" ? (- <OverviewTab key={agent.agentId} agent={agent} sample={sample} queue={queue.data} onTab={choose} onPage={stack.push} />+ <OverviewTab key={agent.agentId} agent={agent} sample={sample} queue={queue.data} onTab={choose} onPage={stack.push}+ onModelSavingChange={onModelSavingChange} />) : id === "tools" ? (<ToolsTab key={agent.agentId} agent={agent} sample={sample} />) : id === "memory" ? (@@ -222,6 +210,7 @@ function PaneHeader({onLook,onShare,onRetired,+ onClose,}: {agent: SocietyAgent;sample: boolean;@@ -229,10 +218,12 @@ function PaneHeader({onLook: () => void;onShare: () => void;onRetired: () => void;+ onClose?: () => void;}) {const t = useT();const lead = agent.tier === "lead";const setPaused = useSetAgentPaused();+ const update = useUpdateAgentConfig();const [more, setMore] = useState(false);const [busy, setBusy] = useState(false);const moreRef = useRef<HTMLDivElement>(null);@@ -273,56 +264,84 @@ function PaneHeader({return (<header className="ap-head">- <span className="ap-avatar">- <AgentSwatch agent={agent} size={30} />- </span>- <div className="min-w-0 flex-1">- <h2 className="ap-name" title={name}>{name}</h2>- <div className="ap-meta">- <span className="ap-dot" data-state={agent.state} aria-hidden />- <span className="shrink-0">{t(`society.state.${agent.state}`)}</span>- {agent.title && agent.title !== name ? <span className="truncate">· {agent.title}</span> : null}- </div>- </div>- <button type="button" className="ap-icon-btn" onClick={onLook} aria-label={t("society.companion.appearance")} title={t("society.companion.appearance")} data-testid="edit-agent-appearance">- <Palette className="h-4 w-4" aria-hidden />- </button>- {/* The lead is every install's own assistant and sample rows are not real agents: neither is shareable. */}- {!lead && !sample ? (- <button type="button" className="ap-icon-btn" onClick={onShare} aria-label={t("society.share.cta")} title={t("society.share.cta_hint")} data-testid="share-agent">- <Share2 className="h-4 w-4" aria-hidden />- </button>- ) : null}- <div ref={moreRef} className="relative">- <button- ref={triggerRef}- type="button"- className="ap-icon-btn"- aria-label={t("society.card.options_more")}- aria-expanded={more}- aria-haspopup="menu"- onClick={() => setMore((v) => !v)}- data-testid="agent-card-options-more"- >- <MoreHorizontal className="h-4 w-4" aria-hidden />- </button>- {more ? (- <div role="menu" className="ap-menu shadow-float">- {!lead ? (- <>+ <div className="ap-head-actions">+ <div ref={moreRef} className="relative">+ <button+ ref={triggerRef}+ type="button"+ className="ap-round-btn"+ aria-label={t("society.card.options_more")}+ title={t("society.card.options_more")}+ aria-expanded={more}+ aria-haspopup="menu"+ onClick={() => setMore((v) => !v)}+ data-testid="agent-card-options-more"+ >+ <MoreHorizontal className="h-4 w-4" aria-hidden />+ </button>+ {more ? (+ <div role="menu" className="ap-menu shadow-float">+ <button type="button" role="menuitem" className="ap-menu-item" data-testid="edit-agent-appearance"+ onClick={() => { setMore(false); onLook(); }}>+ {t("society.companion.appearance")}+ </button>+ {/* The lead is every install's own assistant and sample rows are not real agents: neither is shareable. */}+ {!lead && !sample ? (+ <button type="button" role="menuitem" className="ap-menu-item" data-testid="share-agent" title={t("society.share.cta_hint")}+ onClick={() => { setMore(false); onShare(); }}>+ {t("society.share.cta")}+ </button>+ ) : null}+ {!lead ? (<button type="button" role="menuitem" className="ap-menu-item" disabled={busy} onClick={() => void togglePause()} data-testid="agent-pane-pause">- {paused ? <Play className="h-3.5 w-3.5" aria-hidden /> : <Pause className="h-3.5 w-3.5" aria-hidden />}{paused ? t("society.card.action_resume") : t("society.card.action_pause")}</button>- <div className="ap-menu-sep" role="separator" />- </>- ) : null}- <div className="p-2">- <RetireButton agent={agent} onRetired={onRetired} variant="rail" />+ ) : null}+ <div className="ap-menu-sep" role="separator" />+ <RetireButton agent={agent} onRetired={onRetired} variant="menu" /></div>- </div>+ ) : null}+ </div>+ {onClose ? (+ <button type="button" className="ap-round-btn" onClick={onClose} aria-label={t("society.agent_pane.close")}+ title={t("society.agent_pane.close")} data-testid="agent-pane-close">+ <X className="h-4 w-4" aria-hidden />+ </button>) : null}</div>+ <span className="ap-avatar">+ <AgentSwatch agent={agent} size={72} />+ </span>+ {/* Name and role are edited in place, right where they are read. */}+ <h2 className="ap-name" title={lead ? t("society.agent_pane.lead_name_hint") : name}>+ {lead || sample ? name : (+ <InlineEdit+ value={agent.name}+ label={t("society.agent_pane.rename")}+ maxLength={40}+ className="ap-head-edit"+ testId="agent-pane-name"+ onSave={async (next) => {+ if (!next) throw new Error(t("society.agent_pane.name_required"));+ await update(agent, { name: next });+ }}+ />+ )}+ </h2>+ <div className="ap-meta">+ {paused ? <span className="block">{t("society.state.paused")}</span> : null}+ {sample || lead ? (agent.title && agent.title !== name ? <span>{agent.title}</span> : null) : <InlineEdit+ value={agent.title}+ label={t("society.agent_pane.edit_role")}+ placeholder={t("society.agent_pane.role_placeholder")}+ maxLength={120}+ className="ap-head-edit"+ testId="agent-pane-role"+ onSave={async (title) => {+ await update(agent, { title });+ }}+ />}+ </div></header>);}diff --git a/dodaios/ui/web/frontend/src/components/society/card/ProviderVerification.tsx b/dodaios/ui/web/frontend/src/components/society/card/ProviderVerification.tsxindex c183c318cd..02a360a54a 100644--- a/dodaios/ui/web/frontend/src/components/society/card/ProviderVerification.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/ProviderVerification.tsx@@ -22,10 +22,10 @@ export function ProviderVerification({ taskId, provider, audience = "", serviceA};return <div className="space-y-2">{provider === "gmail" ? <>- <label className="block text-[11px]">{t("society.triggers.oidc_audience")}<input className={field} value={aud} onChange={(e) => setAud(e.target.value)} /></label>- <label className="block text-[11px]">{t("society.triggers.service_account")}<input className={field} value={account} onChange={(e) => setAccount(e.target.value)} /></label>- </> : <label className="block text-[11px]">{t("society.triggers.provider_secret")}<input className={field} type="password" autoComplete="off" placeholder={configured ? t("society.triggers.stored") : ""} value={secret} onChange={(e) => setSecret(e.target.value)} /></label>}- <button type="button" className="rounded border border-border px-2 py-1 text-[11px] hover:bg-secondary disabled:opacity-50" disabled={busy || (provider !== "gmail" && !secret)} onClick={() => void save()}>{t("society.triggers.save_connection")}</button>- {message && <p role="status" className="text-[11px]">{message}</p>}+ <label className="block text-xs">{t("society.triggers.oidc_audience")}<input className={field} value={aud} onChange={(e) => setAud(e.target.value)} /></label>+ <label className="block text-xs">{t("society.triggers.service_account")}<input className={field} value={account} onChange={(e) => setAccount(e.target.value)} /></label>+ </> : <label className="block text-xs">{t("society.triggers.provider_secret")}<input className={field} type="password" autoComplete="off" placeholder={configured ? t("society.triggers.stored") : ""} value={secret} onChange={(e) => setSecret(e.target.value)} /></label>}+ <button type="button" className="rounded border border-border px-2 py-1 text-xs hover:bg-secondary disabled:opacity-50" disabled={busy || (provider !== "gmail" && !secret)} onClick={() => void save()}>{t("society.triggers.save_connection")}</button>+ {message && <p role="status" className="text-xs">{message}</p>}</div>;}diff --git a/dodaios/ui/web/frontend/src/components/society/card/RetireButton.tsx b/dodaios/ui/web/frontend/src/components/society/card/RetireButton.tsxindex 326730bdca..b0feda6876 100644--- a/dodaios/ui/web/frontend/src/components/society/card/RetireButton.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/RetireButton.tsx@@ -40,7 +40,8 @@ export interface RetireButtonProps {* tooltip. `rail` is the chat face's options column, which has room for the* sentence explaining what the button does.*/- variant?: "bar" | "rail";+ /** "menu": a plain text row for the details pane's "…" menu. */+ variant?: "bar" | "rail" | "menu";}export function RetireButton({ agent, onRetired, variant = "bar" }: RetireButtonProps) {@@ -71,8 +72,8 @@ export function RetireButton({ agent, onRetired, variant = "bar" }: RetireButton}, [armed]);if (isLead) {- if (variant === "rail") {- return <p className="text-xs text-muted-foreground">{t("society.card.retire_lead_blocked")}</p>;+ if (variant === "rail" || variant === "menu") {+ return <p className={variant === "menu" ? "px-2.5 py-2 text-[13px] leading-snug text-muted-foreground" : "text-xs text-muted-foreground"}>{t("society.card.retire_lead_blocked")}</p>;}return (<button@@ -125,6 +126,19 @@ export function RetireButton({ agent, onRetired, variant = "bar" }: RetireButton</button>);+ if (variant === "menu") {+ return (+ <>+ <button type="button" role="menuitem" className="ap-menu-item text-destructive" data-armed={armed || undefined}+ disabled={busy} title={hint} onClick={() => void run()} data-testid="agent-card-retire">+ {label}+ </button>+ {armed ? <p className="px-2.5 pb-1.5 text-[13px] leading-snug text-muted-foreground">{hint}</p> : null}+ {error ? <p role="alert" className="px-2.5 pb-1.5 text-[13px] text-destructive">{error}</p> : null}+ </>+ );+ }+if (variant === "bar") {return (<>diff --git a/dodaios/ui/web/frontend/src/components/society/card/RoutineChat.tsx b/dodaios/ui/web/frontend/src/components/society/card/RoutineChat.tsxindex 01ffa290e5..ad25a05e4e 100644--- a/dodaios/ui/web/frontend/src/components/society/card/RoutineChat.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/RoutineChat.tsx@@ -30,9 +30,9 @@ export default function RoutineChat({ target, onClose, face }: {<header className="flex shrink-0 flex-wrap items-center gap-x-4 gap-y-2 border-b border-border pb-3"><button type="button" className="flex items-center gap-1 text-[12px] text-muted-foreground hover:text-foreground" onClick={onClose}><ArrowLeft size={14} />{t("society.routine_detail.back_to_agent")}</button><div className="min-w-0 flex-1"><h3 className="truncate text-sm font-medium">{target.title}</h3>- <time className="text-[11px] text-muted-foreground" dateTime={new Date(target.timestamp).toISOString()}>{new Date(target.timestamp).toLocaleString(locale)}</time>+ <time className="text-xs text-muted-foreground" dateTime={new Date(target.timestamp).toISOString()}>{new Date(target.timestamp).toLocaleString(locale)}</time></div>- <span className="text-[11px] text-muted-foreground">{t(target.kind === "conversation" ? "society.conversations.badge" : "society.routine_detail.background_chat")}</span>+ <span className="text-xs text-muted-foreground">{t(target.kind === "conversation" ? "society.conversations.badge" : "society.routine_detail.background_chat")}</span></header>{target.legacy ? <HistoricalExecution target={target} /> : <LiveExecution sessionId={target.sessionId} conversation={target.kind === "conversation"} face={face} />}</section>;diff --git a/dodaios/ui/web/frontend/src/components/society/card/RoutineSeatPicker.tsx b/dodaios/ui/web/frontend/src/components/society/card/RoutineSeatPicker.tsxindex 321b2ffaf1..3ea41f10d3 100644--- a/dodaios/ui/web/frontend/src/components/society/card/RoutineSeatPicker.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/RoutineSeatPicker.tsx@@ -16,7 +16,7 @@ export interface RoutineSeat {export const EMPTY_SEAT: RoutineSeat = { provider: "", model: "", effort: "", account_id: "" };const field = "w-full rounded-lg border border-border bg-background px-3 py-2 text-[12px] text-foreground";-const miniLabel = "block space-y-1 text-[11px] text-muted-foreground";+const miniLabel = "block space-y-1 text-xs text-muted-foreground";function kindSuffix(kind: string, t: (key: string) => string): string {try {@@ -48,11 +48,11 @@ export function RoutineSeatPicker({ seat, onChange, disabled }: {return (<div className="space-y-2 rounded-xl border border-border p-3"><div className="flex items-center justify-between gap-2">- <h4 className="text-[11px] text-muted-foreground">{label("model")}</h4>+ <h4 className="text-xs text-muted-foreground">{label("model")}</h4>{seat.provider ? (<buttontype="button"- className="text-[11px] text-muted-foreground underline disabled:opacity-50"+ className="text-xs text-muted-foreground underline disabled:opacity-50"disabled={disabled}onClick={() => onChange({ ...EMPTY_SEAT })}>diff --git a/dodaios/ui/web/frontend/src/components/society/card/RuntimePicker.tsx b/dodaios/ui/web/frontend/src/components/society/card/RuntimePicker.tsxindex d6f100f2a2..e08ed68aa7 100644--- a/dodaios/ui/web/frontend/src/components/society/card/RuntimePicker.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/RuntimePicker.tsx@@ -171,7 +171,7 @@ export function RuntimeChoice({ value, onChange, disabled = false }: {<RuntimeMark runtime={runtime} label={label} />{label}</span>- <span id={`${id}-state-${runtime}`} className="inline-flex items-center gap-1 text-[11px] leading-snug">+ <span id={`${id}-state-${runtime}`} className="inline-flex items-center gap-1 text-xs leading-snug">{state === "setting_up" ? <Loader2 className="size-3 animate-spin" aria-hidden /> : null}{t(state === nulldiff --git a/dodaios/ui/web/frontend/src/components/society/card/SourceControls.tsx b/dodaios/ui/web/frontend/src/components/society/card/SourceControls.tsxindex 4de7f4a458..e04cce2652 100644--- a/dodaios/ui/web/frontend/src/components/society/card/SourceControls.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/SourceControls.tsx@@ -33,27 +33,27 @@ function SourceInputs({ taskId, source }: { taskId: string; source: Source }) {} catch (err) { setNotice(err instanceof Error ? err.message : String(err)); }finally { setBusy(false); }};- const button = "rounded border border-border px-2 py-1 text-[11px] hover:bg-secondary disabled:opacity-50";+ const button = "rounded border border-border px-2 py-1 text-xs hover:bg-secondary disabled:opacity-50";const field = "w-full rounded border border-border bg-background p-1 text-[12px] text-foreground";- if (source.kind === "chat" || source.kind === "mcp" || source.kind === "workflow") return <span className="block text-[11px] text-muted-foreground">{label(`entry.${source.kind}`)}</span>;+ if (source.kind === "chat" || source.kind === "mcp" || source.kind === "workflow") return <span className="block text-xs text-muted-foreground">{label(`entry.${source.kind}`)}</span>;return <div className="mt-2 block space-y-2" data-testid="source-controls"><button type="button" className={button} onClick={() => setOpen((v) => !v)}>{label(listener ? "connection" : "input")}</button>{open && listener ? <>- <span className="block text-[11px]">{info.data?.status ? label(`state.${info.data.status}`) : label("loading")}</span>- {info.data?.detail && <span className="block text-[11px] text-muted-foreground">{info.data.detail}</span>}+ <span className="block text-xs">{info.data?.status ? label(`state.${info.data.status}`) : label("loading")}</span>+ {info.data?.detail && <span className="block text-xs text-muted-foreground">{info.data.detail}</span>}{source.kind !== "file" && <>- {["username", "password", "token"].map((key) => <label key={key} className="block text-[11px]">{label(key)}<input className={field} type={key === "username" ? "text" : "password"} autoComplete="off" value={credentials[key] ?? ""} onChange={(e) => setCredentials((v) => ({ ...v, [key]: e.target.value }))} placeholder={info.data?.credentials?.[key] ? label("stored") : ""} /></label>)}+ {["username", "password", "token"].map((key) => <label key={key} className="block text-xs">{label(key)}<input className={field} type={key === "username" ? "text" : "password"} autoComplete="off" value={credentials[key] ?? ""} onChange={(e) => setCredentials((v) => ({ ...v, [key]: e.target.value }))} placeholder={info.data?.credentials?.[key] ? label("stored") : ""} /></label>)}<button type="button" className={button} disabled={busy} onClick={() => void send("source-connection", "PUT", credentials)}>{label("save_connection")}</button>{["kafka", "rabbitmq", "mqtt", "redis"].includes(source.kind) && <button type="button" disabled={busy || info.data?.install?.status === "running"} className={button} onClick={() => void send("source-connection/install", "POST")}>{label(info.data?.install?.status === "running" ? "installing" : "install_support")}</button>}</>}</> : null}{open && !listener ? <form onSubmit={(event) => { event.preventDefault(); void send("invoke", "POST", { payload: values }); }} className="space-y-2">- {Object.entries(source.form_fields ?? {}).map(([name, spec]) => <label className="block text-[11px]" key={name}>{spec.label}+ {Object.entries(source.form_fields ?? {}).map(([name, spec]) => <label className="block text-xs" key={name}>{spec.label}{spec.kind === "choice" ? <BrandedSelect className={field} value={String(values[name] ?? "")} onValueChange={(value) => setValues((v) => ({ ...v, [name]: value }))} ariaLabel={spec.label} options={[{ value: "", label: "—" }, ...spec.choices.map((choice) => ({ value: choice, label: choice }))]} /> : <input className={field} type={spec.kind === "boolean" ? "checkbox" : spec.kind === "number" ? "number" : "text"} required={spec.required && spec.kind !== "boolean"} onChange={(e) => setValues((v) => ({ ...v, [name]: spec.kind === "boolean" ? e.target.checked : spec.kind === "number" ? (e.target.value === "" ? null : Number(e.target.value)) : e.target.value }))} />}</label>)}<button type="submit" className={button} disabled={busy}>{label("run")}</button></form> : null}- {notice && <span role="status" className="block text-[11px]">{notice}</span>}- {info.error && <span role="alert" className="block text-[11px] text-destructive">{label("connection_unavailable")}</span>}+ {notice && <span role="status" className="block text-xs">{notice}</span>}+ {info.error && <span role="alert" className="block text-xs text-destructive">{label("connection_unavailable")}</span>}</div>;}diff --git a/dodaios/ui/web/frontend/src/components/society/card/TriggerBuilder.tsx b/dodaios/ui/web/frontend/src/components/society/card/TriggerBuilder.tsxindex 3dda87ef1b..bc227629af 100644--- a/dodaios/ui/web/frontend/src/components/society/card/TriggerBuilder.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/TriggerBuilder.tsx@@ -93,7 +93,7 @@ export function TriggerBuilder({ onChange, initialValue, timeOnly = false }: {}, [onChange, value, initialValue]);const field = "w-full rounded-md border border-border bg-background px-2 py-1.5 text-[12px] text-foreground";const label = (key: string) => t(`society.triggers.${key}`);- const input = (name: string, current: string, set: (v: string) => void, type = "text") => <label className="block text-[11px] text-muted-foreground">{label(name)}<input type={type} aria-label={label(name)} value={current} onChange={(e) => set(e.target.value)} className={field} /></label>;+ const input = (name: string, current: string, set: (v: string) => void, type = "text") => <label className="block text-xs text-muted-foreground">{label(name)}<input type={type} aria-label={label(name)} value={current} onChange={(e) => set(e.target.value)} className={field} /></label>;return <div className="space-y-2" data-testid="trigger-builder">{!timeOnly && <BrandedSelect value={group} onValueChange={(next) => { setGroup(next as Group); setKind(TRIGGER_GROUPS[next as Group][0]); }} options={Object.keys(TRIGGER_GROUPS).map((key) => ({ value: key, label: label(`groups.${key}`) }))} testId="routine-trigger-group" ariaLabel={label("group")} />}<BrandedSelect value={kind} onValueChange={(next) => { setKind(next); if (next.startsWith("workflow_")) { setUpstreamKind("workflow"); setUpstreamId(""); } }} options={TRIGGER_GROUPS[group].filter((key) => !timeOnly || ["every", "calendar", "cron"].includes(key)).map((key) => ({ value: key, label: label(`kinds.${key}`) }))} testId="agent-routines-kind" ariaLabel={label("kind")} />@@ -101,13 +101,13 @@ export function TriggerBuilder({ onChange, initialValue, timeOnly = false }: {{kind === "calendar" && input("time", time, setTime, "time")}{kind === "cron" && input("expression", expression, setExpression)}{(kind === "calendar" || kind === "cron") && input("timezone", timezone, setTimezone)}- {value && ["every", "calendar", "cron", "after_delay"].includes(kind) && <p data-testid="trigger-preview" aria-live="polite" className="text-[11px] leading-snug text-foreground-secondary">{humanSchedule(initialValue?.type === value.type ? { ...initialValue, ...value } : value, { t, locale })}</p>}+ {value && ["every", "calendar", "cron", "after_delay"].includes(kind) && <p data-testid="trigger-preview" aria-live="polite" className="text-xs leading-snug text-foreground-secondary">{humanSchedule(initialValue?.type === value.type ? { ...initialValue, ...value } : value, { t, locale })}</p>}{kind === "at_time" && input("date", date, setDate, "datetime-local")}- {group === "stream" && <>{input("endpoint", endpoint, setEndpoint)}{kind !== "sse" && <>{input("topic", topic, setTopic)}{input("consumer_group", consumerGroup, setConsumerGroup)}</>}<p className="text-[11px] text-muted-foreground">{label("credentials_hint")}</p></>}- {kind === "file" && <>{input("path", path, setPath)}{input("pattern", pattern, setPattern)}<label className="text-[11px]"><input type="checkbox" checked={recursive} onChange={(e) => setRecursive(e.target.checked)} /> {label("recursive")}</label></>}+ {group === "stream" && <>{input("endpoint", endpoint, setEndpoint)}{kind !== "sse" && <>{input("topic", topic, setTopic)}{input("consumer_group", consumerGroup, setConsumerGroup)}</>}<p className="text-xs text-muted-foreground">{label("credentials_hint")}</p></>}+ {kind === "file" && <>{input("path", path, setPath)}{input("pattern", pattern, setPattern)}<label className="text-xs"><input type="checkbox" checked={recursive} onChange={(e) => setRecursive(e.target.checked)} /> {label("recursive")}</label></>}{(kind === "on_event" || kind === "event_hook") && input("event_name", eventName, setEventName)}- {kind === "form" && <label className="block text-[11px]">{label("form_fields")}<textarea className={field} aria-label={label("form_fields")} value={fields} onChange={(e) => setFields(e.target.value)} rows={4} /></label>}+ {kind === "form" && <label className="block text-xs">{label("form_fields")}<textarea className={field} aria-label={label("form_fields")} value={fields} onChange={(e) => setFields(e.target.value)} rows={4} /></label>}{(kind === "workflow" || kind.startsWith("workflow_")) && <><BrandedSelect ariaLabel={label("workflow")} value={upstreamKind} onValueChange={(next) => { setUpstreamKind(next); setUpstreamId(""); }} options={[{ value: "task", label: label("routine") }, { value: "workflow", label: label("workflow") }]} /><BrandedSelect value={upstreamId} onValueChange={setUpstreamId} options={(upstream.data ?? []).map((row) => ({ value: row.id, label: row.title ?? row.name ?? row.id }))} ariaLabel={label("upstream")} />{kind === "workflow" && <BrandedSelect ariaLabel={label("when.succeeded")} value={when} onValueChange={setWhen} options={["succeeded", "failed", "activated"].map((key) => ({ value: key, label: label(`when.${key}`) }))} />}{upstream.error ? <p role="alert">{label("upstream_unavailable")}</p> : null}</>}- {!['every', 'calendar', 'cron', 'after_delay', 'at_time', 'on_event'].includes(kind) && <label className="block text-[11px]">{label("filters")}<textarea className={field} value={filters} onChange={(e) => setFilters(e.target.value)} aria-label={label("filters")} rows={2} /></label>}+ {!['every', 'calendar', 'cron', 'after_delay', 'at_time', 'on_event'].includes(kind) && <label className="block text-xs">{label("filters")}<textarea className={field} value={filters} onChange={(e) => setFilters(e.target.value)} aria-label={label("filters")} rows={2} /></label>}</div>;}diff --git a/dodaios/ui/web/frontend/src/components/society/card/WebhookConnection.tsx b/dodaios/ui/web/frontend/src/components/society/card/WebhookConnection.tsxindex 2a041275ed..6afd04bcb9 100644--- a/dodaios/ui/web/frontend/src/components/society/card/WebhookConnection.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/WebhookConnection.tsx@@ -18,9 +18,9 @@ function CopyButton({ label, copiedLabel, done, onCopy }: { label: string; copiefunction Row({ glyph, title, help, children }: { glyph: ReactNode; title: string; help: string; children: ReactNode }) {return <div className="space-y-1">- <div className="flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground">{glyph}{title}</div>+ <div className="flex items-center gap-1.5 text-xs font-medium text-muted-foreground">{glyph}{title}</div><div className="flex items-center gap-1 rounded-lg border border-border bg-background px-2 py-1">{children}</div>- <p className="text-[10.5px] leading-snug text-faint-foreground">{help}</p>+ <p className="text-xs leading-snug text-faint-foreground">{help}</p></div>;}@@ -69,8 +69,8 @@ export function WebhookConnection({ taskId }: { taskId: string }) {};if (!ready) return null;- const button = "inline-flex items-center gap-1.5 rounded-lg border border-border px-2.5 py-1 text-[11.5px] text-foreground transition-colors hover:bg-secondary disabled:opacity-50";- const value = "min-w-0 flex-1 truncate bg-transparent font-mono text-[11px] text-foreground focus:outline-none";+ const button = "inline-flex items-center gap-1.5 rounded-lg border border-border px-2.5 py-1 text-xs text-foreground transition-colors hover:bg-secondary disabled:opacity-50";+ const value = "min-w-0 flex-1 truncate bg-transparent font-mono text-xs text-foreground focus:outline-none";const href = connection ? new URL(connection.path, window.location.origin).href : "";const header = connection ? `Authorization: Bearer ${connection.token}` : "";return (@@ -97,11 +97,11 @@ export function WebhookConnection({ taskId }: { taskId: string }) {<span className="flex flex-wrap gap-2"><button type="button" className={button} disabled={busy} onClick={() => void load(true)}><RotateCw size={12} />{t("society.hooks.rotate")}</button></span>- <span className="block text-[10.5px] leading-snug text-faint-foreground">{t("society.hooks.auth")}</span>+ <span className="block text-xs leading-snug text-faint-foreground">{t("society.hooks.auth")}</span></>}- <span className="block text-[10.5px] leading-snug text-faint-foreground">{t("society.hooks.remote")}</span>+ <span className="block text-xs leading-snug text-faint-foreground">{t("society.hooks.remote")}</span></>}- {error ? <span role="alert" className="block text-[11px] text-destructive">{error}</span> : null}+ {error ? <span role="alert" className="block text-xs text-destructive">{error}</span> : null}</div>);}diff --git a/dodaios/ui/web/frontend/src/components/society/card/headerModelSlot.ts b/dodaios/ui/web/frontend/src/components/society/card/headerModelSlot.tsindex c2fe2db8cb..409218bfee 100644--- a/dodaios/ui/web/frontend/src/components/society/card/headerModelSlot.ts+++ b/dodaios/ui/web/frontend/src/components/society/card/headerModelSlot.ts@@ -1,10 +1,10 @@import { createContext, useContext } from "react";/**- * Set when the chat header carries the agent's brain picker. The composer- * then leaves its own copy out and holds Send while the header saves a new- * model, exactly as it did while its own picker saved. Where no header- * provides it (team panes, older mounts) the composer keeps its picker.+ * Set when another surface beside the chat carries a brain picker of its own+ * (the details pane's Details tab). The composer keeps its own picker in its+ * "+" menu either way, and holds Send while the other picker saves a new+ * model, exactly as it does while its own picker saves.*/export interface HeaderModelSlot {saving: boolean;diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/MemoryTab.tsx b/dodaios/ui/web/frontend/src/components/society/card/pane/MemoryTab.tsxindex b83937258f..4eea3f95c2 100644--- a/dodaios/ui/web/frontend/src/components/society/card/pane/MemoryTab.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/MemoryTab.tsx@@ -6,7 +6,7 @@* the agent can walk the person through the list in conversation instead.*/import { useState } from "react";-import { BookUser, Check, FileText, MessageSquare, NotebookPen, Sparkles, X } from "lucide-react";+import { Check, MessageSquare, X } from "lucide-react";import { useRunLocale } from "@/components/runs/format";import { useLocaleChunk, useT } from "@/i18n";@@ -106,7 +106,6 @@ export function MemoryTab({{files.map((file) => (<AnatomyRowkey={file.path}- icon={file.name === "USER.md" ? BookUser : file.name === "MEMORY.md" ? NotebookPen : file.kind === "skills" ? Sparkles : FileText}label={file.name === "USER.md" ? t("society.profile_card.user_book") : file.name === "MEMORY.md" ? t("society.profile_card.memory_book") : file.name}detail={file.path}onOpen={() => onPage({ id: `file:${file.path}`, title: file.name })}@@ -185,7 +184,7 @@ function ReviewRow({ agentId, item }: { agentId: string; item: ReviewItem }) {<div className="flex items-center justify-between gap-2"><span className="ap-review-kind">{kind}</span>{item.created_ms ? (- <time className="text-[11px] text-muted-foreground" dateTime={new Date(item.created_ms).toISOString()}>+ <time className="text-[12px] text-muted-foreground" dateTime={new Date(item.created_ms).toISOString()}>{new Date(item.created_ms).toLocaleDateString(locale, { day: "2-digit", month: "short" })}</time>) : null}diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/OverviewTab.tsx b/dodaios/ui/web/frontend/src/components/society/card/pane/OverviewTab.tsxindex 2ba7a2e828..d60934c7a8 100644--- a/dodaios/ui/web/frontend/src/components/society/card/pane/OverviewTab.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/OverviewTab.tsx@@ -1,39 +1,36 @@/**- * The pane's first tab: who this agent is, what it runs on, and its anatomy- * in six counted rows that each open where that part is managed. A short list- * of next steps sits on top while there is something worth doing; each one- * can be dismissed for good.+ * The pane's Details tab, as a few calm cards: its instructions, what it+ * thinks with and how freely it may act, its routines with a switch each,+ * rows to everything else, and its record in one line. A short list of next+ * steps sits on top while there is something worth doing; each one can be+ * dismissed for good. Name and role are edited in the pane header.*/-import { useMemo, useState } from "react";-import {- BookOpen,- CalendarClock,- FolderOpen,- Lightbulb,- Sparkles,- Wrench,- X,-} from "lucide-react";+import { useEffect, useMemo, useState } from "react";+import { X } from "lucide-react";-import { ProviderLogo } from "@/components/providers/ProviderLogo";+import { AgentChatStoreProvider } from "@/components/agentchat/AgentChatStoreContext";import { useRunLocale } from "@/components/runs/format";+import { Switch } from "@/components/ui/switch";import { useLocaleChunk, useT } from "@/i18n";-import { societyDisplayName } from "@/lib/societyDisplayName";+import { setTaskEnabled } from "@/lib/tasksApi";import { resolveToolBrand } from "@/lib/toolBrand";-import { useEventStore } from "@/store/events";+import { useAgentChatStore } from "@/store/agentChat";-import { RuntimeMark } from "../../RuntimeBadge";-import { useAgentRoutines, useAgentSkills } from "../../cardData";-import { useSocietyCapabilities, useUpdateAgentConfig, type SocietyAgent } from "../../data";-import { useAgentKnowledge } from "../AgentKnowledge";-import { LeadBrain } from "../LeadSections";+import { displayRoutineTitle, useAgentRoutines, useAgentSkills, type LiveRoutine } from "../../cardData";+import { useSocietyCapabilities, type SocietyAgent } from "../../data";+import { useSocietyChatStore } from "../../chat/AgentChatPanel";+import { AgentModelPicker } from "../../chat/AgentModelPicker";+import { ApprovalModePicker } from "../AgentHeader";+import { humanSchedule } from "../routines/humanSchedule";import { useDismissedSuggestions, type PanePage, type PaneTab } from "./paneState";import type { ReviewQueue } from "./reviewQueue";-import { AnatomyRow, InlineEdit, PaneHint, PaneSection } from "./ui";+import { AnatomyRow, PaneHint, PaneSection } from "./ui";/** More lines than this and the instructions preview fades into "open to read all". */const PREVIEW_LINES = 5;const MAX_SUGGESTIONS = 3;+/** Routines listed with a switch; the Tasks tab has the rest. */+const MAX_ROUTINES = 5;export interface OverviewTabProps {agent: SocietyAgent;@@ -41,6 +38,8 @@ export interface OverviewTabProps {queue: ReviewQueue | undefined;onTab: (tab: PaneTab) => void;onPage: (page: PanePage) => void;+ /** Reports a model save in flight so the composer holds Send meanwhile. */+ onModelSavingChange?: (saving: boolean) => void;}interface Suggestion {@@ -49,29 +48,22 @@ interface Suggestion {go: () => void;}-export function OverviewTab({ agent, sample, queue, onTab, onPage }: OverviewTabProps) {+export function OverviewTab({ agent, sample, queue, onTab, onPage, onModelSavingChange }: OverviewTabProps) {const t = useT();useLocaleChunk("society");const locale = useRunLocale();const lead = agent.tier === "lead";- const assistantName = useEventStore((s) => s.assistantName);- const update = useUpdateAgentConfig();- const knowledge = useAgentKnowledge(agent.agentId, sample);const skills = useAgentSkills(sample ? null : agent.agentId);const routines = useAgentRoutines(sample ? null : agent.agentId);const capabilities = useSocietyCapabilities(!sample && !lead);+ const busy = useSocietyChatStore((state) => state.busy && state.activeSessionId === agent.chatSessionId);const [dismissed, dismiss] = useDismissedSuggestions(agent.agentId);const [expanded, setExpanded] = useState(false);- const memoryFiles = (knowledge.data?.files ?? []).filter((f) => f.kind === "memory");- const learnedRules = knowledge.data?.learned_instructions ?? [];const skillCount = skills.data?.length ?? 0;const routineRows = routines.data ?? [];const routineCount = sample ? agent.routines.length : routineRows.length;- const nextRun = routineRows.map((r) => r.dueMs).filter((ms): ms is number => typeof ms === "number").sort((a, b) => a - b)[0];const pendingReview = queue?.total ?? 0;- // Proposals and share requests are decisions; notebook writes are not.- const decisions = (queue?.counts?.proposal ?? 0) + (queue?.counts?.memory_share ?? 0);const byId = useMemo(() => new Map((capabilities.data ?? []).map((c) => [c.id, c])), [capabilities.data]);const disconnected = agent.focus.filter((id) => byId.get(id)?.connected === false);@@ -122,74 +114,32 @@ export function OverviewTab({ agent, sample, queue, onTab, onPage }: OverviewTabconst spent = agent.stats.spentTodayUsd;const share = capped ? Math.min(1, spent / agent.dailyBudgetUsd) : 0;const lastActive = agent.stats.lastActiveMs- ? new Date(agent.stats.lastActiveMs).toLocaleDateString(locale, { day: "2-digit", month: "short" })+ ? new Date(agent.stats.lastActiveMs).toLocaleDateString(locale, { day: "numeric", month: "short" }): t("society.card.never");return (<div className="ap-body" data-testid="agent-pane-overview">{visible.length > 0 ? (- <PaneSection title={t("society.agent_pane.next_steps")} testId="agent-pane-suggestions">- <div className="flex flex-col gap-1.5">- {visible.map((s) => (- <div key={s.id} className="ap-suggest" data-testid={`agent-pane-suggestion-${s.id.split(":")[0]}`}>- <button type="button" className="ap-suggest-go" onClick={s.go}>- {s.text}- </button>- <button- type="button"- className="ap-icon-btn h-6 w-6"- aria-label={t("society.agent_pane.dismiss")}- title={t("society.agent_pane.dismiss")}- onClick={() => dismiss(s.id)}- >- <X className="h-3 w-3" aria-hidden />- </button>- </div>- ))}- </div>- </PaneSection>- ) : null}-- <PaneSection title={t("society.agent_pane.identity")}>- <div className="flex flex-col gap-1.5">- <div className="flex min-w-0 items-baseline gap-2">- <span className="w-14 shrink-0 truncate text-xs text-muted-foreground">{t("society.profile_card.name")}</span>- {lead ? (- <span className="truncate text-sm font-medium" title={t("society.agent_pane.lead_name_hint")}>- {societyDisplayName(agent, assistantName)}- </span>- ) : (- <InlineEdit- value={agent.name}- label={t("society.agent_pane.rename")}- maxLength={40}- disabled={sample}- className="text-sm font-medium"- testId="agent-pane-name"- onSave={async (name) => {- if (!name) throw new Error(t("society.agent_pane.name_required"));- await update(agent, { name });- }}- />- )}- </div>- <div className="flex min-w-0 items-baseline gap-2">- <span className="w-14 shrink-0 truncate text-xs text-muted-foreground">{t("society.agent_pane.role")}</span>- <InlineEdit- value={agent.title}- label={t("society.agent_pane.edit_role")}- placeholder={t("society.agent_pane.role_placeholder")}- maxLength={120}- disabled={sample || lead}- className="text-sm"- testId="agent-pane-role"- onSave={async (title) => {- await update(agent, { title });- }}- />- </div>+ <div className="flex flex-col gap-2" data-testid="agent-pane-suggestions" aria-label={t("society.agent_pane.next_steps")}>+ {visible.map((s) => (+ <div key={s.id} className="ap-suggest" data-testid={`agent-pane-suggestion-${s.id.split(":")[0]}`}>+ <button type="button" className="ap-suggest-go" onClick={s.go}>+ {s.text}+ </button>+ <button+ type="button"+ className="ap-round-btn"+ data-size="sm"+ aria-label={t("society.agent_pane.dismiss")}+ title={t("society.agent_pane.dismiss")}+ onClick={() => dismiss(s.id)}+ >+ <X className="h-3.5 w-3.5" aria-hidden />+ </button>+ </div>+ ))}</div>- </PaneSection>+ ) : null}<PaneSectiontitle={t("society.agent_pane.instructions")}@@ -217,132 +167,173 @@ export function OverviewTab({ agent, sample, queue, onTab, onPage }: OverviewTab)}</PaneSection>- <PaneSection title={t("society.agent_pane.runs_on")}>+ <PaneSection title={t("society.agent_pane.runs_on")} testId="agent-pane-seat">{lead ? (- <LeadBrain />+ <LeadModelRow />) : (- <div className="ap-seat" data-testid="agent-pane-seat">- <span className="ap-seat-pill" title={t(`society.runtime.${agent.runtime ?? "jarvis"}_hint`)}>- <RuntimeMark runtime={agent.runtime ?? "jarvis"} label={t(`society.runtime.${agent.runtime ?? "jarvis"}`)} />- <span className="truncate">{t(`society.runtime.${agent.runtime ?? "jarvis"}`)}</span>- </span>- {agent.provider ? (- <span className="ap-seat-pill">- <ProviderLogo providerId={agent.provider} label={agent.providerLabel || agent.provider} size="sm" />- <span className="truncate">{agent.providerLabel || agent.provider}</span>+ <div className="ap-card">+ <AgentChatStoreProvider store={useSocietyChatStore}>+ <AgentModelPicker key={agent.agentId} agent={agent} busy={busy} onSavingChange={(saving) => onModelSavingChange?.(saving)}+ triggerClassName="ap-line" />+ </AgentChatStoreProvider>+ {!sample ? <ApprovalModePicker agent={agent} /> : null}+ <div className="ap-line" data-static="true">+ <span className="ap-line-label">{t("society.agent_pane.runtime")}</span>+ <span className="ap-line-value" title={t(`society.runtime.${agent.runtime ?? "jarvis"}_hint`)}>+ {t(`society.runtime.${agent.runtime ?? "jarvis"}`)}+ {agent.executionEnvironment === "sandbox" ? ` · ${t("society.sandbox.code")}` : ""}</span>- ) : (- <span className="ap-seat-pill px-2">{t("society.card.default_brain")}</span>- )}- {agent.model ? <span className="truncate font-mono text-[11px]">{agent.model}</span> : null}- {agent.effort ? <span>· {agent.effort}</span> : null}- {agent.executionEnvironment === "sandbox" ? <span>· {t("society.sandbox.code")}</span> : null}+ </div></div>)}- {lead ? null : <PaneHint>{t("society.agent_pane.seat_hint")}</PaneHint>}</PaneSection>- <PaneSection title={t("society.agent_pane.anatomy")} testId="agent-pane-anatomy">- <div className="ap-rows">- <AnatomyRow- icon={BookOpen}- label={t("society.agent_pane.instructions")}- detail={- learnedRules.length- ? t("society.agent_pane.instructions_learned").replace("{0}", String(learnedRules.length))- : agent.description.trim() || lead- ? t("society.agent_pane.instructions_written")- : t("society.agent_pane.instructions_none")- }- onOpen={instructionsPage}- testId="agent-pane-row-instructions"- />+ {sample || routineRows.length > 0 ? (+ <PaneSection+ title={t("society.agent_pane.routines")}+ testId="agent-pane-routines"+ action={routineCount > MAX_ROUTINES ? (+ <button type="button" className="ap-link" onClick={() => onTab("tasks")}>{t("society.agent_pane.see_all")}</button>+ ) : undefined}+ >+ {sample ? (+ <PaneHint>{agent.routines.length ? agent.routines.map((r) => r.label).join(", ") : t("society.agent_pane.routines_none")}</PaneHint>+ ) : (+ <div className="ap-card">+ {routineRows.slice(0, MAX_ROUTINES).map((routine) => (+ <RoutineSwitchRow key={routine.id} routine={routine} locale={locale} onOpen={() => onTab("tasks")}+ onChanged={() => void routines.refetch()} />+ ))}+ </div>+ )}+ </PaneSection>+ ) : null}++ <PaneSection title={t("society.agent_pane.more")} testId="agent-pane-anatomy">+ <div className="ap-card"><AnatomyRow- icon={Lightbulb}- label={t("society.agent_pane.memory")}- detail={- pendingReview- ? t("society.agent_pane.memory_waiting").replace("{0}", String(pendingReview))- : t("society.agent_pane.memory_detail")- }- count={sample ? null : pendingReview > 0 ? pendingReview : memoryFiles.length}- attention={decisions > 0}- onOpen={() => onTab("memory")}- testId="agent-pane-row-memory"+ label={t("society.agent_pane.tab_tools")}+ detail={toolsDetail}+ attention={disconnected.length > 0}+ onOpen={() => onTab("tools")}+ testId="agent-pane-row-tools"/><AnatomyRow- icon={Sparkles}label={t("society.agent_pane.skills")}detail={skillCount ? (skills.data ?? []).map((s) => s.name).join(", ") : t("society.agent_pane.skills_none")}- count={sample ? null : skillCount}+ count={sample || !skillCount ? null : skillCount}onOpen={() => onPage({ id: "skills", title: t("society.agent_pane.skills") })}testId="agent-pane-row-skills"/><AnatomyRow- icon={CalendarClock}- label={t("society.agent_pane.routines")}- detail={- nextRun- ? t("society.agent_pane.routines_next").replace(- "{0}",- new Date(nextRun).toLocaleString(locale, { weekday: "short", hour: "2-digit", minute: "2-digit" }),- )- : routineCount- ? t("society.agent_pane.routines_idle")- : t("society.agent_pane.routines_none")- }- count={routineCount}- onOpen={() => onTab("tasks")}- testId="agent-pane-row-routines"- />- <AnatomyRow- icon={Wrench}- label={t("society.agent_pane.tools")}- detail={toolsDetail}- count={lead ? null : agent.focus.length || null}- attention={disconnected.length > 0}- onOpen={() => onTab("tools")}- testId="agent-pane-row-tools"- />- <AnatomyRow- icon={FolderOpen}label={t("society.agent_pane.files")}detail={agent.workspaceDir || `society/${agent.agentId}/`}onOpen={filesPage}testId="agent-pane-row-files"/>+ {lead ? (+ <AnatomyRow+ label={t("society.agent_pane.tab_history")}+ detail={t("society.agent_pane.history_detail")}+ onOpen={() => onTab("history")}+ testId="agent-pane-row-history"+ />+ ) : null}</div></PaneSection>- <PaneSection title={t("society.card.record")}>- <div className="ap-stats">- <div className="ap-stat">- <span className="ap-stat-label">{t("society.card.runs")}</span>- <span className="ap-stat-value">{agent.stats.runs}</span>- </div>- <div className="ap-stat">- <span className="ap-stat-label">{t("society.card.cost")}</span>- <span className="ap-stat-value">${agent.stats.totalCostUsd.toFixed(2)}</span>- </div>- <div className="ap-stat">- <span className="ap-stat-label">{t("society.card.last_active")}</span>- <span className="ap-stat-value">{lastActive}</span>- </div>- </div>- <div className="flex items-center justify-between gap-2 text-xs text-muted-foreground">- <span>{t("society.card.meter_today")}</span>- <span className="tabular-nums">- {capped- ? t("society.card.spent_of").replace("{0}", spent.toFixed(2)).replace("{1}", agent.dailyBudgetUsd.toFixed(2))- : `$${spent.toFixed(2)} · ${t("society.card.no_cap")}`}- </span>- </div>+ <div className="ap-record" data-testid="agent-pane-record">+ <p>+ {t("society.agent_pane.record_line")+ .replace("{0}", String(agent.stats.runs))+ .replace("{1}", `$${agent.stats.totalCostUsd.toFixed(2)}`)+ .replace("{2}", lastActive)}+ </p>+ <p>+ {t("society.card.meter_today")}:{" "}+ {capped+ ? t("society.card.spent_of").replace("{0}", spent.toFixed(2)).replace("{1}", agent.dailyBudgetUsd.toFixed(2))+ : `$${spent.toFixed(2)} · ${t("society.card.no_cap")}`}+ </p>{capped ? (<div className="ap-meter" data-full={share >= 1 ? "true" : undefined} role="img" aria-label={`${t("society.card.meter_today")}: $${spent.toFixed(2)}`}><span className="ap-meter-fill" style={{ width: `${Math.round(share * 100)}%` }} /></div>) : null}- </PaneSection>+ </div>+ </div>+ );+}++/** The lead thinks with the app's own model choice; shown here, changed in its chat. */+function LeadModelRow() {+ const t = useT();+ const draft = useAgentChatStore((s) => s.draft);+ const providerById = useAgentChatStore((s) => s.providerById);+ const loadCatalog = useAgentChatStore((s) => s.loadCatalog);+ const catalog = useAgentChatStore((s) => s.catalog);+ const catalogStale = useAgentChatStore((s) => s.catalogStale);+ useEffect(() => {+ if (!catalog || catalogStale) void loadCatalog();+ }, [catalog, catalogStale, loadCatalog]);+ const provider = providerById(draft.provider);+ return (+ <>+ <div className="ap-card">+ <div className="ap-line" data-static="true">+ <span className="ap-line-label">{t("society.chat.model")}</span>+ <span className="ap-line-value">+ {[provider?.label ?? t("society.card.default_brain"), draft.model || t("society.chat.model_provider_default")].join(" · ")}+ </span>+ </div>+ </div>+ <PaneHint>{t("society.card.brain_shared_hint")}</PaneHint>+ </>+ );+}++const ROUTINE_ACTIVE = ["scheduled", "active", "enabled", ""];+const ROUTINE_TERMINAL = ["completed", "failed", "cancelled", "interrupted"];++/** One routine: its name and schedule, and a switch that pauses or resumes every part of it. */+function RoutineSwitchRow({ routine, locale, onOpen, onChanged }: {+ routine: LiveRoutine; locale: string; onOpen: () => void; onChanged: () => void;+}) {+ const t = useT();+ const [busy, setBusy] = useState(false);+ const [problem, setProblem] = useState("");+ const title = displayRoutineTitle(routine.title);+ const on = routine.state !== "paused";+ const canToggle = routine.state === "paused" || (ROUTINE_ACTIVE.includes(routine.state) && routine.state !== "running");+ const sentence = humanSchedule(routine.trigger, { t, locale }) || routine.schedule;+ const toggle = async (next: boolean) => {+ setBusy(true);+ setProblem("");+ try {+ for (const member of routine.members ?? [routine]) {+ if (ROUTINE_TERMINAL.includes(member.state)) continue;+ if ((member.state === "paused") === next) await setTaskEnabled(member.id, next);+ }+ } catch (err) {+ setProblem(err instanceof Error ? err.message : String(err));+ } finally {+ setBusy(false);+ onChanged();+ }+ };+ return (+ <div className="ap-routine" data-testid={`agent-pane-routine-${routine.id}`}>+ <button type="button" className="min-w-0 flex-1 text-left" onClick={onOpen}>+ <span className="ap-row-label">{title}</span>+ <span className="ap-row-detail">{sentence}</span>+ {problem ? <span role="alert" className="ap-row-detail text-destructive">{problem}</span> : null}+ </button>+ <Switch+ checked={on}+ disabled={busy || !canToggle}+ onCheckedChange={(next) => void toggle(next)}+ aria-label={`${title}: ${t(on ? "society.agent_routines.list.pause" : "society.agent_routines.list.resume")}`}+ /></div>);}diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/SubPages.tsx b/dodaios/ui/web/frontend/src/components/society/card/pane/SubPages.tsxindex 0c4b80b338..c022bf26c0 100644--- a/dodaios/ui/web/frontend/src/components/society/card/pane/SubPages.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/SubPages.tsx@@ -114,13 +114,13 @@ export function FilesPage({ agent }: { agent: SocietyAgent }) {<div className="ap-row"><span className="min-w-0 flex-1"><span className="ap-row-label">{t("society.card.workspace")}</span>- <span className="block break-all font-mono text-[11px] text-muted-foreground">{agent.workspaceDir || `society/${agent.agentId}/workspace`}</span>+ <span className="block break-all font-mono text-[12px] text-muted-foreground">{agent.workspaceDir || `society/${agent.agentId}/workspace`}</span></span></div><div className="ap-row"><span className="min-w-0 flex-1"><span className="ap-row-label">{t("society.card.wiki")}</span>- <span className="block break-all font-mono text-[11px] text-muted-foreground">{agent.wikiNamespace || `society/${agent.agentId}/`}</span>+ <span className="block break-all font-mono text-[12px] text-muted-foreground">{agent.wikiNamespace || `society/${agent.agentId}/`}</span></span></div></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 d975ea885d..57e5188c46 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@@ -2,22 +2,23 @@* The agent pane: one calm column for everything about one agent.** Chrome is neutral; the agent's own colour (`--ap-agent`, set from its- * palette on the root) is the only decorative hue, and it marks just two- * things: the active tab and the avatar ring. Every other colour is a theme- * token, so light and dark both follow the app. Motion stays between 120 and- * 200 ms and switches off under reduced motion.+ * palette on the root) only rings the large avatar. Every other colour is a+ * theme token, so light and dark both follow the app. Content sits in soft+ * rounded cards with readable type (14px primary, 13px secondary, never+ * below 12px), buttons are fully round, and motion stays short and switches+ * off under reduced motion.*/.ap-root {- --ap-radius-sm: 6px;- --ap-radius: 10px;- --ap-radius-lg: 12px;+ --ap-radius-sm: 10px;+ --ap-radius: 14px;+ --ap-radius-lg: 18px;display: flex;height: 100%;min-height: 0;flex-direction: column;background: hsl(var(--sidebar));- border-left: 1px solid hsl(var(--border));+ border-left: 1px solid hsl(var(--border) / 0.6);color: hsl(var(--foreground));container: agent-pane / inline-size;}@@ -25,61 +26,110 @@/* ---------------------------------------------------------------- header */.ap-head {+ position: relative;display: flex;flex-shrink: 0;+ flex-direction: column;align-items: center;- gap: 10px;- padding: 12px 10px 8px 12px;+ gap: 4px;+ padding: 52px 20px 14px;+ text-align: center;+}++.ap-head-actions {+ position: absolute;+ top: 12px;+ right: 12px;+ display: flex;+ align-items: center;+ gap: 6px;}.ap-avatar {position: relative;flex-shrink: 0;- border-radius: 10px;- box-shadow: 0 0 0 1.5px hsl(var(--sidebar)), 0 0 0 3px var(--ap-agent, hsl(var(--border-strong)));+ margin-bottom: 8px;+ border-radius: 22px;+ box-shadow: 0 0 0 2px hsl(var(--sidebar)), 0 0 0 4px var(--ap-agent, hsl(var(--border-strong)));}.ap-name {- display: block;+ width: 100%;+ max-width: 100%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;- font-size: 14px;+ font-size: 18px;font-weight: 600;- letter-spacing: -0.01em;+ letter-spacing: -0.015em;color: hsl(var(--foreground-strong));}.ap-meta {- display: flex;- min-width: 0;- align-items: center;- gap: 6px;- font-size: 12px;+ width: 100%;+ max-width: 100%;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ font-size: 13px;+ line-height: 1.4;color: hsl(var(--muted-foreground));}-.ap-dot {- width: 7px;- height: 7px;+/* Name and role edit in place in the header, centred like the text they replace. */+.ap-head .ap-head-edit {+ justify-content: center;+ margin: 0 auto;+ font: inherit;+ color: inherit;+}+.ap-head input.ap-head-edit {+ width: 100%;+ text-align: center;+}++/* Round icon buttons: close, more, dismiss. */+.ap-round-btn {+ display: inline-flex;+ height: 34px;+ width: 34px;flex-shrink: 0;+ align-items: center;+ justify-content: center;border-radius: 999px;- background: hsl(var(--muted-foreground) / 0.45);+ background: hsl(var(--secondary));+ color: hsl(var(--muted-foreground));+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.5);+ transition: background-color 150ms ease, color 150ms ease, transform 100ms ease;+}+.ap-round-btn[data-size="sm"] {+ height: 26px;+ width: 26px;+ background: transparent;+ box-shadow: none;+}+.ap-round-btn:hover:not(:disabled) {+ background: hsl(var(--secondary-hover, var(--secondary)));+ color: hsl(var(--foreground));+}+.ap-round-btn:active:not(:disabled) { transform: scale(0.94); }+.ap-round-btn:focus-visible {+ outline: none;+ box-shadow: 0 0 0 2px hsl(var(--ring));}-.ap-dot[data-state="working"] { background: hsl(var(--success)); }-.ap-dot[data-state="waiting"] { background: hsl(var(--warning)); }-.ap-dot[data-state="paused"] { background: hsl(var(--muted-foreground) / 0.25); }+.ap-round-btn[aria-expanded="true"] { color: hsl(var(--foreground)); }+/* The small back button on a sub-page. */.ap-icon-btn {display: inline-flex;- height: 28px;- width: 28px;+ height: 30px;+ width: 30px;flex-shrink: 0;align-items: center;justify-content: center;- border-radius: var(--ap-radius-sm);+ border-radius: 999px;color: hsl(var(--muted-foreground));- transition: background-color 120ms ease, color 120ms ease;+ transition: background-color 150ms ease, color 150ms ease;}.ap-icon-btn:hover:not(:disabled) {background: hsl(var(--secondary));@@ -94,13 +144,14 @@.ap-menu {position: absolute;right: 0;- top: calc(100% + 4px);+ top: calc(100% + 6px);z-index: 20;- width: 232px;+ width: 220px;border: 1px solid hsl(var(--border));- border-radius: var(--ap-radius-lg);+ border-radius: var(--ap-radius);background: hsl(var(--popover));- padding: 4px;+ padding: 6px;+ text-align: left;/* Depth comes from .shadow-float on the element (index.css doctrine). */}@@ -110,28 +161,30 @@align-items: center;gap: 8px;border-radius: var(--ap-radius-sm);- padding: 7px 8px;+ padding: 8px 10px;text-align: left;- font-size: 13px;+ font-size: 14px;color: hsl(var(--foreground));}-.ap-menu-item:hover:not(:disabled) { background: hsl(var(--secondary)); }+.ap-menu-item:hover:not(:disabled),+.ap-menu-item:focus-visible { background: hsl(var(--secondary)); outline: none; }.ap-menu-item:disabled { opacity: 0.5; }.ap-menu-sep {- margin: 4px 2px;+ margin: 4px 6px;height: 1px;background: hsl(var(--border));}/* ------------------------------------------------------------------ tabs */+/* Plain words in a row; the open one sits on a soft round chip. */.ap-tabs {display: flex;flex-shrink: 0;align-items: center;+ justify-content: center;gap: 2px;- border-bottom: 1px solid hsl(var(--border));- padding: 0 8px;+ padding: 0 12px 10px;overflow-x: auto;scrollbar-width: none;}@@ -141,61 +194,44 @@position: relative;display: inline-flex;flex-shrink: 0;- height: 34px;- min-width: 30px;+ height: 30px;align-items: center;justify-content: center;- gap: 6px;- border-radius: var(--ap-radius-sm) var(--ap-radius-sm) 0 0;- padding: 0 7px;- font-size: 12.5px;+ border-radius: 999px;+ padding: 0 12px;+ font-size: 13px;font-weight: 500;color: hsl(var(--muted-foreground));- transition: color 120ms ease, background-color 120ms ease;+ transition: color 150ms ease, background-color 150ms ease;}.ap-tab:hover { color: hsl(var(--foreground)); }.ap-tab:focus-visible {outline: none;- box-shadow: inset 0 0 0 2px hsl(var(--ring));+ box-shadow: 0 0 0 2px hsl(var(--ring));+}+.ap-tab[data-state="active"] {+ background: hsl(var(--secondary));+ color: hsl(var(--foreground-strong));}-.ap-tab[data-state="active"] { color: hsl(var(--foreground-strong)); }-.ap-tab[data-state="active"]::after {- content: "";- position: absolute;- left: 6px;- right: 6px;- bottom: -1px;- height: 2px;- border-radius: 2px;- background: var(--ap-agent, hsl(var(--foreground-strong)));-}-.ap-tab-label { white-space: nowrap; }-.ap-tab[data-state="inactive"] .ap-tab-label { display: none; }.ap-tab-badge {position: absolute;- right: 3px;- top: 6px;+ right: 5px;+ top: 5px;width: 6px;height: 6px;border-radius: 999px;background: hsl(var(--warning));}-/* A wide pane has room for every label. */-@container agent-pane (min-width: 400px) {- .ap-tab[data-state="inactive"] .ap-tab-label { display: inline; }-}-/* ------------------------------------------------------- sub-page header */.ap-sub {display: flex;flex-shrink: 0;align-items: center;- gap: 4px;- border-bottom: 1px solid hsl(var(--border));- padding: 4px 8px;- font-size: 13px;+ gap: 6px;+ padding: 0 12px 6px 10px;+ font-size: 14px;font-weight: 600;color: hsl(var(--foreground-strong));}@@ -207,34 +243,35 @@min-height: 0;flex: 1;flex-direction: column;- gap: 18px;+ gap: 20px;overflow-y: auto;- padding: 12px 12px 16px;- animation: ap-in 160ms ease-out;+ padding: 6px 14px 20px;+ animation: ap-in 180ms ease-out;}-.ap-body[data-fill="true"] { gap: 12px; }+.ap-body[data-fill="true"] { gap: 14px; }@keyframes ap-in {- from { opacity: 0; transform: translateY(2px); }+ from { opacity: 0; transform: translateY(3px); }to { opacity: 1; transform: none; }}.ap-section { display: flex; flex-direction: column; gap: 8px; }.ap-section-head {display: flex;- min-height: 22px;+ min-height: 24px;align-items: center;justify-content: space-between;gap: 8px;+ padding: 0 4px;}.ap-section-title {- font-size: 11.5px;- font-weight: 600;- letter-spacing: 0.02em;+ font-size: 13px;+ font-weight: 500;color: hsl(var(--muted-foreground));}.ap-hint {- font-size: 12px;+ padding: 0 4px;+ font-size: 13px;line-height: 1.45;color: hsl(var(--muted-foreground));}@@ -243,15 +280,78 @@display: inline-flex;align-items: center;gap: 4px;- border-radius: var(--ap-radius-sm);- padding: 2px 6px;- font-size: 12px;+ border-radius: 999px;+ padding: 3px 10px;+ font-size: 13px;font-weight: 500;color: hsl(var(--muted-foreground));+ transition: background-color 150ms ease, color 150ms ease;}.ap-link:hover:not(:disabled) { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }.ap-link:disabled { opacity: 0.5; }+/* ----------------------------------------------------------------- cards */++/* One soft rounded surface holding a few rows; rows separate by space, not rules. */+.ap-card,+.ap-rows {+ display: flex;+ flex-direction: column;+ border-radius: var(--ap-radius-lg);+ background: hsl(var(--card));+ /* In light the card and the rail are nearly one white: a soft edge keeps the shape. */+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.55);+ padding: 4px;+}++.ap-field {+ display: flex;+ min-width: 0;+ min-height: 40px;+ align-items: center;+ gap: 12px;+ padding: 4px 10px;+}+.ap-field > .ap-line-label { width: 64px; }+.ap-field-value {+ min-width: 0;+ font-size: 14px;+ color: hsl(var(--foreground));+}++/* A label on the left, a value on the right: model, permissions, runtime. */+.ap-line {+ display: flex;+ width: 100%;+ min-width: 0;+ min-height: 42px;+ align-items: center;+ gap: 12px;+ border-radius: 14px;+ padding: 6px 12px;+ text-align: left;+ transition: background-color 150ms ease;+}+button.ap-line:hover:not(:disabled) { background: hsl(var(--secondary)); }+button.ap-line:focus-visible { outline: none; box-shadow: inset 0 0 0 2px hsl(var(--ring)); }+button.ap-line:disabled { opacity: 0.55; }+.ap-line-label {+ flex-shrink: 0;+ font-size: 14px;+ color: hsl(var(--foreground));+}+.ap-field .ap-line-label { font-size: 13px; color: hsl(var(--muted-foreground)); }+.ap-line-value {+ min-width: 0;+ margin-left: auto;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ text-align: right;+ font-size: 13px;+ color: hsl(var(--muted-foreground));+}+/* --------------------------------------------------------------- identity */.ap-inline {@@ -260,10 +360,10 @@max-width: 100%;align-items: center;border-radius: var(--ap-radius-sm);- margin: -2px -6px;- padding: 2px 6px;+ margin: -3px -8px;+ padding: 3px 8px;text-align: left;- transition: background-color 120ms ease;+ transition: background-color 150ms ease;}.ap-inline:hover:not(:disabled) { background: hsl(var(--secondary)); }.ap-inline:disabled { cursor: default; }@@ -271,80 +371,47 @@.ap-instructions {position: relative;- max-height: 7.6em;+ max-height: 7.4em;overflow: hidden;+ border-radius: var(--ap-radius-lg);+ background: hsl(var(--card));+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.55);+ padding: 12px 14px;white-space: pre-line;- font-size: 13px;- line-height: 1.45;+ font-size: 14px;+ line-height: 1.5;color: hsl(var(--foreground));}.ap-instructions[data-long="true"]::after {content: "";position: absolute;inset: auto 0 0 0;- height: 2.2em;- background: linear-gradient(to bottom, transparent, hsl(var(--sidebar)));-}--.ap-seat {- display: flex;- flex-wrap: wrap;- align-items: center;- gap: 6px;- font-size: 12px;- color: hsl(var(--muted-foreground));-}-.ap-seat-pill {- display: inline-flex;- max-width: 100%;- align-items: center;- gap: 5px;- border: 1px solid hsl(var(--border));- border-radius: 999px;- padding: 1px 8px 1px 4px;- color: hsl(var(--foreground));+ height: 2.4em;+ background: linear-gradient(to bottom, transparent, hsl(var(--card)));}-/* --------------------------------------------------------- anatomy rows */--.ap-rows {- display: flex;- flex-direction: column;- overflow: hidden;- border: 1px solid hsl(var(--border));- border-radius: var(--ap-radius-lg);- background: hsl(var(--card));-}+/* ------------------------------------------------------------- text rows */.ap-row {display: flex;- min-height: 44px;+ min-height: 52px;width: 100%;align-items: center;gap: 10px;- padding: 7px 10px;+ border-radius: 14px;+ padding: 8px 12px;text-align: left;- transition: background-color 120ms ease;+ transition: background-color 150ms ease;}-.ap-row + .ap-row { border-top: 1px solid hsl(var(--border)); }button.ap-row:hover { background: hsl(var(--secondary)); }button.ap-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px hsl(var(--ring)); }-.ap-row-icon {- display: inline-flex;- height: 26px;- width: 26px;- flex-shrink: 0;- align-items: center;- justify-content: center;- border-radius: 8px;- background: hsl(var(--secondary));- color: hsl(var(--foreground-secondary, var(--foreground)));-}.ap-row-label {display: block;- font-size: 13px;- font-weight: 500;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ font-size: 14px;color: hsl(var(--foreground));}.ap-row-detail {@@ -352,23 +419,34 @@ 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: 11.5px;+ font-size: 13px;color: hsl(var(--muted-foreground));}.ap-row-count {flex-shrink: 0;- font-size: 12px;+ font-size: 13px;font-variant-numeric: tabular-nums;color: hsl(var(--muted-foreground));}-.ap-row-count[data-attention="true"] {+.ap-row-dot {+ width: 8px;+ height: 8px;+ flex-shrink: 0;border-radius: 999px;- box-shadow: inset 0 0 0 1px hsl(var(--warning));- padding: 0 7px;- color: hsl(var(--foreground-strong));+ background: hsl(var(--warning));+}++/* A routine with its switch. */+.ap-routine {+ display: flex;+ min-height: 54px;+ align-items: center;+ gap: 12px;+ border-radius: 14px;+ padding: 8px 12px;+ transition: background-color 150ms ease;}-.ap-row-chevron { flex-shrink: 0; color: hsl(var(--muted-foreground)); opacity: 0.6; }-button.ap-row:hover .ap-row-chevron { opacity: 1; }+.ap-routine:hover { background: hsl(var(--secondary) / 0.6); }/* ------------------------------------------------------------ suggestions */@@ -376,47 +454,32 @@ button.ap-row:hover .ap-row-chevron { opacity: 1; }display: flex;align-items: center;gap: 8px;- border: 1px solid hsl(var(--border));- border-radius: var(--ap-radius);- padding: 6px 6px 6px 10px;- font-size: 12.5px;+ border-radius: var(--ap-radius-lg);+ background: hsl(var(--card));+ box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.55);+ padding: 8px 8px 8px 14px;+ font-size: 13px;}.ap-suggest-go {min-width: 0;flex: 1;text-align: left;+ line-height: 1.4;color: hsl(var(--foreground));}-.ap-suggest-go:hover { text-decoration: underline; text-underline-offset: 2px; }+.ap-suggest-go:hover { text-decoration: underline; text-underline-offset: 3px; }/* -------------------------------------------------------------- record */-.ap-stats {- display: grid;- grid-template-columns: repeat(3, minmax(0, 1fr));+.ap-record {+ display: flex;+ flex-direction: column;gap: 6px;-}-.ap-stat {- min-width: 0;- border-radius: var(--ap-radius);- background: hsl(var(--card));- border: 1px solid hsl(var(--border));- padding: 7px 9px;-}-.ap-stat-label {- display: block;- font-size: 11px;- color: hsl(var(--muted-foreground));-}-.ap-stat-value {- display: block;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;+ padding: 0 4px;font-size: 13px;- font-weight: 600;+ line-height: 1.45;font-variant-numeric: tabular-nums;- color: hsl(var(--foreground));+ color: hsl(var(--muted-foreground));}.ap-meter {@@ -442,7 +505,7 @@ button.ap-row:hover .ap-row-chevron { opacity: 1; }max-width: 100%;flex-wrap: wrap;gap: 2px;- border-radius: 8px;+ border-radius: 999px;background: hsl(var(--card));border: 1px solid hsl(var(--border));padding: 2px;@@ -453,8 +516,8 @@ button.ap-row:hover .ap-row-chevron { opacity: 1; }align-items: center;justify-content: center;gap: 5px;- border-radius: 6px;- padding: 0 9px;+ border-radius: 999px;+ padding: 0 10px;font-size: 12px;font-weight: 500;color: hsl(var(--muted-foreground));@@ -478,7 +541,7 @@ button.ap-row:hover .ap-row-chevron { opacity: 1; }align-items: center;gap: 6px;border: 1px solid hsl(var(--border));- border-radius: 8px;+ border-radius: 999px;background: hsl(var(--background));padding: 0 8px;}@@ -487,7 +550,7 @@ button.ap-row:hover .ap-row-chevron { opacity: 1; }min-width: 0;flex: 1;background: transparent;- font-size: 12.5px;+ font-size: 13px;color: hsl(var(--foreground));outline: none;}@@ -515,7 +578,7 @@ button.ap-row:hover .ap-row-chevron { opacity: 1; }border-radius: 6px;background: hsl(var(--plugin-icon-surface, var(--card)));border: 1px solid hsl(var(--border));- font-size: 10px;+ font-size: 12px;font-weight: 700;text-transform: uppercase;color: hsl(var(--muted-foreground));@@ -526,7 +589,7 @@ button.ap-row:hover .ap-row-chevron { opacity: 1; }overflow: hidden;text-overflow: ellipsis;white-space: nowrap;- font-size: 12.5px;+ font-size: 13px;color: hsl(var(--foreground));}.ap-tool-sub {@@ -534,7 +597,7 @@ button.ap-row:hover .ap-row-chevron { opacity: 1; }overflow: hidden;text-overflow: ellipsis;white-space: nowrap;- font-size: 11px;+ font-size: 12px;color: hsl(var(--muted-foreground));}.ap-tool-sub[data-off="true"] { color: hsl(var(--warning)); }@@ -552,7 +615,7 @@ button.ap-row:hover .ap-row-chevron { opacity: 1; }background: hsl(var(--card));padding: 1px 4px 1px 9px;font-family: ui-monospace, SFMono-Regular, Menlo, monospace;- font-size: 11.5px;+ font-size: 12px;color: hsl(var(--foreground));}.ap-chip-x {@@ -575,14 +638,14 @@ button.ap-row:hover .ap-row-chevron { opacity: 1; }.ap-chip-suggest:hover { color: hsl(var(--foreground)); border-style: solid; }.ap-input {- height: 30px;+ height: 34px;min-width: 0;flex: 1;border: 1px solid hsl(var(--border));- border-radius: 8px;+ border-radius: 12px;background: hsl(var(--background));padding: 0 9px;- font-size: 12.5px;+ font-size: 13px;color: hsl(var(--foreground));outline: none;transition: border-color 120ms ease, box-shadow 120ms ease;@@ -614,13 +677,13 @@ textarea.ap-input { height: auto; padding: 8px 10px; line-height: 1.5; resize: v.ap-btn {display: inline-flex;- height: 28px;+ height: 32px;align-items: center;justify-content: center;gap: 6px;- border-radius: 8px;- padding: 0 11px;- font-size: 12.5px;+ border-radius: 999px;+ padding: 0 14px;+ font-size: 13px;font-weight: 500;transition: background-color 120ms ease, opacity 120ms ease;}@@ -656,12 +719,12 @@ textarea.ap-input { height: auto; padding: 8px 10px; line-height: 1.5; resize: vpadding: 9px 10px;}.ap-review-kind {- font-size: 11px;+ font-size: 12px;font-weight: 600;color: hsl(var(--muted-foreground));}.ap-review-text {- font-size: 12.5px;+ font-size: 13px;line-height: 1.4;color: hsl(var(--foreground));}@@ -671,7 +734,7 @@ textarea.ap-input { height: auto; padding: 8px 10px; line-height: 1.5; resize: voverflow: hidden;border-radius: var(--ap-radius-sm);font-family: ui-monospace, SFMono-Regular, Menlo, monospace;- font-size: 11px;+ font-size: 12px;line-height: 1.5;}.ap-diff span {@@ -698,7 +761,10 @@ textarea.ap-input { height: auto; padding: 8px 10px; line-height: 1.5; resize: v.ap-savebar { animation: none; }.ap-tab,.ap-row,+ .ap-line,+ .ap-routine,.ap-seg-item,.ap-icon-btn,+ .ap-round-btn,.ap-meter-fill { 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 35e897c72f..2ccdad2f8a 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@@ -4,7 +4,7 @@* with an add field. Styling lives in `agentPane.css` and uses theme tokens only.*/import { useRef, useState, type ReactNode } from "react";-import { ChevronRight, Plus, X, type LucideIcon } from "lucide-react";+import { Plus, X, type LucideIcon } from "lucide-react";import { cn } from "@/lib/utils";@@ -38,9 +38,8 @@ export function PaneHint({ children, className }: { children: ReactNode; classNareturn <p className={cn("ap-hint", className)}>{children}</p>;}-/** One line of the agent's anatomy: what it is, how much of it there is, and where it lives. */+/** One text row in a pane card: what it is, one muted line about it, and a count when there is one. */export function AnatomyRow({- icon: Icon,label,detail,count,@@ -48,7 +47,6 @@ export function AnatomyRow({onOpen,testId,}: {- icon: LucideIcon;label: string;detail: string;count?: string | number | null;@@ -59,19 +57,14 @@ export function AnatomyRow({}) {const body = (<>- <span className="ap-row-icon" aria-hidden>- <Icon className="h-3.5 w-3.5" />- </span><span className="min-w-0 flex-1"><span className="ap-row-label">{label}</span><span className="ap-row-detail">{detail}</span></span>{count !== undefined && count !== null ? (- <span className="ap-row-count" data-attention={attention ? "true" : undefined}>- {count}- </span>+ <span className="ap-row-count">{count}</span>) : null}- {onOpen ? <ChevronRight className="ap-row-chevron h-3.5 w-3.5" aria-hidden /> : null}+ {attention ? <span className="ap-row-dot" aria-hidden /> : null}</>);return onOpen ? (diff --git a/dodaios/ui/web/frontend/src/components/society/card/routines/AwaySetting.tsx b/dodaios/ui/web/frontend/src/components/society/card/routines/AwaySetting.tsxindex a2497094ce..58fa1b3fa6 100644--- a/dodaios/ui/web/frontend/src/components/society/card/routines/AwaySetting.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/routines/AwaySetting.tsx@@ -1,6 +1,5 @@/** The away-parking window, as one quiet line under the routine list. */import { useQueryClient } from "@tanstack/react-query";-import { MoonStar } from "lucide-react";import { useState } from "react";import { useT } from "@/i18n";import { BrandedSelect } from "@/components/ui/select";@@ -19,8 +18,7 @@ export function AwaySetting({ agentId, neverAsk, onChanged }: { agentId: string;const value = String(days.data);const options = [...new Set([...CHOICES, days.data])].sort((a, b) => a - b).map((n) => ({ value: String(n), label: n === 0 ? own("never") : fill(own("after_days"), { n }) }));- return <div className="mt-3 flex shrink-0 items-center gap-2 border-t border-border/70 pt-2.5 text-[11px] text-muted-foreground" data-testid="routine-away-setting">- <MoonStar size={13} aria-hidden className="shrink-0" />+ return <div className="mt-3 flex shrink-0 items-center gap-2 px-3 text-[13px] text-muted-foreground" data-testid="routine-away-setting"><span className="min-w-0 flex-1 leading-tight" title={own("hint")}>{neverAsk ? own("off_for_agent") : own("label")}</span>{neverAsk ? <button type="button" className="shrink-0 rounded-md px-1.5 py-0.5 text-foreground hover:bg-secondary" onClick={() => {setError("");diff --git a/dodaios/ui/web/frontend/src/components/society/card/routines/ParkingBanner.tsx b/dodaios/ui/web/frontend/src/components/society/card/routines/ParkingBanner.tsxindex 2d27ba5521..19be96df2f 100644--- a/dodaios/ui/web/frontend/src/components/society/card/routines/ParkingBanner.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/routines/ParkingBanner.tsx@@ -43,6 +43,6 @@ export function ParkingBanner({ agentId, parking, onAnswered }: {<button type="button" disabled={busy !== null} onClick={() => void choose("never_ask")}className={`${button} text-muted-foreground hover:bg-secondary hover:text-foreground`}>{own("never_ask")}</button></div>- {error && <p role="alert" className="mt-2 pl-[26px] text-[11px] text-destructive">{error}</p>}+ {error && <p role="alert" className="mt-2 pl-[26px] text-xs text-destructive">{error}</p>}</div>;}diff --git a/dodaios/ui/web/frontend/src/components/society/card/routines/RoutineRow.tsx b/dodaios/ui/web/frontend/src/components/society/card/routines/RoutineRow.tsxindex 68a836ce16..7b3fbe7b56 100644--- a/dodaios/ui/web/frontend/src/components/society/card/routines/RoutineRow.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/routines/RoutineRow.tsx@@ -10,7 +10,7 @@ import { cn } from "@/lib/utils";import { runTaskNow, setTaskEnabled } from "@/lib/tasksApi";import { BuiltByBadge } from "@/components/selfBuild/BuiltByBadge";import { displayRoutineTitle, type LiveRoutine } from "../../cardData";-import { TriggerIcon, type RoutineTone } from "./TriggerIcon";+import type { RoutineTone } from "./TriggerIcon";import { RunStatusIcon } from "./RunStatus";import { humanSchedule, triggerFamily } from "./humanSchedule";import { formatCost, relativeTime } from "./format";@@ -57,17 +57,16 @@ export function RoutineRow({ routine, lastRun, parked, locale, now, onOpen, onCh};const cost = formatCost(lastRun?.cost_usd, locale);const lastAt = lastRun?.finished_ms ?? lastRun?.started_ms ?? null;- const tool = "rounded-md p-1.5 text-muted-foreground transition-colors duration-150 hover:bg-background hover:text-foreground focus-visible:outline focus-visible:outline-1 focus-visible:outline-ring disabled:opacity-40";+ const tool = "rounded-full p-1.5 text-muted-foreground transition-colors duration-150 hover:bg-background hover:text-foreground focus-visible:outline focus-visible:outline-1 focus-visible:outline-ring disabled:opacity-40";return <li className="group relative">- <div className="flex items-start gap-1 rounded-xl transition-colors duration-150 hover:bg-secondary/55 focus-within:bg-secondary/55">+ <div className="flex items-start gap-1 rounded-2xl transition-colors duration-150 hover:bg-secondary/55 focus-within:bg-secondary/55"><button type="button" aria-label={title} aria-describedby={describedBy} onClick={onOpen}- className="flex min-w-0 flex-1 cursor-pointer select-none items-start gap-2.5 rounded-xl px-2 py-2 text-left focus-visible:outline focus-visible:outline-1 focus-visible:outline-ring">- <TriggerIcon trigger={routine.trigger} tone={tone} />+ className="flex min-w-0 flex-1 cursor-pointer select-none items-start gap-2.5 rounded-2xl px-3 py-2.5 text-left focus-visible:outline focus-visible:outline-1 focus-visible:outline-ring"><span className="min-w-0 flex-1">- <span className={cn("block truncate text-[13px] font-medium leading-5", tone === "paused" || tone === "parked" ? "text-muted-foreground" : "text-foreground")}>{title}</span>+ <span className={cn("block truncate text-[14px] font-medium leading-5", tone === "paused" || tone === "parked" ? "text-muted-foreground" : "text-foreground")}>{title}</span><span id={describedBy} className="contents">- <span className="block break-words text-[11.5px] leading-snug text-foreground-secondary">{sentence}</span>- <span className="mt-0.5 flex flex-wrap items-center gap-x-1.5 gap-y-0.5 text-[11px] leading-4 text-muted-foreground">+ <span className="block break-words text-[13px] leading-snug text-foreground-secondary">{sentence}</span>+ <span className="mt-0.5 flex flex-wrap items-center gap-x-1.5 gap-y-0.5 text-[12px] leading-4 text-muted-foreground">{routine.state === "running" && <span className="font-medium text-primary">{own("running")}</span>}{routine.state === "paused" && <span className={cn("font-medium", parked ? "text-warning" : "")}>{parked ? own("parked") : t("tasks_view.state.paused")}</span>}{routine.dueMs && active ? <span title={new Date(routine.dueMs).toLocaleString(locale, { timeZoneName: "short" })}>{t("society.card.next_run")}: {routine.dueMs <= now ? own("due_now") : relativeTime(routine.dueMs, now, locale)}</span> : null}@@ -78,7 +77,7 @@ export function RoutineRow({ routine, lastRun, parked, locale, now, onOpen, onCh{cost && <span className="tabular-nums">· {cost}</span>}</span> : null}</span>- {lastRun?.status === "failed" && lastRun.error && <span className="mt-0.5 block truncate text-[11px] text-destructive/80" title={lastRun.error}>{lastRun.error}</span>}+ {lastRun?.status === "failed" && lastRun.error && <span className="mt-0.5 block truncate text-[12px] text-destructive/80" title={lastRun.error}>{lastRun.error}</span>}</span></span></button>@@ -94,6 +93,6 @@ export function RoutineRow({ routine, lastRun, parked, locale, now, onOpen, onCh{/* Outside the row button: the badge is a link of its own. */}<BuiltByBadge compact type="routine" id={routine.id} className="mt-2.5" /></div>- {problem && <p role="alert" className="px-2 pb-1 text-[11px] text-destructive">{problem}</p>}+ {problem && <p role="alert" className="px-3 pb-1 text-[12px] text-destructive">{problem}</p>}</li>;}diff --git a/dodaios/ui/web/frontend/src/components/society/card/routines/RunHistory.tsx b/dodaios/ui/web/frontend/src/components/society/card/routines/RunHistory.tsxindex 1c4379d200..e88bf9337a 100644--- a/dodaios/ui/web/frontend/src/components/society/card/routines/RunHistory.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/routines/RunHistory.tsx@@ -47,13 +47,13 @@ export function RunHistory({ runs, ready, locale, onOpen }: {const shown = all ? runs : runs.slice(0, FIRST_PAGE);return <section className="space-y-2" aria-labelledby="routine-runs-heading"><div className="flex items-center justify-between gap-2">- <h4 id="routine-runs-heading" className="text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground">+ <h4 id="routine-runs-heading" className="text-xs font-medium text-muted-foreground">{label("history")}{runs.length > 0 && <span className="ml-1.5 font-normal normal-case tracking-normal text-faint-foreground">{runs.length}</span>}</h4>- {runs.length > 0 && <button type="button" className="rounded-md px-1.5 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground" onClick={() => onOpen(runs[0])}>{label("latest_chat")}</button>}+ {runs.length > 0 && <button type="button" className="rounded-md px-1.5 py-0.5 text-xs text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground" onClick={() => onOpen(runs[0])}>{label("latest_chat")}</button>}</div>{ready && runs.length === 0 && <p className="rounded-xl border border-dashed border-border px-3 py-4 text-center text-[12px] leading-snug text-muted-foreground">{own("empty")}</p>}- {runs.length > 0 && <ol className="divide-y divide-border/70 overflow-hidden rounded-xl border border-border">+ {runs.length > 0 && <ol className="divide-y divide-border/50 overflow-hidden rounded-2xl bg-card">{shown.map((run) => {const state = runStateLabel(t, run.status);const reason = runReason(t, run);@@ -70,15 +70,15 @@ export function RunHistory({ runs, ready, locale, onOpen }: {<span className="min-w-0 flex-1"><span className="flex items-baseline gap-2"><time dateTime={at.toISOString()} title={at.toLocaleString(locale)} className="text-[12px] font-medium text-foreground">{shortDateTime(run.timestamp, now, locale)}</time>- {run.origin === "manual" && <span className="rounded-full border border-border px-1.5 text-[10px] leading-4 text-muted-foreground">{own("manual")}</span>}- <span className="ml-auto flex shrink-0 items-baseline gap-1.5 text-[11px] tabular-nums text-muted-foreground">+ {run.origin === "manual" && <span className="rounded-full border border-border px-1.5 text-xs leading-4 text-muted-foreground">{own("manual")}</span>}+ <span className="ml-auto flex shrink-0 items-baseline gap-1.5 text-xs tabular-nums text-muted-foreground">{duration && <span>{duration}</span>}{duration && cost && <span aria-hidden className="text-faint-foreground">·</span>}{cost && <span title={run.billedViaKey === false ? own("included") : undefined}>{cost}</span>}</span></span>{reason && <span data-testid={run.status === "skipped" ? "routine-run-skip-reason" : undefined}- className={cn("mt-0.5 block truncate text-[11px] leading-snug", run.status === "failed" ? "text-destructive/90" : "text-muted-foreground")}+ className={cn("mt-0.5 block truncate text-xs leading-snug", run.status === "failed" ? "text-destructive/90" : "text-muted-foreground")}title={reason}>{reason}</span>}</span><ChevronRight size={14} aria-hidden className="mt-0.5 shrink-0 text-faint-foreground opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100" />@@ -86,7 +86,7 @@ export function RunHistory({ runs, ready, locale, onOpen }: {</li>;})}</ol>}- {runs.length > FIRST_PAGE && <button type="button" className="text-[11px] text-muted-foreground hover:text-foreground" onClick={() => setAll((v) => !v)}>+ {runs.length > FIRST_PAGE && <button type="button" className="text-xs text-muted-foreground hover:text-foreground" onClick={() => setAll((v) => !v)}>{all ? own("show_less") : fill(own("show_all"), { n: runs.length })}</button>}</section>;diff --git a/dodaios/ui/web/frontend/src/components/society/card/shellLayout.test.ts b/dodaios/ui/web/frontend/src/components/society/card/shellLayout.test.tsindex d19063d2ec..f7e518f0ec 100644--- a/dodaios/ui/web/frontend/src/components/society/card/shellLayout.test.ts+++ b/dodaios/ui/web/frontend/src/components/society/card/shellLayout.test.ts@@ -15,7 +15,8 @@ import {type ShellPrefs,} from "./shellLayout";-const prefs = (over: Partial<ShellPrefs> = {}): ShellPrefs => ({ ...DEFAULT_SHELL_PREFS, ...over });+// Most cases measure an open pane; the shipped default (closed) has its own test.+const prefs = (over: Partial<ShellPrefs> = {}): ShellPrefs => ({ ...DEFAULT_SHELL_PREFS, paneOpen: true, ...over });afterEach(() => localStorage.clear());@@ -90,14 +91,23 @@ describe("shell preferences", () => {expect(state.rosterCollapsed).toBe(false);});+ it("starts with the details pane closed, also for a layout saved before that default", () => {+ expect(DEFAULT_SHELL_PREFS.paneOpen).toBe(false);+ expect(readShellPrefs().paneOpen).toBe(false);+ localStorage.setItem("society.shell.layout.v1", JSON.stringify({ rosterWidth: 320, paneWidth: 400, paneOpen: true }));+ expect(readShellPrefs()).toMatchObject({ rosterWidth: 320, paneWidth: 400, paneOpen: false });+ writeShellPrefs(prefs({ paneOpen: true }));+ expect(readShellPrefs().paneOpen).toBe(true);+ });+it("persists across reloads and survives bad storage", () => {writeShellPrefs(prefs({ rosterWidth: 333, paneWidth: 401, paneOpen: false, rosterCollapsed: true }));expect(readShellPrefs()).toEqual({ rosterWidth: 333, paneWidth: 401, paneOpen: false, rosterCollapsed: true });- localStorage.setItem("society.shell.layout.v1", "{not json");+ localStorage.setItem("society.shell.layout.v2", "{not json");expect(readShellPrefs()).toEqual(DEFAULT_SHELL_PREFS);- localStorage.setItem("society.shell.layout.v1", JSON.stringify({ rosterWidth: 5000, paneWidth: "wide" }));+ localStorage.setItem("society.shell.layout.v2", JSON.stringify({ rosterWidth: 5000, paneWidth: "wide" }));expect(readShellPrefs()).toMatchObject({ rosterWidth: ROSTER_MAX, paneWidth: DEFAULT_SHELL_PREFS.paneWidth });});});diff --git a/dodaios/ui/web/frontend/src/components/society/card/shellLayout.ts b/dodaios/ui/web/frontend/src/components/society/card/shellLayout.tsindex be4ae770a8..4e68155dd3 100644--- a/dodaios/ui/web/frontend/src/components/society/card/shellLayout.ts+++ b/dodaios/ui/web/frontend/src/components/society/card/shellLayout.ts@@ -15,6 +15,9 @@** Only what the person chose is persisted. A pane the window closed comes* back by itself once the window is wide enough again.+ *+ * The details pane starts closed: the section opens on a plain chat, and the+ * pane stays open across visits only once the person opened it themselves.*/export const ROSTER_MIN = 240;@@ -28,7 +31,9 @@ export const PANE_DEFAULT = 320;/** The chat never gets narrower than this while anything else can give way. */export const CHAT_MIN = 424;-const STORAGE_KEY = "society.shell.layout.v1";+const STORAGE_KEY = "society.shell.layout.v2";+/** The first layout key opened the pane by default; its widths carry over, its open pane does not. */+const LEGACY_STORAGE_KEY = "society.shell.layout.v1";export interface ShellPrefs {rosterWidth: number;@@ -40,7 +45,7 @@ export interface ShellPrefs {export const DEFAULT_SHELL_PREFS: ShellPrefs = {rosterWidth: ROSTER_DEFAULT,rosterCollapsed: false,- paneOpen: true,+ paneOpen: false,paneWidth: PANE_DEFAULT,};@@ -110,7 +115,7 @@ function sanitize(value: unknown): ShellPrefs {return {rosterWidth: clampRoster(num(raw.rosterWidth, ROSTER_DEFAULT)),rosterCollapsed: raw.rosterCollapsed === true,- paneOpen: raw.paneOpen !== false,+ paneOpen: raw.paneOpen === true,paneWidth: clampPane(num(raw.paneWidth, PANE_DEFAULT)),};}@@ -118,7 +123,9 @@ function sanitize(value: unknown): ShellPrefs {export function readShellPrefs(): ShellPrefs {try {const stored = localStorage.getItem(STORAGE_KEY);- return stored ? sanitize(JSON.parse(stored)) : { ...DEFAULT_SHELL_PREFS };+ if (stored) return sanitize(JSON.parse(stored));+ const legacy = localStorage.getItem(LEGACY_STORAGE_KEY);+ return legacy ? { ...sanitize(JSON.parse(legacy)), paneOpen: false } : { ...DEFAULT_SHELL_PREFS };} catch {return { ...DEFAULT_SHELL_PREFS };}diff --git a/dodaios/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsx b/dodaios/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsxindex e3e01a23a6..3ea699d30e 100644--- a/dodaios/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsx+++ b/dodaios/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsx@@ -38,7 +38,7 @@ import { notifyRoutineChanged } from "../cardData";import { routineTaskId } from "./routineExecution";import { RoutineChatHost } from "./RoutineChatHost";import { AgentConversationsBar } from "./AgentConversations";-import { MessageSquare, Mic, Paperclip, Plus, RotateCcw, Send, Square } from "lucide-react";+import { Plus, RotateCcw, Send, Square } from "lucide-react";import { ChatMarkdown, MediaPreview, mediaKind } from "@/components/agentchat/ChatMarkdown";import { AgentChatStoreProvider, useAgentChat, useAgentChatApi } from "@/components/agentchat/AgentChatStoreContext";@@ -415,10 +415,8 @@ function JarvisChat({ agent, roster }: AgentChatPanelProps) {if (mode === "voice") {return (<div className="flex h-full min-h-0 flex-col" data-testid="society-chat" data-mode="voice">- <div className="grid shrink-0 grid-cols-[1fr_auto_1fr] items-center gap-2 border-b border-border px-3 py-2">- <span className="min-w-0 truncate text-xs text-muted-foreground" title={t("society.chat.voice_note")}>- {t("society.chat.voice_note")}- </span>+ <div className="grid shrink-0 grid-cols-[1fr_auto_1fr] items-center gap-2 px-4 py-2">+ <span className="sr-only">{t("society.chat.voice_note")}</span><JarvisModeSwitch mode={mode} onPick={pickMode} /><span aria-hidden /></div>@@ -428,7 +426,7 @@ function JarvisChat({ agent, roster }: AgentChatPanelProps) {}const header = (- <div className="grid shrink-0 grid-cols-[1fr_auto_1fr] items-center gap-2 border-b border-border px-3 py-2">+ <div className="grid shrink-0 grid-cols-[1fr_auto_1fr] items-center gap-2 px-4 py-2"><div className="flex min-w-0 items-center gap-2"><ModelPicker /><EffortPicker />@@ -440,7 +438,7 @@ function JarvisChat({ agent, roster }: AgentChatPanelProps) {onClick={startFresh}title={t("society.chat.new_chat")}aria-label={t("society.chat.new_chat")}- className="rounded-md p-1.5 text-muted-foreground hover:bg-secondary hover:text-foreground"+ className="as-round-button"><RotateCcw className="h-3.5 w-3.5" aria-hidden /></button>@@ -492,19 +490,15 @@ function JarvisChat({ agent, roster }: AgentChatPanelProps) {*/function JarvisModeSwitch({ mode, onPick }: { mode: JarvisCardMode; onPick: (m: JarvisCardMode) => void }) {const t = useT();- const tab = (value: JarvisCardMode, icon: React.ReactNode, label: string) => (+ const tab = (value: JarvisCardMode, label: string) => (<buttontype="button"role="tab"aria-selected={mode === value}data-testid={`society-jarvis-mode-${value}`}onClick={() => onPick(value)}- className={cn(- "flex items-center gap-1 rounded-[5px] px-2 py-0.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",- mode === value ? "bg-secondary text-foreground" : "text-muted-foreground hover:text-foreground",- )}+ className="as-seg-pill">- {icon}{label}</button>);@@ -512,10 +506,10 @@ function JarvisModeSwitch({ mode, onPick }: { mode: JarvisCardMode; onPick: (m:<divrole="tablist"aria-label={t("society.chat.mode_hint")}- className="grid shrink-0 grid-cols-2 gap-0.5 rounded-md border border-border bg-background p-0.5"+ className="as-seg-pills">- {tab("voice", <Mic aria-hidden className="h-3 w-3" />, t("society.chat.mode_voice"))}- {tab("chat", <MessageSquare aria-hidden className="h-3 w-3" />, t("society.chat.mode_chat"))}+ {tab("voice", t("society.chat.mode_voice"))}+ {tab("chat", t("society.chat.mode_chat"))}</div>);}@@ -580,14 +574,13 @@ function ModelPicker() {setProviderId(current?.id ?? providers[0]?.id ?? null);setOpen((v) => !v);}}- className="flex max-w-[260px] items-center gap-1.5 rounded-full border border-border px-2 py-1 text-xs text-foreground hover:bg-secondary disabled:opacity-60"+ className="as-pill-button max-w-[320px] bg-transparent px-3 font-normal text-muted-foreground hover:text-foreground disabled:opacity-60">- {current ? <ProviderLogo providerId={current.id} label={current.label} size="sm" /> : null}<span className="truncate">{label}</span>- <span className="truncate font-mono text-xs text-muted-foreground">{modelLabel}</span>+ <span className="truncate">{modelLabel}</span></button>{open ? (- <div className="absolute left-0 top-full z-20 mt-1 flex w-[440px] max-w-[80vw] overflow-hidden rounded-lg border border-border bg-popover shadow-float">+ <div className="as-menu absolute left-0 top-full z-20 mt-2 flex w-[460px] max-w-[80vw] overflow-hidden p-1.5"><ul className="max-h-72 w-1/2 overflow-y-auto border-r border-border py-1">{providers.map((p) => (<li key={p.id}>@@ -654,37 +647,65 @@ function ModelPicker() {);}+/** How hard the lead thinks: one quiet word that opens the levels. */function EffortPicker() {const t = useT();const draft = useAgentChat((s) => s.draft);const providerById = useAgentChat((s) => s.providerById);const setDraft = useAgentChat((s) => s.setDraft);const locks = useAgentChat((s) => s.locks);+ const [open, setOpen] = useState(false);+ const ref = useRef<HTMLDivElement>(null);const provider = providerById(draft.provider);const levels = provider?.effort_levels ?? [];+ useEffect(() => {+ if (!open) return;+ const onDown = (event: PointerEvent) => {+ if (!ref.current?.contains(event.target as Node)) setOpen(false);+ };+ const onKey = (event: KeyboardEvent) => {+ if (event.key === "Escape") setOpen(false);+ };+ document.addEventListener("pointerdown", onDown, true);+ document.addEventListener("keydown", onKey);+ return () => {+ document.removeEventListener("pointerdown", onDown, true);+ document.removeEventListener("keydown", onKey);+ };+ }, [open]);if (levels.length === 0) return null;+ const current = draft.effort || "";return (- <div role="radiogroup" aria-label={t("society.chat.effort")} className="inline-flex rounded-full border border-border p-0.5">- {levels.map((level) => {- const value = level || "";- const on = (draft.effort || "") === value;- return (- <button- key={level || "default"}- type="button"- role="radio"- aria-checked={on}- disabled={Boolean(locks?.effort)}- onClick={() => void setDraft({ effort: value })}- className={cn(- "rounded-full px-2 py-0.5 text-xs capitalize transition-colors disabled:opacity-60",- on ? "bg-secondary text-foreground" : "text-muted-foreground hover:text-foreground",- )}- >- {level || t("society.chat.effort_default")}- </button>- );- })}+ <div ref={ref} className="relative">+ <button type="button" aria-haspopup="menu" aria-expanded={open} disabled={Boolean(locks?.effort)}+ aria-label={`${t("society.chat.effort")}: ${current || t("society.chat.effort_default")}`}+ onClick={() => setOpen((value) => !value)}+ className="as-pill-button bg-transparent px-3 font-normal capitalize text-muted-foreground hover:text-foreground disabled:opacity-60">+ {current || t("society.chat.effort_default")}+ </button>+ {open ? (+ <div role="radiogroup" aria-label={t("society.chat.effort")} className="as-menu absolute left-0 top-full z-20 mt-2 w-44">+ {levels.map((level) => {+ const value = level || "";+ const on = current === value;+ return (+ <button+ key={level || "default"}+ type="button"+ role="radio"+ aria-checked={on}+ onClick={() => {+ setOpen(false);+ void setDraft({ effort: value });+ }}+ className={cn("as-menu-row capitalize", on && "bg-secondary")}+ >+ {level || t("society.chat.effort_default")}+ </button>+ );+ })}+ </div>+ ) : null}</div>);}@@ -884,11 +905,11 @@ export function NoticeLine({ item }: { item: NoticeItem }) {</p>;}if (item.kind === "context_rollover") {- return <p className="py-1 text-center text-[11px] text-muted-foreground">{t("society.chat.context_rollover")}</p>;+ return <p className="py-1 text-center text-[12px] text-muted-foreground">{t("society.chat.context_rollover")}</p>;}if (item.kind === "runtime_setup") {const runtime = String(item.data.runtime ?? "");- return <p className="py-1 text-center text-[11px] text-muted-foreground" data-testid="runtime-setup-notice">+ return <p className="py-1 text-center text-[12px] text-muted-foreground" data-testid="runtime-setup-notice">{runtime ? t("society.runtime.setting_up_chat").replace("{0}", t(`society.runtime.${runtime}`)) : item.text}</p>;}@@ -902,7 +923,7 @@ export function NoticeLine({ item }: { item: NoticeItem }) {}if (item.kind === "routine_runtime_fallback") {const runtime = String(item.data.runtime ?? "");- return <p className="py-1 text-center text-[11px] text-muted-foreground" data-testid="routine-runtime-fallback">+ return <p className="py-1 text-center text-[12px] text-muted-foreground" data-testid="routine-runtime-fallback">{runtime ? t("society.runtime.routine_fallback").replace(/\{0\}/g, t(`society.runtime.${runtime}`)) : item.text}</p>;}@@ -1267,6 +1288,7 @@ export function Composer({ agent, mentionable, busy, sessionId, cwd, provider, s...readComposerDraft(chatStore, sessionId), text,});const [plusOpen, setPlusOpen] = useState(false);+ const plusRef = useRef<HTMLDivElement>(null);const [problem, setProblem] = useState<string | null>(null);const [mention, setMention] = useState<{ query: string; start: number } | null>(null);const [activeIndex, setActiveIndex] = useState(0);@@ -1446,6 +1468,21 @@ export function Composer({ agent, mentionable, busy, sessionId, cwd, provider, s};const pickerOpen = mentionOpen;+ useEffect(() => {+ if (!plusOpen) return;+ const onDown = (event: PointerEvent) => {+ if (!plusRef.current?.contains(event.target as Node)) setPlusOpen(false);+ };+ const onKey = (event: KeyboardEvent) => {+ if (event.key === "Escape") setPlusOpen(false);+ };+ document.addEventListener("pointerdown", onDown, true);+ document.addEventListener("keydown", onKey);+ return () => {+ document.removeEventListener("pointerdown", onDown, true);+ document.removeEventListener("keydown", onKey);+ };+ }, [plusOpen]);return (<div className="shrink-0 px-4 pb-4 pt-2 sm:px-6">@@ -1470,7 +1507,7 @@ export function Composer({ agent, mentionable, busy, sessionId, cwd, provider, sref={composerRef}className={cn(CHAT_MEASURE,- "relative flex items-end gap-1 rounded-[24px] border border-border bg-secondary px-2 py-1.5 focus-within:border-border-strong",+ "as-composer relative flex items-end gap-1.5",attachments.dragging && "border-border-strong",// The whole composer reads as armed while the mic is open, not just// the 32px button someone has to go looking for.@@ -1478,53 +1515,48 @@ export function Composer({ agent, mentionable, busy, sessionId, cwd, provider, s)}{...attachments.dragHandlers}>- <div className="relative">+ <div className="relative" ref={plusRef}><buttontype="button"onClick={() => setPlusOpen((v) => !v)}aria-label={t("society.chat.more")}aria-expanded={plusOpen}- className="flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground hover:bg-secondary hover:text-foreground"+ aria-haspopup="menu"+ data-testid="composer-plus"+ className="as-round-button">- <Plus className={cn("h-4 w-4 transition-transform", plusOpen && "rotate-45")} aria-hidden />+ <Plus className={cn("h-4 w-4 transition-transform duration-200 motion-reduce:transition-none", plusOpen && "rotate-45")} aria-hidden /></button>{plusOpen ? (- <div className="absolute bottom-full left-0 z-20 mb-1 w-52 overflow-hidden rounded-lg border border-border bg-popover py-1 shadow-float">- <button type="button" onClick={() => {+ <div role="menu" aria-label={t("society.chat.more")} className="as-menu absolute bottom-full left-0 z-20 mb-2 w-64" data-testid="composer-plus-menu">+ {surface === "society" ? (+ <button type="button" role="menuitem" className="as-menu-row" data-testid="composer-model-row" onClick={() => {+ setPlusOpen(false);+ composerRef.current?.querySelector<HTMLButtonElement>("[data-chat-model-trigger]")?.click();+ }}>+ <span className="min-w-0 flex-1 truncate">{t("society.chat.model")}</span>+ <span className="as-menu-row-value">{agent.model || agent.providerLabel || t("society.chat.model_default")}</span>+ </button>+ ) : null}+ <button type="button" role="menuitem" className="as-menu-row" onClick={() => {+ setPlusOpen(false);+ fileInput.current?.click();+ }}>+ {t("society.chat.attach")}+ </button>+ <button type="button" role="menuitem" className="as-menu-row" onClick={() => {setPlusOpen(false);fieldRef.current?.insertText("@");fieldRef.current?.focus();- }} className="flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs text-foreground hover:bg-secondary">- <Plus className="h-3.5 w-3.5" aria-hidden />{t("chat_tools.all")}+ }}>+ {t("chat_tools.all")}</button>- <button type="button" onClick={() => {+ <button type="button" role="menuitem" className="as-menu-row" onClick={() => {setPlusOpen(false);fieldRef.current?.insertText("@coding/");fieldRef.current?.focus();- }} className="flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs text-foreground hover:bg-secondary">- <MessageSquare className="h-3.5 w-3.5" aria-hidden />{t("society.chat.mention_group_coding")}- </button>- <button- type="button"- onClick={() => {- setPlusOpen(false);- fileInput.current?.click();- }}- className="flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs text-foreground hover:bg-secondary"- >- <Paperclip className="h-3.5 w-3.5" aria-hidden />- {t("society.chat.attach")}- </button>- <button- type="button"- onClick={() => {- setPlusOpen(false);- dictation.toggle();- }}- className="flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs text-foreground hover:bg-secondary"- >- <Mic className="h-3.5 w-3.5" aria-hidden />- {dictation.dictating ? t("society.chat.stop_recording") : t("society.chat.record")}+ }}>+ {t("society.chat.mention_group_coding")}</button></div>) : null}@@ -1584,11 +1616,12 @@ export function Composer({ agent, mentionable, busy, sessionId, cwd, provider, s}}className="max-h-[180px]"/>- {/* Hidden, not unmounted, while recording: the pill needs the room,- and a save in flight must still report back. */}- {surface === "society" && !headerModel ? <div className={cn("h-8 min-w-0 max-w-[40%] shrink-0 items-center", dictation.dictating ? "hidden" : "flex")}>- <AgentModelPicker key={agent.agentId} agent={agent} busy={busy} onSavingChange={setModelSaving} />- </div> : null}+ {/* The brain picker has no chip of its own: the "+" menu's Model row+ and "/model" press its hidden trigger, and its menu opens over the+ composer. It stays mounted so a save in flight still reports back. */}+ {surface === "society" ? (+ <AgentModelPicker key={agent.agentId} agent={agent} busy={busy} onSavingChange={setModelSaving} anchorRef={composerRef} bare />+ ) : null}<DictationButtondictating={dictation.dictating}onToggle={dictation.toggle}@@ -1598,7 +1631,7 @@ export function Composer({ agent, mentionable, busy, sessionId, cwd, provider, s/>{(busy || live) && <button type="button" onClick={() => void onCancel()}aria-label={t("society.chat.stop")} data-testid="composer-cancel"- className="flex h-8 w-8 items-center justify-center rounded-full bg-foreground text-background hover:bg-foreground/90">+ className="as-round-button" data-tone="ink"><Square className="h-3.5 w-3.5" aria-hidden /></button>}{(@@ -1610,7 +1643,7 @@ export function Composer({ agent, mentionable, busy, sessionId, cwd, provider, sdisabled={!sessionReady || modelSaving || attachments.analyzing > 0 || (!value.trim() && messageDraft.choices.length === 0 && attachments.attachments.length === 0 && !dictation.dictating)}aria-label={t("society.chat.send")}data-testid="composer-send"- className="flex h-8 w-8 items-center justify-center rounded-full bg-[hsl(var(--chat-send-background))] text-[hsl(var(--chat-send-foreground))] disabled:[&_svg]:opacity-40"+ className="as-round-button" data-tone="send"><Send className="h-3.5 w-3.5" aria-hidden /></button>diff --git a/dodaios/ui/web/frontend/src/components/society/chat/AgentConversations.tsx b/dodaios/ui/web/frontend/src/components/society/chat/AgentConversations.tsxindex ee28fddd38..7fdef4a90a 100644--- a/dodaios/ui/web/frontend/src/components/society/chat/AgentConversations.tsx+++ b/dodaios/ui/web/frontend/src/components/society/chat/AgentConversations.tsx@@ -8,7 +8,6 @@* composer to step in.*/import { useEffect, useState } from "react";-import { MessagesSquare } from "lucide-react";import { useT } from "@/i18n";import { cn } from "@/lib/utils";import { useRoutineNavigation } from "./routineNavigation";@@ -69,14 +68,11 @@ export function AgentConversationsBar({ agentId, agentName, displayName }: {if (!rows.length) return null;return (<div- className="flex shrink-0 items-center gap-2 overflow-x-auto border-b border-border px-3 py-1.5"+ className="flex shrink-0 items-center justify-center gap-1.5 overflow-x-auto px-4 pb-2 [scrollbar-width:none]"data-testid="agent-conversations"title={t("society.conversations.hint")}>- <span className="flex shrink-0 items-center gap-1 text-[11px] text-muted-foreground">- <MessagesSquare className="h-3.5 w-3.5" aria-hidden />- {t("society.conversations.label")}- </span>+ <span className="sr-only">{t("society.conversations.label")}</span>{rows.map((row) => {const name = displayName(row.counterpart_id, row.counterpart_name);return (@@ -98,8 +94,8 @@ export function AgentConversationsBar({ agentId, agentName, displayName }: {data-state={row.waiting ? "waiting" : row.running ? "running" : "idle"}title={row.waiting ? t("society.conversations.waiting") : undefined}className={cn(- "flex shrink-0 items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[11px] hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",- row.waiting ? "border-warning text-warning" : "border-border text-foreground",+ "flex h-7 shrink-0 items-center gap-1.5 rounded-full px-3 text-[12px] transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",+ row.waiting ? "bg-warning/10 text-warning" : "bg-secondary/60 text-muted-foreground",)}><spandiff --git a/dodaios/ui/web/frontend/src/components/society/chat/AgentModelPicker.tsx b/dodaios/ui/web/frontend/src/components/society/chat/AgentModelPicker.tsxindex 02a30654df..4733b87791 100644--- a/dodaios/ui/web/frontend/src/components/society/chat/AgentModelPicker.tsx+++ b/dodaios/ui/web/frontend/src/components/society/chat/AgentModelPicker.tsx@@ -1,4 +1,4 @@-import { useEffect, useId, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type KeyboardEvent } from "react";+import { useEffect, useId, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type KeyboardEvent, type RefObject } from "react";import { createPortal } from "react-dom";import { Check, ChevronDown, ChevronRight, Loader2, RefreshCw, Search, Star, Users } from "lucide-react";import { ProviderLogo } from "@/components/providers/ProviderLogo";@@ -32,8 +32,14 @@ const FAVORITES = "favorites";* the left picks which provider's models are listed (plus a starred tab);* typing searches every provider at once.*/-export function AgentModelPicker({ agent, busy, onSavingChange }: {+export function AgentModelPicker({ agent, busy, onSavingChange, anchorRef, bare = false, triggerClassName }: {agent: SocietyAgent; busy: boolean; onSavingChange: (saving: boolean) => void;+ /** Places the menu against this element instead of the trigger (a hidden trigger has no place of its own). */+ anchorRef?: RefObject<HTMLElement | null>;+ /** Keeps the trigger in the DOM but out of sight; something else (a menu row, "/model") presses it. */+ bare?: boolean;+ /** Replaces the trigger's own look, for a row in a settings list. */+ triggerClassName?: string;}) {const t = useT();const update = useUpdateAgentModel();@@ -150,7 +156,7 @@ export function AgentModelPicker({ agent, busy, onSavingChange }: {useLayoutEffect(() => {let frame = 0;const place = () => {- const rect = trigger.current?.getBoundingClientRect();+ const rect = (anchorRef?.current ?? trigger.current)?.getBoundingClientRect();if (!rect) return;const above = rect.top > window.innerHeight - rect.bottom;const width = Math.min(380, window.innerWidth - 16);@@ -170,7 +176,7 @@ export function AgentModelPicker({ agent, busy, onSavingChange }: {};const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(schedule);// Resizing the composer or its ancestors can move an unchanged trigger.- for (let node: HTMLElement | null = trigger.current; node; node = node.parentElement) observer?.observe(node);+ for (let node: HTMLElement | null = anchorRef?.current ?? trigger.current; node; node = node.parentElement) observer?.observe(node);// Prepare geometry while hidden; opening must not force a page layout.place();window.addEventListener("resize", schedule);@@ -291,12 +297,19 @@ export function AgentModelPicker({ agent, busy, onSavingChange }: {<button ref={trigger} data-chat-model-trigger type="button" aria-label={t("society.chat.model")} aria-haspopup="menu" aria-expanded={open} aria-controls={open ? menuId : undefined}disabled={busy || saving} title={busy ? t("society.chat.model_busy") : t("society.chat.model")}onClick={() => { if (open) close(); else { setSearch(""); setAccounts({}); setExpanded({}); setError(null); setSection(agent.provider || ""); setOpen(true); } }}- className="flex max-w-full items-center gap-1.5 rounded-full px-2 py-1 text-xs text-muted-foreground hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50">- {external ? <ProviderLogo providerId={agent.runtime!} label={t(`society.runtime.${agent.runtime}`)} size="sm" /> : null}- {agent.provider ? <ProviderLogo providerId={agent.provider} label={agent.providerLabel} size="sm" /> : null}- <span className="truncate">{agent.model || agent.providerLabel || t("society.chat.model_default")}</span>- {agent.effort ? <span className="shrink-0 opacity-70">{effortLabel(agent.effort, t)}</span> : null}- <ChevronDown className="h-3 w-3 shrink-0" aria-hidden />+ hidden={bare}+ // `hidden` alone loses to a display utility, so a bare trigger carries no other class.+ className={bare ? "hidden" : triggerClassName ?? "flex max-w-full items-center gap-1.5 rounded-full px-2 py-1 text-xs text-muted-foreground hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50"}>+ {triggerClassName ? <>+ <span className="ap-line-label">{t("society.chat.model")}</span>+ <span className="ap-line-value">{agent.model || agent.providerLabel || t("society.chat.model_default")}{agent.effort ? ` · ${effortLabel(agent.effort, t)}` : ""}</span>+ </> : <>+ {external ? <ProviderLogo providerId={agent.runtime!} label={t(`society.runtime.${agent.runtime}`)} size="sm" /> : null}+ {agent.provider ? <ProviderLogo providerId={agent.provider} label={agent.providerLabel} size="sm" /> : null}+ <span className="truncate">{agent.model || agent.providerLabel || t("society.chat.model_default")}</span>+ {agent.effort ? <span className="shrink-0 opacity-70">{effortLabel(agent.effort, t)}</span> : null}+ <ChevronDown className="h-3 w-3 shrink-0" aria-hidden />+ </>}</button>{host && (open || !loading) ? createPortal(<><div ref={panel} id={menuId} aria-hidden={!open} style={{ ...position, visibility: open ? "visible" : "hidden", contain: "layout paint style" }} className="fixed z-[80] flex overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-float"@@ -357,14 +370,14 @@ export function AgentModelPicker({ agent, busy, onSavingChange }: {<div className="sticky top-0 z-10 flex items-center gap-1 bg-popover px-3 pb-1 pt-3">{foldable && isRouter ? <button type="button" data-menu-choice disabled={busy || saving}onClick={toggle} aria-label={title} aria-expanded={isExpanded} aria-controls={choicesId}- className="flex min-w-0 flex-1 items-center gap-1 rounded text-left text-[11px] font-semibold uppercase tracking-wide text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring">+ className="flex min-w-0 flex-1 items-center gap-1 rounded text-left text-xs font-medium text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring">{isExpanded ? <ChevronDown className="h-3 w-3 shrink-0" aria-hidden /> : <ChevronRight className="h-3 w-3 shrink-0" aria-hidden />}<span className="truncate">{title}</span><span className="ml-auto">{models.length}</span>- </button> : <span className="min-w-0 flex-1 truncate text-[11px] font-semibold uppercase tracking-wide text-muted-foreground" title={title}>{title}</span>}+ </button> : <span className="min-w-0 flex-1 truncate text-xs font-medium text-muted-foreground" title={title}>{title}</span>}{seat.accounts.length ? <button type="button" disabled={busy || saving} data-menu-choicearia-label={`${t("society.chat.model_account")}: ${title}`} aria-haspopup="menu" aria-expanded={submenu?.provider === seat.key && !submenu.model}onClick={(event) => setSubmenu({ provider: seat.key, anchor: event.currentTarget.getBoundingClientRect() })}- className="flex max-w-[140px] items-center gap-1 rounded px-1 py-0.5 text-[10px] text-muted-foreground hover:bg-secondary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring">+ className="flex max-w-[140px] items-center gap-1 rounded px-1 py-0.5 text-xs text-muted-foreground hover:bg-secondary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"><Users className="h-3 w-3 shrink-0" aria-hidden /><span className="truncate">{seat.accounts.find((account) => account.id === currentAccount(seat))?.label ?? t("society.chat.model_active_account")}</span><ChevronDown className="h-2.5 w-2.5 shrink-0" aria-hidden /></button> : null}</div>@@ -400,7 +413,7 @@ export function AgentModelPicker({ agent, busy, onSavingChange }: {</div>{open && submenu && sideSeat ? <div ref={sidePanel} style={sideStyle} role="menu" aria-label={t(submenu.model ? "society.chat.effort" : "society.chat.model_account")}className="z-[81] overflow-y-auto rounded-md border border-border bg-popover py-1 shadow-float" onKeyDown={(event) => moveFocus(event, sidePanel.current)}>- <p className="px-3 py-2 text-[11px] font-semibold uppercase text-muted-foreground">{submenu.model ? t("society.chat.effort") : t("society.chat.model_account")}</p>+ <p className="px-3 py-2 text-xs font-medium text-muted-foreground">{submenu.model ? t("society.chat.effort") : t("society.chat.model_account")}</p>{submenu.model ? effortsFor(sideSeat, submenu.model.id).map((effort) => <button key={effort} type="button" role="menuitemradio" data-menu-choicearia-checked={effort === preferredEffort(sideSeat, submenu.model!)} disabled={busy || saving}onClick={() => void save(sideSeat, submenu.model!, effort)} className={menuRow}>diff --git a/dodaios/ui/web/frontend/src/components/society/chat/ChatGroupPanel.test.tsx b/dodaios/ui/web/frontend/src/components/society/chat/ChatGroupPanel.test.tsxindex 88fe07f90b..b0163e20eb 100644--- a/dodaios/ui/web/frontend/src/components/society/chat/ChatGroupPanel.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/chat/ChatGroupPanel.test.tsx@@ -49,7 +49,7 @@ it("opens two existing agent chats in separate stores and keeps each pane indepeexpect(within(left).getByRole("heading", { name: "hdckjashx" })).toBeTruthy();expect(within(right).getByRole("heading", { name: "Test" })).toBeTruthy();expect(screen.queryByRole("heading", { name: "hdckjashx + Test" })).toBeNull();- expect(screen.getByTestId("society-group-split").className).toContain("divide-x-2");+ expect(screen.getByTestId("society-group-split").className).toContain("divide-x");expect(within(left).getByTestId("chat-other")).toBeTruthy();expect(within(right).getByTestId("chat-test")).toBeTruthy();fireEvent.click(within(left).getByRole("button", { name: "Open hdckjashx" }));diff --git a/dodaios/ui/web/frontend/src/components/society/chat/ChatGroupPanel.tsx b/dodaios/ui/web/frontend/src/components/society/chat/ChatGroupPanel.tsxindex ab299e9f7e..4dae839a3b 100644--- a/dodaios/ui/web/frontend/src/components/society/chat/ChatGroupPanel.tsx+++ b/dodaios/ui/web/frontend/src/components/society/chat/ChatGroupPanel.tsx@@ -1,6 +1,5 @@import { useEffect, useMemo, useState } from "react";import { useQueryClient } from "@tanstack/react-query";-import { Pencil, Trash2 } from "lucide-react";import { useT } from "@/i18n";import { cn } from "@/lib/utils";import { BrandedSelect } from "@/components/ui/select";@@ -19,14 +18,9 @@ import { TeamLeadView } from "./TeamLeadView";/** What the team's main column shows. */type GroupView = "lead" | "meeting" | "individual";-/** The active view reads as selected; both states keep the same box size. */+/** The team's three views as words on one soft track. */function viewToggle(active: boolean): string {- return cn(- "rounded-md border px-3 py-2 text-sm transition-colors",- active- ? "border-border-strong bg-secondary text-foreground"- : "border-transparent text-muted-foreground hover:bg-secondary hover:text-foreground",- );+ return cn("as-seg-pill", active && "as-seg-pill-on");}interface Props {@@ -88,12 +82,12 @@ export function ChatGroupPanel({<section key={side} data-testid={`society-group-pane-${side}`} className="flex min-h-0 min-w-0 flex-col bg-background">{agent ? <><header data-testid={`society-group-identity-${side}`}- className="flex shrink-0 items-center gap-3 border-b border-border-strong bg-secondary/25 px-4 py-3">- <span data-testid={`society-group-avatar-${side}`} className="grid h-11 w-11 shrink-0 place-items-center rounded-xl bg-secondary">- <AgentSwatch agent={agent} size={38} />+ className="flex shrink-0 items-center gap-3 px-4 py-3">+ <span data-testid={`society-group-avatar-${side}`} className="grid shrink-0 place-items-center">+ <AgentSwatch agent={agent} size={36} /></span><div className="min-w-0 flex-1">- <p className="text-[11px] font-medium uppercase tracking-wide text-muted-foreground">+ <p className="sr-only">{t(side === "left" ? "society.groups.left_chat" : "society.groups.right_chat")}</p>{members.length > 2 ? <BrandedSelect@@ -108,7 +102,7 @@ export function ChatGroupPanel({<p className="truncate text-xs text-muted-foreground">{agent.title}</p></div><button type="button" onClick={() => onOpenAgent(agent.agentId)}- className="rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-secondary hover:text-foreground"+ className="as-pill-button h-8 px-3 font-normal"aria-label={t("society.groups.open_individual").replace("{0}", societyDisplayName(agent, assistantName))}>{t("society.groups.open")}</button>@@ -121,52 +115,53 @@ export function ChatGroupPanel({</section>);- const teamFooter = <div className="shrink-0 border-t border-border bg-sidebar px-3 py-3">+ const teamFooter = <div className="shrink-0 px-3 py-3">{confirmUngroup ? <div role="alertdialog" aria-label={t("society.groups.delete")}- className="space-y-3 text-xs text-foreground">+ className="space-y-3 text-[13px] text-foreground"><p>{t("society.groups.delete_confirm")}</p><div className="flex justify-end gap-2"><button type="button" onClick={() => setConfirmUngroup(false)} disabled={removing}- className="rounded-md px-2 py-1.5 text-muted-foreground hover:bg-secondary hover:text-foreground">+ className="as-pill-button h-8 px-3 font-normal">{t("society.groups.cancel")}</button><button type="button" onClick={() => void remove()} disabled={removing}- className="rounded-md bg-destructive px-2 py-1.5 font-medium text-destructive-foreground disabled:opacity-50">+ className="as-pill-button h-8 bg-destructive px-3 text-destructive-foreground hover:bg-destructive disabled:opacity-50">{t("society.groups.delete")}</button></div></div> : <div className="flex items-center gap-2"><button type="button" onClick={() => setEditing(true)}- className="inline-flex min-w-0 flex-1 items-center justify-center gap-1 rounded-md border border-border px-2 py-1.5 text-xs text-muted-foreground hover:bg-secondary hover:text-foreground">- <Pencil className="h-3.5 w-3.5 shrink-0" aria-hidden />+ className="as-pill-button h-8 min-w-0 flex-1 px-3 font-normal"><span className="truncate">{t("society.groups.edit")}</span></button><button type="button" onClick={() => setConfirmUngroup(true)}- className="inline-flex shrink-0 items-center gap-1 rounded-md border border-border px-2 py-1.5 text-xs text-muted-foreground hover:bg-destructive/10 hover:text-destructive">- <Trash2 className="h-3.5 w-3.5" aria-hidden />{t("society.groups.delete")}+ className="as-pill-button h-8 shrink-0 bg-transparent px-3 font-normal text-muted-foreground hover:text-destructive">+ {t("society.groups.delete")}</button></div>}{error && <p role="alert" className="mt-2 text-xs text-destructive">{error}</p>}</div>;- return <div className="grid min-h-0 flex-1 grid-cols-[minmax(240px,300px)_minmax(0,1fr)] bg-card" data-testid="society-group-chat">+ return <div className="agent-section grid min-h-0 flex-1 grid-cols-[minmax(240px,280px)_minmax(0,1fr)] bg-background" data-testid="society-group-chat"><RosterRail agents={roster} groups={groups} activeGroupId={group.group_id} activeAgentId={null}onOpen={onOpenAgent} onOpenGroup={onOpenGroup} onCreate={onCreateAgent}onGroupAgents={onGroupAgents} onAddAgentToGroup={onAddAgentToGroup}loading={false} sample={false} side="left" className="w-full border-0 jarvis-nav-surface"footer={teamFooter} />- <div className="flex min-h-0 min-w-0 flex-col border-l border-border">- <div className="flex shrink-0 gap-2 border-b border-border p-2">+ <div className="flex min-h-0 min-w-0 flex-col">+ <div className="flex shrink-0 justify-center px-4 pt-3">+ <div className="as-seg-pills" role="group" aria-label={group.name}><button type="button" aria-pressed={view === "lead"} onClick={() => setView("lead")}className={viewToggle(view === "lead")}>{t("society.lead.tab")}</button><button type="button" aria-pressed={view === "meeting"} onClick={() => setView("meeting")}className={viewToggle(view === "meeting")}>{t("society.meeting.title")}</button><button type="button" aria-pressed={view === "individual"} onClick={() => setView("individual")}className={viewToggle(view === "individual")}>{t("society.meeting.individual")}</button>+ </div></div>{view === "lead" ? <TeamLeadView key={group.group_id} group={group} roster={roster} onOpenAgent={onOpenAgent} />: view === "meeting" ? <MeetingChat key={group.group_id} group={group} roster={roster} />- : <div className="grid min-h-0 min-w-0 flex-1 grid-cols-2 divide-x-2 divide-border-strong overflow-hidden bg-background"+ : <div className="grid min-h-0 min-w-0 flex-1 grid-cols-2 divide-x divide-border overflow-hidden bg-background"data-testid="society-group-split">{pane("left", left)}{pane("right", right)}diff --git a/dodaios/ui/web/frontend/src/components/society/chat/TeamLeadPanel.tsx b/dodaios/ui/web/frontend/src/components/society/chat/TeamLeadPanel.tsxindex 1b8bffc79d..efb314a79f 100644--- a/dodaios/ui/web/frontend/src/components/society/chat/TeamLeadPanel.tsx+++ b/dodaios/ui/web/frontend/src/components/society/chat/TeamLeadPanel.tsx@@ -78,8 +78,8 @@ function StateChip({ state, label }: { state: string; label: string }) {function Section({ title, count, children }: { title: string; count?: number; children: ReactNode }) {return (<section className="flex flex-col gap-2">- <h3 className="flex items-center gap-2 text-xs font-medium uppercase tracking-wide text-muted-foreground">- {title}{count ? <span className="rounded-full bg-secondary px-1.5 text-[11px] normal-case tracking-normal">{count}</span> : null}+ <h3 className="flex items-center gap-2 text-[13px] font-medium text-muted-foreground">+ {title}{count ? <span className="rounded-full bg-secondary px-1.5 text-[12px]">{count}</span> : null}</h3>{children}</section>@@ -93,7 +93,7 @@ function Fold({ title, open, onToggle, testId, children }: {return (<section className="flex flex-col gap-2" data-testid={testId}><button type="button" aria-expanded={open} onClick={onToggle}- className="flex items-center gap-1 rounded-sm text-left text-xs font-medium uppercase tracking-wide text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">+ className="flex items-center gap-1 rounded-sm text-left text-[13px] font-medium text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><ChevronDown className={cn("h-3.5 w-3.5 transition-transform", !open && "-rotate-90")} aria-hidden />{title}</button>{open ? children : null}diff --git a/dodaios/ui/web/frontend/src/components/society/chat/TeamLeadView.test.tsx b/dodaios/ui/web/frontend/src/components/society/chat/TeamLeadView.test.tsxindex 323f0fbfb0..249eb8e1c1 100644--- a/dodaios/ui/web/frontend/src/components/society/chat/TeamLeadView.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/chat/TeamLeadView.test.tsx@@ -128,7 +128,8 @@ it("is the lead's own chat, marked as the lead's, with the team beside it", () =expect(screen.getByTestId("chat-boss")).toBeTruthy();expect(chat.namespaces).toEqual(["group:team:lead"]);expect(screen.getByText("Boss")).toBeTruthy();- expect(screen.getByText("society.lead.role")).toBeTruthy();+ // The lead's role names the pill on hover; no badge in the header.+ expect(screen.getByTitle("society.lead.role").textContent).toContain("Boss");expect(screen.getByTestId("team-lead-status").textContent).toBe("society.lead.status_idle");expect(screen.getByTestId("team-lead-panel")).toBeTruthy();// The chat is the one place to write: the view adds no goal form of its own.@@ -185,6 +186,14 @@ it("says in one line what the team is doing and what waits for the person", () =expect(screen.getByTestId("team-lead-status").textContent).toBe("society.lead.unavailable");});+it("starts with the team panel closed for a new person", () => {+ window.localStorage.clear();+ api.team = team();+ mount();+ expect(screen.queryByTestId("team-lead-panel")).toBeNull();+ expect(screen.getByTestId("team-lead-panel-toggle").getAttribute("aria-pressed")).toBe("false");+});+it("folds the team panel away and remembers it; the closed panel still counts open work", () => {api.team = team({ goals: [goal(), goal({ goal_id: "g2", state: "queued" })] });mount();diff --git a/dodaios/ui/web/frontend/src/components/society/chat/TeamLeadView.tsx b/dodaios/ui/web/frontend/src/components/society/chat/TeamLeadView.tsxindex b08cf3c776..39a6083185 100644--- a/dodaios/ui/web/frontend/src/components/society/chat/TeamLeadView.tsx+++ b/dodaios/ui/web/frontend/src/components/society/chat/TeamLeadView.tsx@@ -11,7 +11,7 @@*/import { useEffect, useMemo, useState } from "react";import { useQueryClient } from "@tanstack/react-query";-import { Activity, Crown, Lightbulb, ListChecks, Loader2, PanelRightClose, PanelRightOpen, Rocket } from "lucide-react";+import { Crown, Loader2 } from "lucide-react";import { runningTurn } from "@/components/agentchat/reduce";import { Button } from "@/components/ui/button";import { BrandedSelect } from "@/components/ui/select";@@ -34,25 +34,17 @@ import { AgentChatPanel, CHAT_MEASURE } from "./AgentChatPanel";import { TeamLeadPanel, initiativeMode } from "./TeamLeadPanel";/** What only a lead is asked: each sends its sentence as the person's message. */-const LEAD_ACTIONS = [- { id: "status", Icon: ListChecks },- { id: "next", Icon: Lightbulb },- { id: "check", Icon: Activity },- { id: "drive", Icon: Rocket },-] as const;+const LEAD_ACTIONS = ["status", "next", "check", "drive"] as const;const PANEL_KEY = "society.lead.panel";-/** Below this width the panel lies over the conversation (`max-xl`), so it starts closed. */-const PANEL_MIN_WIDTH = 1280;-+/** The team panel starts closed, like an agent's details: the chat comes first. */function readPanelOpen(): boolean {try {- const saved = window.localStorage.getItem(PANEL_KEY);- if (saved === "open" || saved === "closed") return saved === "open";+ return window.localStorage.getItem(PANEL_KEY) === "open";} catch {- // Storage is unavailable (a private window): the width decides.+ // Storage is unavailable (a private window): closed.+ return false;}- return window.innerWidth >= PANEL_MIN_WIDTH;}function LeadActions({ store, sessionId, leadName }: { store: AgentChatStoreHook; sessionId: string | null; leadName: string }) {@@ -65,11 +57,11 @@ function LeadActions({ store, sessionId, leadName }: { store: AgentChatStoreHook<div className="shrink-0 px-4 pt-1 sm:px-6"><div role="group" aria-label={t("society.lead.actions_label").replace("{0}", leadName)}className={cn(CHAT_MEASURE, "flex flex-wrap gap-1.5")} data-testid="team-lead-actions">- {LEAD_ACTIONS.map(({ id, Icon }) => <button key={id} type="button" disabled={busy || !ready}+ {LEAD_ACTIONS.map((id) => <button key={id} type="button" disabled={busy || !ready}data-testid={`team-lead-action-${id}`} title={t(`society.lead.action_${id}_prompt`)}onClick={() => void store.getState().send(t(`society.lead.action_${id}_prompt`))}- className="inline-flex items-center gap-1.5 rounded-full border border-border px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:border-border-strong hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50">- <Icon className="h-3.5 w-3.5" aria-hidden />{t(`society.lead.action_${id}`)}+ className="as-pill-button h-8 bg-transparent px-3.5 font-normal text-muted-foreground shadow-[inset_0_0_0_1px_hsl(var(--border))] hover:text-foreground disabled:pointer-events-none disabled:opacity-50">+ {t(`society.lead.action_${id}`)}</button>)}</div></div>@@ -199,37 +191,33 @@ export function TeamLeadView({ group, roster, onOpenAgent }: Props) {: paused ? t("society.lead.status_paused").replace("{0}", paused.title): t("society.lead.status_idle").replace("{0}", leadName);const mode = initiativeMode(team);- const PanelIcon = panelOpen ? PanelRightClose : PanelRightOpen;return (<section className="flex min-h-0 flex-1 flex-col bg-background" data-testid="team-lead-view">- <header className="flex shrink-0 flex-wrap items-center gap-3 border-b border-border px-4 py-2.5">- <span className="relative grid h-10 w-10 shrink-0 place-items-center rounded-xl bg-secondary">- {lead ? <AgentSwatch agent={lead} size={34} /> : <Crown className="h-5 w-5" aria-hidden />}- {lead && <span className="absolute -right-1.5 -top-1.5 grid h-5 w-5 place-items-center rounded-full border border-border bg-card text-foreground">- <Crown className="h-3 w-3" aria-hidden />- </span>}- </span>- <div className="min-w-0 flex-1">- <p className="flex items-center gap-2">- <span className="truncate text-base font-semibold text-foreground">{leadName}</span>- <span className="shrink-0 rounded-full border border-border px-2 py-0.5 text-[11px] font-medium uppercase tracking-wide text-muted-foreground">{t("society.lead.role")}</span>- </p>+ {/* Like an agent's chat: one name pill in the middle; the team's two+ controls sit quietly on the right as words. */}+ <header className="relative flex h-14 shrink-0 items-center justify-center gap-2 px-4">+ <div className="as-name-pill" title={t("society.lead.role")}>+ <span className="as-avatar">{lead ? <AgentSwatch agent={lead} size={24} /> : null}</span>+ <span className="as-pill-name">{leadName}</span><p role="status" data-testid="team-lead-status"- className={cn("truncate text-xs", !team.lead_available ? "text-destructive" : asking ? "font-medium text-warning" : "text-muted-foreground")}>+ className={cn("as-pill-status", !team.lead_available ? "text-destructive" : asking ? "text-warning" : "")}>{status}</p></div>- <button type="button" onClick={openSetup} data-testid="team-lead-initiative" data-mode={mode}- title={t(`society.lead.initiative_${mode}_hint`).replace("{0}", leadName)}- className="inline-flex shrink-0 items-center gap-1.5 rounded-full border border-border px-2.5 py-1 text-xs text-muted-foreground hover:border-border-strong hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">- <i className={cn("h-1.5 w-1.5 rounded-full", mode === "off" ? "bg-muted-foreground/40" : "bg-success")} aria-hidden />- {t(`society.lead.initiative_${mode}`)}- </button>- <Button size="sm" variant="ghost" aria-pressed={panelOpen} onClick={() => togglePanel(!panelOpen)} data-testid="team-lead-panel-toggle">- <PanelIcon aria-hidden />{t("society.lead.panel_title")}- {!panelOpen && open.length > 0 && <span className={cn("rounded-full px-1.5 text-[11px]", asking ? "bg-warning/20 text-warning" : "bg-secondary text-muted-foreground")}>{open.length}</span>}- </Button>+ <div className="absolute right-4 flex items-center gap-1.5">+ <button type="button" onClick={openSetup} data-testid="team-lead-initiative" data-mode={mode}+ title={t(`society.lead.initiative_${mode}_hint`).replace("{0}", leadName)}+ className="as-pill-button h-8 bg-transparent px-3 font-normal text-muted-foreground hover:text-foreground">+ <i className={cn("h-1.5 w-1.5 rounded-full", mode === "off" ? "bg-muted-foreground/40" : "bg-success")} aria-hidden />+ {t(`society.lead.initiative_${mode}`)}+ </button>+ <button type="button" aria-pressed={panelOpen} onClick={() => togglePanel(!panelOpen)} data-testid="team-lead-panel-toggle"+ className={cn("as-pill-button h-8 px-3", !panelOpen && "bg-transparent font-normal text-muted-foreground hover:text-foreground")}>+ {t("society.lead.panel_title")}+ {!panelOpen && open.length > 0 && <span className={cn("rounded-full px-1.5 text-[12px]", asking ? "bg-warning/20 text-warning" : "bg-secondary text-muted-foreground")}>{open.length}</span>}+ </button>+ </div></header>{problem && <p role="alert" className="shrink-0 border-b border-border px-4 py-2 text-sm text-destructive">{problem}</p>}diff --git a/dodaios/ui/web/frontend/src/components/society/chat/mentionChoices.test.tsx b/dodaios/ui/web/frontend/src/components/society/chat/mentionChoices.test.tsxindex 0652739e6b..5df2c7b521 100644--- a/dodaios/ui/web/frontend/src/components/society/chat/mentionChoices.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/chat/mentionChoices.test.tsx@@ -93,7 +93,7 @@ it("uses Add to select a real branded chip and preserves the existing pin protoc/>,);fireEvent.click(screen.getByRole("button", { name: "society.chat.more" }));- fireEvent.click(screen.getByRole("button", { name: "chat_tools.all" }));+ fireEvent.click(screen.getByRole("menuitem", { name: "chat_tools.all" }));fireEvent.click(await screen.findByRole("option", { name: /@\s*gmail/ }));const input = screen.getByRole("textbox");expect(input.querySelector('[data-brand="gmail"] img')).not.toBeNull();@@ -124,7 +124,7 @@ it("sends the selected plugin ID when an agent has the same name", async () => {busy={false} sessionId="society:test" cwd="" provider="openai" surface="society"onSend={send} onCancel={async () => {}} />);fireEvent.click(screen.getByRole("button", { name: "society.chat.more" }));- fireEvent.click(screen.getByRole("button", { name: "chat_tools.all" }));+ fireEvent.click(screen.getByRole("menuitem", { name: "chat_tools.all" }));fireEvent.click(await screen.findByRole("option", { name: /@plugin:gmail/ }));fireEvent.click(screen.getByRole("button", { name: "society.chat.send" }));await waitFor(() => expect(send).toHaveBeenCalledOnce());@@ -138,7 +138,7 @@ it("does not send pins for a chip removed from the draft", async () => {busy={false} sessionId="society:test" cwd="" provider="openai" surface="society"onSend={send} onCancel={async () => {}} />);fireEvent.click(screen.getByRole("button", { name: "society.chat.more" }));- fireEvent.click(screen.getByRole("button", { name: "chat_tools.all" }));+ fireEvent.click(screen.getByRole("menuitem", { name: "chat_tools.all" }));fireEvent.click(await screen.findByRole("option", { name: /@gmail/ }));const box = screen.getByRole("textbox");box.textContent = "Explain this instead";diff --git a/dodaios/ui/web/frontend/src/components/society/companion/AccessoryPicker.tsx b/dodaios/ui/web/frontend/src/components/society/companion/AccessoryPicker.tsxindex ab8edd8a60..e4db12d261 100644--- a/dodaios/ui/web/frontend/src/components/society/companion/AccessoryPicker.tsx+++ b/dodaios/ui/web/frontend/src/components/society/companion/AccessoryPicker.tsx@@ -74,7 +74,7 @@ export function AccessoryPicker({ value, onChange, agentId }: { value: Companion<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>- {!open && <span className="absolute bottom-1 left-1/2 inline-flex -translate-x-1/2 items-center gap-0.5 rounded-full bg-background/90 px-1.5 py-0.5 text-[10px] font-semibold text-foreground shadow-sm">+ {!open && <span className="absolute bottom-1 left-1/2 inline-flex -translate-x-1/2 items-center gap-0.5 rounded-full bg-background/90 px-1.5 py-0.5 text-xs font-semibold text-foreground shadow-sm"><Lock size={9} aria-hidden />{t("society.level.lv").replace("{0}", String(at))}</span>}</button>;diff --git a/dodaios/ui/web/frontend/src/components/society/create/TemplatePreviewCard.tsx b/dodaios/ui/web/frontend/src/components/society/create/TemplatePreviewCard.tsxindex 2e7852a7de..2cb938d62a 100644--- a/dodaios/ui/web/frontend/src/components/society/create/TemplatePreviewCard.tsx+++ b/dodaios/ui/web/frontend/src/components/society/create/TemplatePreviewCard.tsx@@ -103,7 +103,7 @@ 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 uppercase tracking-[0.08em] text-muted-foreground">{t("agent_create.preview.brings")}</h3>+ <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")}@@ -126,7 +126,7 @@ export function TemplatePreviewCard(props: Props) {{tools.length ? (<section className="flex flex-col gap-2"><div className="flex items-baseline justify-between gap-2">- <h3 className="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("agent_create.preview.tools_title")}</h3>+ <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">@@ -194,7 +194,7 @@ export function TemplatePreviewCard(props: Props) {type="button"onClick={() => setShowInstructions((value) => !value)}aria-expanded={showInstructions}- className="flex items-center gap-1.5 self-start rounded text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"+ 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">{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 />@@ -208,7 +208,7 @@ export function TemplatePreviewCard(props: Props) {{props.firstMessage ? (<section className="flex flex-col gap-1.5">- <h3 className="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("agent_create.preview.first_message")}</h3>+ <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>diff --git a/dodaios/ui/web/frontend/src/components/society/roster/AgentRosterActions.tsx b/dodaios/ui/web/frontend/src/components/society/roster/AgentRosterActions.tsxindex d96a3be5ff..e4608d726f 100644--- a/dodaios/ui/web/frontend/src/components/society/roster/AgentRosterActions.tsx+++ b/dodaios/ui/web/frontend/src/components/society/roster/AgentRosterActions.tsx@@ -1,7 +1,6 @@import { useCallback, useEffect, useLayoutEffect, useRef, useState, type KeyboardEvent } from "react";import { createPortal } from "react-dom";import * as Dialog from "@radix-ui/react-dialog";-import { EyeOff, Eye, MailCheck, MailOpen, Pencil, Pin, PinOff, Trash2 } from "lucide-react";import { useQueryClient } from "@tanstack/react-query";import { Button } from "@/components/ui/button";@@ -123,38 +122,35 @@ export function AgentRosterActions({return createPortal(<>{!mode && <div ref={menuRef} role="menu" aria-label={t("society.roster.menu")} onKeyDown={onMenuKeyDown}style={{ width: 260, visibility: "hidden" }}- className="fixed z-[100] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-float">+ className="fixed z-[100] min-w-48 overflow-hidden rounded-2xl border border-border bg-popover p-1.5 text-popover-foreground shadow-float">{onTogglePin && <button type="button" role="menuitem" disabled={!pinned && !canPin} onClick={() => { onTogglePin(agent.agentId); onDismiss(); }}title={!pinned && !canPin ? t("society.shell.pin_full") : undefined}- className="flex w-full items-center gap-2 rounded px-3 py-2 text-left text-sm hover:bg-secondary focus:bg-secondary focus:outline-none disabled:opacity-40">- {pinned ? <PinOff className="h-4 w-4" aria-hidden /> : <Pin className="h-4 w-4" aria-hidden />}+ className="flex w-full items-center gap-2 rounded-xl px-3 py-2 text-left text-sm hover:bg-secondary focus:bg-secondary focus:outline-none disabled:opacity-40">{t(pinned ? "society.shell.unpin" : "society.shell.pin")}</button>}{onMarkUnread && <button type="button" role="menuitem" disabled={!unread && !canMarkUnread} onClick={() => { onMarkUnread(agent.agentId, !unread); onDismiss(); }}- className="flex w-full items-center gap-2 rounded px-3 py-2 text-left text-sm hover:bg-secondary focus:bg-secondary focus:outline-none disabled:opacity-40">- {unread ? <MailCheck className="h-4 w-4" aria-hidden /> : <MailOpen className="h-4 w-4" aria-hidden />}+ className="flex w-full items-center gap-2 rounded-xl px-3 py-2 text-left text-sm hover:bg-secondary focus:bg-secondary focus:outline-none disabled:opacity-40">{t(unread ? "society.shell.mark_read" : "society.shell.mark_unread")}</button>}{(onTogglePin || onMarkUnread) && <div className="my-1 border-t border-border" aria-hidden />}<button type="button" role="menuitem" disabled={sample || isLead} onClick={() => { setMode("rename"); setError(false); }}- className="flex w-full items-center gap-2 rounded px-3 py-2 text-left text-sm hover:bg-secondary focus:bg-secondary focus:outline-none disabled:opacity-40">- <Pencil className="h-4 w-4" aria-hidden />{t("society.roster.rename")}+ className="flex w-full items-center gap-2 rounded-xl px-3 py-2 text-left text-sm hover:bg-secondary focus:bg-secondary focus:outline-none disabled:opacity-40">+ {t("society.roster.rename")}</button><button type="button" role="menuitem" onClick={() => { onVisibilityChange(agent.agentId, !hidden); onDismiss(); }}- className="flex w-full items-center gap-2 rounded px-3 py-2 text-left text-sm hover:bg-secondary focus:bg-secondary focus:outline-none">- {hidden ? <Eye className="h-4 w-4" aria-hidden /> : <EyeOff className="h-4 w-4" aria-hidden />}+ className="flex w-full items-center gap-2 rounded-xl px-3 py-2 text-left text-sm hover:bg-secondary focus:bg-secondary focus:outline-none">{t(hidden ? "society.roster.show" : "society.roster.hide")}</button><div className="my-1 border-t border-border" aria-hidden /><button type="button" role="menuitem" disabled={isLead} onClick={() => { setMode("delete"); setError(false); }}- className="flex w-full items-center gap-2 rounded px-3 py-2 text-left text-sm text-destructive hover:bg-destructive/10 focus:bg-destructive/10 focus:outline-none disabled:opacity-40">- <Trash2 className="h-4 w-4" aria-hidden />{t("society.roster.delete")}+ className="flex w-full items-center gap-2 rounded-xl px-3 py-2 text-left text-sm text-destructive hover:bg-destructive/10 focus:bg-destructive/10 focus:outline-none disabled:opacity-40">+ {t("society.roster.delete")}</button></div>}<Dialog.Root open={mode !== null} onOpenChange={closeDialog}><Dialog.Portal><Dialog.Overlay className="fixed inset-0 z-[101] bg-scrim/60" />- <Dialog.Content className="fixed left-1/2 top-1/2 z-[102] w-[min(400px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-popover p-5 text-popover-foreground shadow-float outline-none">+ <Dialog.Content className="fixed left-1/2 top-1/2 z-[102] w-[min(400px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 rounded-3xl border border-border bg-popover p-6 text-popover-foreground shadow-float outline-none"><Dialog.Title className="text-base font-semibold">{t(mode === "rename" ? "society.roster.rename" : "society.roster.delete")}</Dialog.Title><Dialog.Description className="mt-2 text-sm text-muted-foreground">{mode === "rename" ? t("society.roster.rename_hint") : t("society.roster.delete_confirm").replace("{0}", agent.name)}@@ -162,7 +158,7 @@ export function AgentRosterActions({{mode === "rename" && <form onSubmit={(event) => { event.preventDefault(); void rename(); }}><input autoFocus value={name} maxLength={40} onChange={(event) => setName(event.target.value)}aria-label={t("society.roster.name")}- className="mt-4 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" />+ className="mt-4 w-full rounded-full border border-border bg-background px-4 py-2 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" />{error && <p role="alert" className="mt-2 text-sm text-destructive">{t("society.roster.rename_error")}</p>}<div className="mt-5 flex justify-end gap-2"><Button type="button" variant="ghost" disabled={busy} onClick={onDismiss}>{t("society.roster.cancel")}</Button>diff --git a/dodaios/ui/web/frontend/src/components/society/roster/GroupRosterActions.tsx b/dodaios/ui/web/frontend/src/components/society/roster/GroupRosterActions.tsxindex cb0f8aba5f..3d8355dae2 100644--- a/dodaios/ui/web/frontend/src/components/society/roster/GroupRosterActions.tsx+++ b/dodaios/ui/web/frontend/src/components/society/roster/GroupRosterActions.tsx@@ -2,7 +2,6 @@ import { useEffect, useLayoutEffect, useRef, useState, type KeyboardEvent } fromimport { createPortal } from "react-dom";import * as Dialog from "@radix-ui/react-dialog";import { useQueryClient } from "@tanstack/react-query";-import { Pencil, Trash2 } from "lucide-react";import { Button } from "@/components/ui/button";import { useT } from "@/i18n";@@ -80,20 +79,20 @@ export function GroupRosterActions({ group, x, y, onEdit, onDismiss }: Props) {return createPortal(<>{!confirmUngroup && <div ref={menuRef} role="menu" aria-label={group.name} onKeyDown={onMenuKeyDown}style={{ width: 240, visibility: "hidden" }}- className="fixed z-[100] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-float">+ className="fixed z-[100] min-w-48 overflow-hidden rounded-2xl border border-border bg-popover p-1.5 text-popover-foreground shadow-float"><button type="button" role="menuitem" onClick={() => { onEdit(); onDismiss(); }}- className="flex w-full items-center gap-2 rounded px-3 py-2 text-left text-sm hover:bg-secondary focus:bg-secondary focus:outline-none">- <Pencil className="h-4 w-4" aria-hidden />{t("society.groups.edit")}+ className="flex w-full items-center gap-2 rounded-xl px-3 py-2 text-left text-sm hover:bg-secondary focus:bg-secondary focus:outline-none">+ {t("society.groups.edit")}</button><button type="button" role="menuitem" onClick={() => setConfirmUngroup(true)}- className="flex w-full items-center gap-2 rounded px-3 py-2 text-left text-sm text-destructive hover:bg-destructive/10 focus:bg-destructive/10 focus:outline-none">- <Trash2 className="h-4 w-4" aria-hidden />{t("society.groups.delete")}+ className="flex w-full items-center gap-2 rounded-xl px-3 py-2 text-left text-sm text-destructive hover:bg-destructive/10 focus:bg-destructive/10 focus:outline-none">+ {t("society.groups.delete")}</button></div>}<Dialog.Root open={confirmUngroup} onOpenChange={(open) => { if (!open && !busy) onDismiss(); }}><Dialog.Portal><Dialog.Overlay className="fixed inset-0 z-[101] bg-scrim/60" />- <Dialog.Content className="fixed left-1/2 top-1/2 z-[102] w-[min(400px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-popover p-5 text-popover-foreground shadow-float outline-none">+ <Dialog.Content className="fixed left-1/2 top-1/2 z-[102] w-[min(400px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 rounded-3xl border border-border bg-popover p-6 text-popover-foreground shadow-float outline-none"><Dialog.Title className="text-base font-semibold">{t("society.groups.delete")}</Dialog.Title><Dialog.Description className="mt-2 text-sm text-muted-foreground">{t("society.groups.delete_confirm")}</Dialog.Description>{error && <p role="alert" className="mt-2 text-sm text-destructive">{error}</p>}diff --git a/dodaios/ui/web/frontend/src/components/society/roster/RosterRail.test.tsx b/dodaios/ui/web/frontend/src/components/society/roster/RosterRail.test.tsxindex bcb09cad0b..4dd8b2eb71 100644--- a/dodaios/ui/web/frontend/src/components/society/roster/RosterRail.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/roster/RosterRail.test.tsx@@ -1,4 +1,4 @@-import { act, cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";+import { act, cleanup, fireEvent, render, screen, waitFor, within } from "@testing-library/react";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import { afterEach, describe, expect, it, vi } from "vitest";@@ -281,6 +281,7 @@ describe("RosterRail reorder", () => {it("locks rows while searching so the excerpt cannot file the order", () => {renderRail(trio());+ fireEvent.click(screen.getByTestId("roster-search-toggle"));fireEvent.change(screen.getByRole("searchbox"), { target: { value: "a" } });expect(rowOf("A").className).not.toContain("cursor-grab");expect(localStorage.getItem(ORDER_KEY)).toBeNull();@@ -449,8 +450,12 @@ it("shows and finds the lead by the wake-word name", () => {render(<QueryClientProvider client={client}><RosterRail {...baseProps} agents={[agent({ agentId: "jarvis", name: "Jarvis", tier: "lead" })]} activeAgentId={null} /></QueryClientProvider>);- expect(screen.getByText("Hanna")).toBeTruthy();+ // Large and centred above the list while nothing is searched ...+ expect(screen.getByTestId("roster-lead").textContent).toBe("Hanna");+ // ... and an ordinary row among the results while searching.+ fireEvent.click(screen.getByTestId("roster-search-toggle"));fireEvent.change(screen.getByRole("searchbox"), { target: { value: "hanna" } });+ expect(screen.queryByTestId("roster-lead")).toBeNull();expect(screen.getByText("Hanna")).toBeTruthy();});@@ -473,7 +478,7 @@ describe("RosterRail shell", () => {expect(screen.getByLabelText("society.shell.status_needs_you")).toBeTruthy();});- it("previews a draft before the last message, then the last message with its time", () => {+ it("previews a draft before the last message, then the last message, without a time column", () => {const now = Date.now();renderRail([agent({ agentId: "a", name: "A" }), agent({ agentId: "b", name: "B" })], {activity: new Map([@@ -486,7 +491,7 @@ describe("RosterRail shell", () => {expect(previews[0].textContent).toBe("society.shell.preview_draft check the invoices");expect(previews[1].dataset.kind).toBe("message");expect(previews[1].textContent).toBe("All three reports are in.");- expect(screen.getByText(/^5\s?m/)).toBeTruthy();+ expect(screen.queryByText(/^5\s?m/)).toBeNull();});it("pins an agent into the face grid and remembers it", () => {@@ -501,16 +506,27 @@ describe("RosterRail shell", () => {expect(screen.getByTestId("roster-pins").textContent).toContain("B");});- it("filters to the agents that need the person and offers a way back when none do", () => {- renderRail([agent({ agentId: "a", name: "A" }), waiting({ agentId: "b", name: "B" })]);- fireEvent.click(screen.getByTestId("roster-filter-needs-you"));- expect(screen.queryByText("A")).toBeNull();- expect(screen.getByText("B")).toBeTruthy();- fireEvent.click(screen.getByTestId("roster-filter-unread"));- expect(screen.getByTestId("roster-empty").textContent).toContain("society.shell.empty_unread");- fireEvent.click(screen.getByRole("button", { name: "society.shell.show_all" }));+ it("keeps the top calm: two round buttons, no filter tabs and no section headings", () => {+ renderRail([agent({ agentId: "a", name: "A" }), waiting({ agentId: "b", name: "B" })], { onOpenGroup: () => undefined });+ expect(screen.queryByRole("searchbox")).toBeNull();+ expect(screen.queryByTestId("roster-filter-needs-you")).toBeNull();+ expect(screen.queryByText("society.shell.section_agents")).toBeNull();+ expect(screen.queryByText("society.shell.section_needs_you")).toBeNull();+ // Waiting agents still come first, marked on their face.+ expect(screen.getByTestId("roster-needs-you").textContent).toContain("B");+ });++ it("opens search from its button and closes it again with Escape", () => {+ renderRail([agent({ agentId: "a", name: "A" }), agent({ agentId: "b", name: "B" })]);+ fireEvent.click(screen.getByTestId("roster-search-toggle"));+ const box = screen.getByRole("searchbox");+ fireEvent.change(box, { target: { value: "zzz" } });+ expect(screen.getByTestId("roster-empty").textContent).toContain("society.roster.empty");+ fireEvent.keyDown(box, { key: "Escape" });+ expect((screen.getByRole("searchbox") as HTMLInputElement).value).toBe("");+ fireEvent.keyDown(screen.getByRole("searchbox"), { key: "Escape" });+ expect(screen.queryByRole("searchbox")).toBeNull();expect(screen.getByText("A")).toBeTruthy();- expect(localStorage.getItem("society.roster.filter.v1")).toBe("all");});it("marks an agent unread from its menu", () => {@@ -567,13 +583,10 @@ describe("RosterRail shell", () => {expect(onToggleCollapsed).toHaveBeenCalled();});- it("lists everyone on the folded rail even while a filter is chosen", () => {- localStorage.setItem("society.roster.filter.v1", "needs-you");+ it("lists everyone on the folded rail", () => {renderRail([agent({ agentId: "a", name: "A" }), waiting({ agentId: "b", name: "B" })], { collapsed: true });expect(screen.getByRole("button", { name: "A" })).toBeTruthy();expect(screen.getByRole("button", { name: "B" })).toBeTruthy();- // The choice itself is kept for when the rows come back.- expect(localStorage.getItem("society.roster.filter.v1")).toBe("needs-you");});it("does not let pins of retired agents fill the pinned places", () => {@@ -596,13 +609,27 @@ describe("RosterRail shell", () => {it("says what to do when there are no agents yet", () => {const onCreate = vi.fn();renderRail([], { onCreate });- expect(screen.getByTestId("roster-empty").textContent).toContain("society.shell.empty_agents");- fireEvent.click(screen.getByRole("button", { name: "society.shell.new_agent" }));+ const empty = screen.getByTestId("roster-empty");+ expect(empty.textContent).toContain("society.shell.empty_agents");+ fireEvent.click(within(empty).getByRole("button", { name: "society.shell.new_agent" }));expect(onCreate).toHaveBeenCalled();});- it("offers a visible New team action", () => {- renderRail([agent({ agentId: "a", name: "A" })], { onOpenGroup: () => undefined });+ it("offers New agent and New team from the round + button", () => {+ const onCreate = vi.fn();+ renderRail([agent({ agentId: "a", name: "A" })], { onOpenGroup: () => undefined, onCreate });+ expect(screen.queryByTestId("society-create-group-button")).toBeNull();+ fireEvent.click(screen.getByTestId("society-create-button"));expect(screen.getByTestId("society-create-group-button").textContent).toContain("society.groups.create");+ fireEvent.click(screen.getByTestId("roster-new-agent"));+ expect(onCreate).toHaveBeenCalledTimes(1);+ expect(screen.queryByRole("menu")).toBeNull();+ });++ it("creates an agent straight from + where teams are not available", () => {+ const onCreate = vi.fn();+ renderRail([agent({ agentId: "a", name: "A" })], { onCreate });+ fireEvent.click(screen.getByTestId("society-create-button"));+ expect(onCreate).toHaveBeenCalledTimes(1);});});diff --git a/dodaios/ui/web/frontend/src/components/society/roster/RosterRail.tsx b/dodaios/ui/web/frontend/src/components/society/roster/RosterRail.tsxindex 457e3f468f..8eae0f5e14 100644--- a/dodaios/ui/web/frontend/src/components/society/roster/RosterRail.tsx+++ b/dodaios/ui/web/frontend/src/components/society/roster/RosterRail.tsx@@ -1,15 +1,17 @@/**- * The roster: the Agents section's navigation. One dense row per agent, each- * with a corner status mark and a single preview line, plus the groups that- * keep a long list calm:+ * The roster: the Agents section's navigation, kept quiet on purpose. Two+ * round buttons at the top (search, and "+" for a new agent or team), the+ * lead large and centred under them, then one plain list: a face, a name and+ * one muted preview line per row. Order carries the grouping, without+ * headings:*- * - pinned agents as a four-up grid of faces at the top,- * - "Needs you" for every agent that waits on the person (it beats unread),- * - teams, with a visible "New team" action,+ * - pinned agents as a four-up grid of faces,+ * - every agent that waits on the person (a ring on its face says why),+ * - teams, as rows with their members' faces stacked,* - everyone else, in the person's own drag order.*- * A search box and a filter (all / needs you / unread) narrow the list. The- * roster can fold to an avatar rail; the frame decides when it must.+ * Search opens from its button and narrows the list. The roster can fold to+ * an avatar rail; the frame decides when it must.** Reordering is press-and-drag: pressing anywhere on a row and moving it* files the agent before or after the row under the pointer. A small@@ -22,9 +24,8 @@* then the rest in list order. Holding the modifier shows the numbers.*/import { lazy, Suspense, useCallback, useEffect, useMemo, useRef, useState, type KeyboardEvent, type MouseEvent, type PointerEvent as ReactPointerEvent, type ReactNode } from "react";-import { Eye, PanelLeftClose, PanelLeftOpen, Plus, Search, UsersRound, X } from "lucide-react";+import { PanelLeftOpen, Plus, Search } from "lucide-react";-import { Badge } from "@/components/ui/badge";import { ScrollArea } from "@/components/ui/scroll-area";import { useT, useUiLanguage } from "@/i18n";import { societyDisplayName } from "@/lib/societyDisplayName";@@ -41,10 +42,9 @@ import { GroupRosterActions } from "./GroupRosterActions";import { useRosterUnreadState } from "./useRosterUnread";import { ChatGroupDialog } from "../chat/ChatGroupDialog";import { RosterRow, StatusMark } from "./RosterRow";-import { RosterSection } from "./RosterSection";import { RosterHoverCard, type HoverCardData } from "./RosterHoverCard";import { formatRelative, needsYou, rosterPreview, rosterStatus, waitingReasonOf } from "./rosterPreview";-import { HIDDEN_AGENTS_KEY, MAX_PINNED, ORDER_KEY, PINNED_KEY, togglePin, usePersistedIds, useRosterFilter, writeIdList, type RosterFilter } from "./rosterPrefs";+import { HIDDEN_AGENTS_KEY, MAX_PINNED, ORDER_KEY, PINNED_KEY, togglePin, usePersistedIds, writeIdList } from "./rosterPrefs";import type { RosterActivityMap } from "./useRosterActivity";/** How far the pointer must travel before a press becomes a drag. */@@ -140,7 +140,9 @@ export function RosterRail({const t = useT();const language = useUiLanguage();const [query, setQuery] = useState("");- const [chosenFilter, setFilter] = useRosterFilter();+ const [searchOpen, setSearchOpen] = useState(false);+ const [addOpen, setAddOpen] = useState(false);+ const addRef = useRef<HTMLDivElement>(null);const [creatingGroup, setCreatingGroup] = useState(false);const [profileId, setProfileId] = useState<string | null>(null);const [hiddenIds, setHiddenIds] = usePersistedIds(HIDDEN_AGENTS_KEY);@@ -212,31 +214,29 @@ export function RosterRail({const agent = agents.find((row) => row.agentId === id);return agent ? display(agent) : id;};- // The folded rail has no search box or filter on screen, so it lists- // everyone; the person's choice comes back with the rows.- const filter: RosterFilter = collapsed ? "all" : chosenFilter;+ // The folded rail has no search box on screen, so it lists everyone; the+ // search comes back with the rows.const q = collapsed ? "" : query.trim().toLowerCase();- const browsing = q === "" && filter === "all";- const visibleGroups = filter === "all"- ? groups.filter((group) => `${group.name} ${group.members.map(memberName).join(" ")}`.toLowerCase().includes(q))- : [];+ const browsing = q === "";+ const visibleGroups = groups.filter((group) => `${group.name} ${group.members.map(memberName).join(" ")}`.toLowerCase().includes(q));- const { pinned, attention, leadRow, rows } = useMemo(() => {+ const { heroLead, pinned, attention, leadRow, rows } = useMemo(() => {const isHidden = (a: SocietyAgent) => !showHidden && hiddenIds.includes(a.agentId);const matches = (a: SocietyAgent) => !q || `${a.name} ${display(a)} ${a.title}`.toLowerCase().includes(q);- const passes = (a: SocietyAgent) => filter === "all" || (filter === "needs-you" ? needsYou(a) : unread.has(a.agentId));- const shown = (a: SocietyAgent) => !isHidden(a) && matches(a) && passes(a);+ const shown = (a: SocietyAgent) => !isHidden(a) && matches(a);+ // The lead stands apart, large, above the list while nothing is searched.+ const hero = browsing && lead && !isHidden(lead) ? lead : null;// Pins are an arrangement of the whole list; while a search or filter// narrows it, they fold back into the excerpt.const pinnedRows = browsing- ? pinIds.map((id) => agents.find((a) => a.agentId === id)).filter((a): a is SocietyAgent => Boolean(a) && !isHidden(a!))+ ? pinIds.map((id) => agents.find((a) => a.agentId === id)).filter((a): a is SocietyAgent => Boolean(a) && !isHidden(a!) && a!.agentId !== hero?.agentId): [];const pinnedSet = new Set(pinnedRows.map((a) => a.agentId));// Team members wait on the person too; they surface here even though// their team keeps them out of the plain list.- const waiting = agents.filter((a) => shown(a) && needsYou(a) && !pinnedSet.has(a.agentId));+ const waiting = agents.filter((a) => shown(a) && needsYou(a) && !pinnedSet.has(a.agentId) && a.agentId !== hero?.agentId);const waitingSet = new Set(waiting.map((a) => a.agentId));- const leadShown = lead && shown(lead) && !pinnedSet.has(lead.agentId) && !waitingSet.has(lead.agentId) ? lead : null;+ const leadShown = !hero && lead && shown(lead) && !pinnedSet.has(lead.agentId) && !waitingSet.has(lead.agentId) ? lead : null;// Until the teams have answered, a member would be listed on its own and// jump into its team a moment later; the list waits for the answer instead.const rest = teamsPending ? [] : agents.filter((a) => a.agentId !== lead?.agentId && !groupedIds.has(a.agentId)@@ -258,8 +258,8 @@ export function RosterRail({}return rank[a.tier] - rank[b.tier];});- return { pinned: pinnedRows, attention: waiting, leadRow: leadShown, rows: rest };- }, [agents, browsing, display, filter, groupedIds, hiddenIds, lead, orderIds, pinIds, q, showHidden, teamsPending, unread]);+ return { heroLead: hero, pinned: pinnedRows, attention: waiting, leadRow: leadShown, rows: rest };+ }, [agents, browsing, display, groupedIds, hiddenIds, lead, orderIds, pinIds, q, showHidden, teamsPending]);// While searching or filtering, the list is an excerpt — dragging there// would file agents by where they happen to sit in it, so rows stay put.@@ -267,8 +267,8 @@ export function RosterRail({/** Every agent in the order the person sees them: the keyboard walks this. */const navOrder = useMemo(- () => [...pinned, ...attention, ...(leadRow ? [leadRow] : []), ...rows].map((a) => a.agentId),- [attention, leadRow, pinned, rows],+ () => [...(heroLead ? [heroLead] : []), ...pinned, ...attention, ...(leadRow ? [leadRow] : []), ...rows].map((a) => a.agentId),+ [attention, heroLead, leadRow, pinned, rows],);const shortcutIds = navOrder.slice(0, 9);const shortcutOf = (agentId: string) => {@@ -614,10 +614,25 @@ export function RosterRail({};const hiddenCount = agents.filter((agent) => hiddenIds.includes(agent.agentId)).length;- const needsYouCount = agents.filter(needsYou).length;- const unreadCount = agents.filter((agent) => unread.has(agent.agentId)).length;const canCreateTeam = !sample && Boolean(onOpenGroup);+ // The "+" menu closes on a press outside it or on Escape.+ useEffect(() => {+ if (!addOpen) return;+ const onDown = (event: PointerEvent) => {+ if (!addRef.current?.contains(event.target as Node)) setAddOpen(false);+ };+ const onKey = (event: globalThis.KeyboardEvent) => {+ if (event.key === "Escape") setAddOpen(false);+ };+ document.addEventListener("pointerdown", onDown, true);+ document.addEventListener("keydown", onKey);+ return () => {+ document.removeEventListener("pointerdown", onDown, true);+ document.removeEventListener("keydown", onKey);+ };+ }, [addOpen]);+const renderRow = (agent: SocietyAgent, options: { draggable: boolean }) => {const facts = activity.get(agent.agentId);const isUnread = unread.has(agent.agentId);@@ -631,7 +646,6 @@ export function RosterRail({displayName={display(agent)}status={rosterStatus(agent, isUnread)}preview={rosterPreview({ agent, draft: facts?.draft, lastMessage: facts?.lastMessage })}- timeLabel={timeLabel(agent.agentId)}active={agent.agentId === activeAgentId}unread={isUnread}hidden={hiddenIds.includes(agent.agentId)}@@ -651,7 +665,7 @@ export function RosterRail({onHoverEnd={endHover}/>{options.draggable && groupHover?.kind === "agent" && groupHover.id === agent.agentId && (- <span data-testid="society-group-drop-hint" className="pointer-events-none absolute right-2 top-1 rounded bg-primary px-1.5 py-0.5 text-[10px] text-primary-foreground">+ <span data-testid="society-group-drop-hint" className="pointer-events-none absolute right-2 top-1 rounded-full bg-primary px-2 py-0.5 text-[12px] text-primary-foreground">{t(groupReady ? "society.groups.release_to_group" : "society.groups.hold_to_group")}</span>)}@@ -694,18 +708,18 @@ export function RosterRail({);if (collapsed) {- const railAgents = [...pinned, ...attention, ...(leadRow ? [leadRow] : []), ...rows];+ const railAgents = [...(heroLead ? [heroLead] : []), ...pinned, ...attention, ...(leadRow ? [leadRow] : []), ...rows];return (<aside ref={railRef} data-testid="society-roster-rail" data-collapsed="true" aria-label={t("society.roster.title")} className={asideClass}><div className="flex flex-col items-center gap-1.5 px-2 pb-2 pt-3">{onToggleCollapsed ? (<button type="button" onClick={onToggleCollapsed} aria-label={t("society.shell.roster_expand")} title={t("society.shell.roster_expand")}- className="as-ghost-button h-8 w-8 px-0" data-testid="roster-expand">+ className="as-round-button" data-testid="roster-expand"><PanelLeftOpen className="h-4 w-4" aria-hidden /></button>) : null}<button type="button" onClick={onCreate} aria-label={t("society.shell.new_agent")} title={t("society.shell.new_agent")}- className="as-ink-button h-8 w-8 justify-center rounded-full px-0" data-testid="society-create-button">+ className="as-round-button" data-testid="society-create-button"><Plus className="h-4 w-4" aria-hidden /></button></div>@@ -726,7 +740,6 @@ export function RosterRail({</button></li>))}- {visibleGroups.length > 0 ? <li aria-hidden className="my-1 w-6 border-t border-border" /> : null}{visibleGroups.map((group) => (<li key={group.group_id}><button type="button" data-group-id={group.group_id} onClick={() => onOpenGroup?.(group.group_id)}@@ -744,76 +757,86 @@ export function RosterRail({);}- const filterButton = (value: RosterFilter, label: string, count?: number) => (- <button key={value} type="button" aria-pressed={filter === value} onClick={() => setFilter(value)}- className="as-seg-item" data-testid={`roster-filter-${value}`}>- <span className="truncate">{label}</span>- {count ? <span className={value === "needs-you" ? "as-seg-count" : "as-seg-count text-muted-foreground"}>{count}</span> : null}- </button>- );-- const nothingListed = !leadRow && rows.length === 0 && attention.length === 0 && pinned.length === 0 && visibleGroups.length === 0;+ const nothingListed = !heroLead && !leadRow && rows.length === 0 && attention.length === 0 && pinned.length === 0 && visibleGroups.length === 0;const showLoading = (teamsPending && rows.length === 0) || (loading && agents.length === 0);+ const closeSearch = () => {+ setQuery("");+ setSearchOpen(false);+ };return (- <aside ref={railRef} data-testid="society-roster-rail" className={asideClass}>+ <aside ref={railRef} data-testid="society-roster-rail" aria-label={t("society.roster.title")} className={asideClass}>{header}- <div className="flex h-12 shrink-0 items-center gap-1.5 pl-4 pr-2.5">- <h2 className="truncate font-display text-[13px] font-semibold tracking-tight text-foreground-strong">- {t("society.roster.title")}- </h2>+ <div className="as-roster-top">{sample ? (- <Badge variant="outline" className="text-xs">- {t("society.sample_badge")}- </Badge>- ) : null}- <span className="ml-auto" />- {onToggleCollapsed ? (- <button type="button" onClick={onToggleCollapsed} aria-label={t("society.shell.roster_collapse")} title={t("society.shell.roster_collapse")}- className="as-ghost-button h-7 w-7 px-0" data-testid="roster-collapse">- <PanelLeftClose className="h-4 w-4" aria-hidden />- </button>+ <span className="mr-auto pl-1 text-[13px] text-muted-foreground">{t("society.sample_badge")}</span>) : null}- <button type="button" className="as-ink-button" onClick={onCreate} data-testid="society-create-button" title={t("society.shell.new_agent")}>- <Plus className="h-3.5 w-3.5" aria-hidden />- {t("society.roster.create")}+ <button type="button" className="as-round-button" aria-label={t("society.roster.search")} title={t("society.roster.search")}+ aria-pressed={searchOpen} data-testid="roster-search-toggle"+ onClick={() => (searchOpen ? closeSearch() : setSearchOpen(true))}>+ <Search className="h-4 w-4" aria-hidden /></button>+ <div ref={addRef} className="relative">+ <button type="button" className="as-round-button" data-testid="society-create-button"+ aria-label={t("society.shell.new_agent")} title={t("society.shell.new_agent")}+ aria-haspopup={canCreateTeam ? "menu" : undefined} aria-expanded={canCreateTeam ? addOpen : undefined}+ onClick={() => (canCreateTeam ? setAddOpen((value) => !value) : onCreate())}>+ <Plus className={cn("h-4 w-4 transition-transform duration-200 motion-reduce:transition-none", addOpen && "rotate-45")} aria-hidden />+ </button>+ {addOpen ? (+ <div role="menu" aria-label={t("society.shell.new_agent")} className="as-menu absolute right-0 top-full z-40 mt-2 w-52">+ <button type="button" role="menuitem" className="as-menu-row" data-testid="roster-new-agent"+ onClick={() => { setAddOpen(false); onCreate(); }}>+ {t("society.shell.new_agent")}+ </button>+ <button type="button" role="menuitem" className="as-menu-row" data-testid="society-create-group-button"+ onClick={() => { setAddOpen(false); setCreatingGroup(true); }}>+ {t("society.groups.create")}+ </button>+ </div>+ ) : null}+ </div></div>- <div className="flex flex-col gap-2 px-3">- <label className="relative block">- <Search className="pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" aria-hidden />+ {searchOpen ? (+ <div className="px-3 pb-2"><inputtype="search"+ autoFocusvalue={query}onChange={(e) => setQuery(e.target.value)}onKeyDown={(e) => {- if (e.key === "Escape" && query) {- e.preventDefault();- setQuery("");- }+ if (e.key !== "Escape") return;+ e.preventDefault();+ if (query) setQuery("");+ else closeSearch();}}placeholder={t("society.roster.search")}aria-label={t("society.roster.search")}- className="h-8 w-full rounded-lg border border-border bg-background pl-8 pr-2 text-[13px] text-foreground placeholder:text-muted-foreground focus-visible:border-border-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40"+ className="as-search"+ data-testid="roster-search"/>- </label>- {agents.length > 1 ? (- <div role="group" aria-label={t("society.shell.filter_label")} className="as-seg">- {filterButton("all", t("society.shell.filter_all"))}- {filterButton("needs-you", t("society.shell.filter_needs_you"), needsYouCount)}- {filterButton("unread", t("society.shell.filter_unread"), unreadCount)}- </div>- ) : null}- {hiddenCount > 0 && <button type="button" onClick={() => setShowHidden((value) => !value)}- className="-mx-1 flex items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs text-muted-foreground hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">- <Eye className="h-3.5 w-3.5" aria-hidden />- {t(showHidden ? "society.roster.hide_hidden" : "society.roster.show_hidden").replace("{0}", String(hiddenCount))}- </button>}- </div>- <ScrollArea className="mt-2 min-h-0 flex-1">- <div className="flex flex-col gap-2.5 px-2 pb-3">+ </div>+ ) : null}+ {heroLead ? (+ <div className="flex justify-center px-3 pb-3 pt-1">+ <button type="button" className="as-hero" style={agentTint(heroLead)}+ onClick={() => openAgent(heroLead.agentId)} onContextMenu={(event) => openMenu(event, heroLead.agentId)}+ aria-current={heroLead.agentId === activeAgentId ? "true" : undefined}+ data-active={heroLead.agentId === activeAgentId ? "true" : undefined}+ data-testid="roster-lead">+ <span className="as-avatar">+ <AgentSwatch agent={heroLead} size={56} />+ <StatusMark status={rosterStatus(heroLead, unread.has(heroLead.agentId))} />+ {shortcutOf(heroLead.agentId) !== null ? <span className="as-shortcut-badge" aria-hidden>{shortcutOf(heroLead.agentId)}</span> : null}+ </span>+ <span className="as-hero-name">{display(heroLead)}</span>+ </button>+ </div>+ ) : null}+ <ScrollArea className="min-h-0 flex-1">+ <div className="flex flex-col gap-0.5 px-2 pb-3">{pinned.length > 0 ? (- <div className="as-pins" role="list" aria-label={t("society.shell.pinned")} data-testid="roster-pins">+ <div className="as-pins mb-1" role="list" aria-label={t("society.shell.pinned")} data-testid="roster-pins">{pinned.map((agent) => (<button key={agent.agentId} type="button" role="listitem" data-pinned-id={agent.agentId}onClick={() => openAgent(agent.agentId)} onContextMenu={(event) => openMenu(event, agent.agentId)}@@ -832,83 +855,60 @@ export function RosterRail({</div>) : null}{attention.length > 0 ? (- <RosterSection id="needs-you" title={t("society.shell.section_needs_you")} count={attention.length} tone="attention">- <ul className="flex flex-col gap-1" data-testid="roster-needs-you">- {attention.map((agent) => renderRow(agent, { draggable: false }))}- </ul>- </RosterSection>+ <ul className="flex flex-col gap-0.5" data-testid="roster-needs-you" aria-label={t("society.shell.section_needs_you")}>+ {attention.map((agent) => renderRow(agent, { draggable: false }))}+ </ul>) : null}- {(visibleGroups.length > 0 || (canCreateTeam && browsing)) ? (- <RosterSection id="teams" title={t("society.shell.section_teams")} count={visibleGroups.length || undefined}>- <ul className="flex flex-col gap-1">- {visibleGroups.map((group) => {- const hovered = groupHover?.kind === "group" && groupHover.id === group.group_id;- const members = group.members.filter((id) => agents.some((agent) => agent.agentId === id));- return (- <li key={group.group_id}>- <button type="button" data-group-id={group.group_id} onClick={() => onOpenGroup?.(group.group_id)} onContextMenu={(event) => openGroupMenu(event, group.group_id)} aria-current={activeGroupId === group.group_id ? "true" : undefined}- data-active={activeGroupId === group.group_id ? "true" : undefined}- data-group-ready={hovered && groupReady ? "true" : undefined}- data-drop={hovered && !groupReady ? "true" : undefined}- className="as-row focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"- data-testid={`society-group-${group.group_id}`}>- <span className="flex w-9 shrink-0 items-center justify-center">- <GroupFaces group={group} agents={agents} size={24} />- </span>- <span className="min-w-0 flex-1">- <span className="as-row-name block">{group.name}</span>- <span className="as-row-preview">{hovered- ? t(groupReady ? "society.groups.release_to_group" : "society.groups.hold_to_group")- : members.length === 0- ? t("society.shell.team_empty")- : group.lead_agent_id- ? `${t("society.lead.rail").replace("{0}", memberName(group.lead_agent_id))} · ${group.members.filter((id) => id !== group.lead_agent_id).map(memberName).join(", ")}`- : group.members.map(memberName).join(", ")}</span>- </span>- </button>- </li>- );- })}- {canCreateTeam && browsing ? (- <li>- <button type="button" onClick={() => setCreatingGroup(true)} data-testid="society-create-group-button"- className="flex h-9 w-full items-center gap-2 rounded-[10px] px-2.5 text-left text-xs text-muted-foreground hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">- <span className="grid h-6 w-6 place-items-center rounded-full border border-dashed border-border-strong">- <UsersRound className="h-3.5 w-3.5" aria-hidden />+ {visibleGroups.length > 0 ? (+ <ul className="flex flex-col gap-0.5" aria-label={t("society.shell.section_teams")} data-testid="roster-teams">+ {visibleGroups.map((group) => {+ const hovered = groupHover?.kind === "group" && groupHover.id === group.group_id;+ const members = group.members.filter((id) => agents.some((agent) => agent.agentId === id));+ return (+ <li key={group.group_id}>+ <button type="button" data-group-id={group.group_id} onClick={() => onOpenGroup?.(group.group_id)} onContextMenu={(event) => openGroupMenu(event, group.group_id)} aria-current={activeGroupId === group.group_id ? "true" : undefined}+ data-active={activeGroupId === group.group_id ? "true" : undefined}+ data-group-ready={hovered && groupReady ? "true" : undefined}+ data-drop={hovered && !groupReady ? "true" : undefined}+ className="as-row focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"+ data-testid={`society-group-${group.group_id}`}>+ <span className="flex w-10 shrink-0 items-center justify-center">+ <GroupFaces group={group} agents={agents} size={24} />+ </span>+ <span className="min-w-0 flex-1">+ <span className="as-row-name block">{group.name}</span>+ <span className="as-row-preview">{hovered+ ? t(groupReady ? "society.groups.release_to_group" : "society.groups.hold_to_group")+ : members.length === 0+ ? t("society.shell.team_empty")+ : members.map(memberName).join(", ")}</span></span>- {t("society.groups.create")}</button></li>- ) : null}- </ul>- </RosterSection>+ );+ })}+ </ul>+ ) : null}+ {leadRow ? (+ <ul className="flex flex-col gap-0.5">+ {renderRow(leadRow, { draggable: false })}+ </ul>+ ) : null}+ <ul ref={listRef} className="flex flex-col gap-0.5" aria-label={t("society.shell.section_agents")} data-testid="roster-agents">+ {rows.map((agent) => renderRow(agent, { draggable: true }))}+ </ul>+ {hiddenCount > 0 ? (+ <button type="button" onClick={() => setShowHidden((value) => !value)} className="as-quiet-link mt-2 self-start">+ {t(showHidden ? "society.roster.hide_hidden" : "society.roster.show_hidden").replace("{0}", String(hiddenCount))}+ </button>) : null}- {(leadRow || rows.length > 0) ? (- <RosterSection id="agents" title={t("society.shell.section_agents")} count={rows.length + (leadRow ? 1 : 0)}>- {leadRow ? (- <ul className="flex flex-col gap-1">- {renderRow(leadRow, { draggable: false })}- </ul>- ) : null}- <ul ref={listRef} className={cn("flex flex-col gap-1", leadRow && rows.length > 0 && "mt-1")}>- {rows.map((agent) => renderRow(agent, { draggable: true }))}- </ul>- </RosterSection>- ) : <ul ref={listRef} className="hidden" />}{showLoading ? (- <p className="px-2 py-3 text-xs text-muted-foreground">{t("society.roster.loading")}</p>+ <p className="px-3 py-3 text-[13px] text-muted-foreground">{t("society.roster.loading")}</p>) : null}- {/* Under "All" with no search, an empty list means everyone is- hidden; the show-hidden control above already says so. */}- {!showLoading && !loading && nothingListed && (agents.length === 0 || q !== "" || filter !== "all") ? (- <EmptyState- filter={filter}- searching={q !== ""}- noAgents={agents.length === 0}- onShowAll={() => setFilter("all")}- onClearSearch={() => setQuery("")}- onCreate={onCreate}- />+ {/* With no search, an empty list means everyone is hidden; the+ show-hidden link above already says so. */}+ {!showLoading && !loading && nothingListed && (agents.length === 0 || q !== "") ? (+ <EmptyState noAgents={agents.length === 0} onClearSearch={closeSearch} onCreate={onCreate} />) : null}</div></ScrollArea>@@ -925,14 +925,12 @@ function GroupFaces({ group, agents, size }: { group: SocietyChatGroup; agents:.filter((agent): agent is SocietyAgent => Boolean(agent)).slice(0, 3);if (members.length === 0) {- return <span className="grid place-items-center rounded-full border border-dashed border-border-strong text-muted-foreground" style={{ width: size, height: size }}>- <UsersRound className="h-3 w-3" aria-hidden />- </span>;+ return <span className="rounded-full border border-dashed border-border-strong" style={{ width: size, height: size }} aria-hidden />;}return (<span className="flex items-center">{members.map((member, index) => (- <span key={member.agentId} className={cn("rounded-full ring-2 ring-sidebar", index > 0 && "-ml-2.5")}>+ <span key={member.agentId} className={cn("rounded-full ring-2 ring-sidebar", index > 0 && "-ml-4")}><AgentSwatch agent={member} size={size} /></span>))}@@ -941,11 +939,8 @@ function GroupFaces({ group, agents, size }: { group: SocietyChatGroup; agents:}/** One sentence and one action: what would appear here and how it gets there. */-function EmptyState({ filter, searching, noAgents, onShowAll, onClearSearch, onCreate }: {- filter: RosterFilter;- searching: boolean;+function EmptyState({ noAgents, onClearSearch, onCreate }: {noAgents: boolean;- onShowAll: () => void;onClearSearch: () => void;onCreate: () => void;}) {@@ -954,26 +949,14 @@ function EmptyState({ filter, searching, noAgents, onShowAll, onClearSearch, onCreturn (<div className="as-empty" data-testid="roster-empty"><p>{t("society.shell.empty_agents")}</p>- <button type="button" className="as-ink-button" onClick={onCreate}>- <Plus className="h-3.5 w-3.5" aria-hidden />{t("society.shell.new_agent")}- </button>- </div>- );- }- if (searching) {- return (- <div className="as-empty" data-testid="roster-empty">- <p>{t("society.roster.empty")}</p>- <button type="button" className="as-ghost-button -ml-2" onClick={onClearSearch}>- <X className="h-3.5 w-3.5" aria-hidden />{t("society.shell.clear_search")}- </button>+ <button type="button" className="as-pill-button" data-tone="ink" onClick={onCreate}>{t("society.shell.new_agent")}</button></div>);}return (<div className="as-empty" data-testid="roster-empty">- <p>{t(filter === "needs-you" ? "society.shell.empty_needs_you" : "society.shell.empty_unread")}</p>- <button type="button" className="as-ghost-button -ml-2" onClick={onShowAll}>{t("society.shell.show_all")}</button>+ <p>{t("society.roster.empty")}</p>+ <button type="button" className="as-pill-button" onClick={onClearSearch}>{t("society.shell.clear_search")}</button></div>);}diff --git a/dodaios/ui/web/frontend/src/components/society/roster/RosterRow.tsx b/dodaios/ui/web/frontend/src/components/society/roster/RosterRow.tsxindex baef2d5a85..ba122b44e8 100644--- a/dodaios/ui/web/frontend/src/components/society/roster/RosterRow.tsx+++ b/dodaios/ui/web/frontend/src/components/society/roster/RosterRow.tsx@@ -1,7 +1,8 @@/**- * One dense roster row: a 36px face with a corner status mark, the name with a- * relative time, and one preview line. The avatar opens the agent's profile,- * the rest of the row opens its chat, and the whole row is the drag handle.+ * One roster row: a 40px face, the name, and one muted preview line. The face+ * carries a mark only when it says something (working, unread, waiting on+ * the person). The avatar opens the agent's profile, the rest of the row+ * opens its chat, and the whole row is the drag handle.*/import type {KeyboardEvent,@@ -14,7 +15,6 @@ import { useT } from "@/i18n";import { cn } from "@/lib/utils";import { AgentSwatch } from "../AgentSwatch";-import { RuntimeMark } from "../RuntimeBadge";import { agentTint } from "../agentTint";import type { SocietyAgent } from "../data";import type { RosterPreview, RosterStatus } from "./rosterPreview";@@ -78,7 +78,6 @@ export interface RosterRowProps {displayName: string;status: RosterStatus;preview: RosterPreview;- timeLabel?: string;active: boolean;unread: boolean;hidden: boolean;@@ -104,7 +103,6 @@ export function RosterRow({displayName,status,preview,- timeLabel,active,unread,hidden,@@ -124,7 +122,6 @@ export function RosterRow({onHoverEnd,}: RosterRowProps) {const t = useT();- const external = agent.runtime && agent.runtime !== "jarvis" ? agent.runtime : null;return (<divdata-agent-id={agent.agentId}@@ -145,7 +142,7 @@ export function RosterRow({aria-keyshortcuts={reorderable ? "Alt+Shift+ArrowUp Alt+Shift+ArrowDown" : undefined}style={agentTint(agent)}className={cn(- "as-row as-reveal-host select-none",+ "as-row as-reveal-host select-none [&:has(>[data-row-main]:focus-visible)]:ring-2 [&:has(>[data-row-main]:focus-visible)]:ring-ring",reorderable ? "cursor-grab" : null,dragging ? "cursor-grabbing" : null,hidden && "opacity-60",@@ -157,7 +154,7 @@ export function RosterRow({aria-label={t("society.profile_card.open").replace("{0}", displayName)}className="as-avatar rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">- <AgentSwatch agent={agent} size={36} />+ <AgentSwatch agent={agent} size={40} /><StatusMark status={status} />{shortcut !== null ? <span className="as-shortcut-badge" aria-hidden>{shortcut}</span> : null}</button>@@ -165,22 +162,10 @@ export function RosterRow({type="button"onClick={onOpen}aria-current={active ? "true" : undefined}- className="flex min-w-0 flex-1 select-none flex-col justify-center gap-0.5 self-stretch rounded-md text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"+ data-row-main+ className="flex min-w-0 flex-1 select-none flex-col justify-center gap-0.5 self-stretch text-left focus-visible:outline-none">- <span className="flex min-w-0 items-center gap-1.5">- <span className={cn("as-row-name", unread && "font-semibold text-foreground-strong")}>{displayName}</span>- {external ? (- <span className="inline-flex shrink-0 [&_img]:size-3.5" title={t(`society.runtime.${external}`)}>- <RuntimeMark runtime={external} label={t(`society.runtime.${external}`)} />- </span>- ) : null}- {agent.tier === "lead" ? (- <span className="shrink-0 rounded-[5px] bg-secondary px-1.5 text-[10px] font-medium leading-4 text-muted-foreground">- {t("society.tier.lead")}- </span>- ) : null}- {timeLabel ? <span className="as-row-time ml-auto pl-1">{timeLabel}</span> : null}- </span>+ <span className={cn("as-row-name", unread && "font-semibold text-foreground-strong")}>{displayName}</span>{" "}<PreviewLine preview={preview} /></button>@@ -194,7 +179,7 @@ export function RosterRow({event.stopPropagation();onContextMenu(event);}}- className="as-reveal as-ghost-button -mr-1 h-7 min-w-7 shrink-0 px-0"+ className="as-reveal as-round-button -mr-1 shrink-0" data-size="sm"data-testid="roster-row-more"><MoreHorizontal className="h-4 w-4" aria-hidden />diff --git a/dodaios/ui/web/frontend/src/components/society/roster/RosterSection.tsx b/dodaios/ui/web/frontend/src/components/society/roster/RosterSection.tsxdeleted file mode 100644index 34d25ea5f4..0000000000--- a/dodaios/ui/web/frontend/src/components/society/roster/RosterSection.tsx+++ /dev/null@@ -1,86 +0,0 @@-/**- * A titled group of roster rows ("Needs you", "Teams", "Agents"). The heading- * carries a count and folds the group; the fold is remembered per section.- */-import { useCallback, useId, useState, type ReactNode } from "react";-import { ChevronDown } from "lucide-react";--import { cn } from "@/lib/utils";--const COLLAPSED_KEY = "society.roster.sections.collapsed.v1";--function readCollapsed(): string[] {- try {- const value: unknown = JSON.parse(localStorage.getItem(COLLAPSED_KEY) ?? "[]");- return Array.isArray(value) ? value.filter((id): id is string => typeof id === "string") : [];- } catch {- return [];- }-}--export function useSectionFold(sectionId: string): [boolean, () => void] {- const [folded, setFolded] = useState(() => readCollapsed().includes(sectionId));- const toggle = useCallback(() => {- setFolded((value) => {- const next = !value;- const stored = readCollapsed().filter((id) => id !== sectionId);- try {- localStorage.setItem(COLLAPSED_KEY, JSON.stringify(next ? [...stored, sectionId] : stored));- } catch {- // Private mode: the fold holds for this window.- }- return next;- });- }, [sectionId]);- return [folded, toggle];-}--export function RosterSection({- id,- title,- count,- tone,- action,- children,- className,-}: {- id: string;- title: string;- count?: number;- /** "attention" colours the heading for the Needs-you group. */- tone?: "attention";- /** A small trailing control in the heading. */- action?: ReactNode;- children: ReactNode;- className?: string;-}) {- const [folded, toggle] = useSectionFold(id);- const bodyId = useId();- return (- <section className={cn("flex flex-col", className)} data-testid={`roster-section-${id}`} aria-label={title}>- <div className="as-section-head as-reveal-host">- <button- type="button"- onClick={toggle}- aria-expanded={!folded}- aria-controls={bodyId}- className={cn(- "-ml-1 flex min-w-0 items-center gap-1 rounded px-1 py-0.5 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",- tone === "attention" && "text-warning hover:text-warning",- )}- >- <span className="truncate">{title}</span>- {count !== undefined ? <span className="as-section-count">{count}</span> : null}- <ChevronDown- aria-hidden- className={cn("as-reveal h-3 w-3 shrink-0 transition-transform duration-150 motion-reduce:transition-none", folded && "-rotate-90")}- />- </button>- {action ? <span className="ml-auto flex items-center">{action}</span> : null}- </div>- <div id={bodyId} hidden={folded}>- {children}- </div>- </section>- );-}diff --git a/dodaios/ui/web/frontend/src/components/society/roster/rosterPrefs.ts b/dodaios/ui/web/frontend/src/components/society/roster/rosterPrefs.tsindex bc64b0a2d3..123f117320 100644--- a/dodaios/ui/web/frontend/src/components/society/roster/rosterPrefs.ts+++ b/dodaios/ui/web/frontend/src/components/society/roster/rosterPrefs.ts@@ -1,7 +1,7 @@/*** The person's own arrangement of the roster, kept in this browser profile:- * which agents are hidden, the hand-made order, the pinned agents and the- * list filter. Every read survives bad or missing storage (private mode, a+ * which agents are hidden, the hand-made order and the pinned agents. Every+ * read survives bad or missing storage (private mode, a* hand-edited value) by falling back to the default.*/import { useCallback, useState } from "react";@@ -9,14 +9,10 @@ import { useCallback, useState } from "react";export const HIDDEN_AGENTS_KEY = "society.roster.hidden-agent-ids";export const ORDER_KEY = "society.roster.order";export const PINNED_KEY = "society.roster.pinned.v1";-export const FILTER_KEY = "society.roster.filter.v1";/** Two rows of four pinned tiles; a ninth pin would only push one off screen. */export const MAX_PINNED = 8;-export type RosterFilter = "all" | "needs-you" | "unread";-const FILTERS: readonly RosterFilter[] = ["all", "needs-you", "unread"];-export function readIdList(key: string): string[] {try {const value: unknown = JSON.parse(localStorage.getItem(key) ?? "[]");@@ -34,15 +30,6 @@ export function writeIdList(key: string, ids: string[]): void {}}-export function readFilter(): RosterFilter {- try {- const value = localStorage.getItem(FILTER_KEY);- return FILTERS.includes(value as RosterFilter) ? (value as RosterFilter) : "all";- } catch {- return "all";- }-}-/** A persisted id list with a setter that writes through. */export function usePersistedIds(key: string): [string[], (update: (current: string[]) => string[]) => void] {const [ids, setIds] = useState(() => readIdList(key));@@ -63,16 +50,3 @@ export function togglePin(current: string[], agentId: string): string[] {if (current.length >= MAX_PINNED) return current;return [...current, agentId];}--export function useRosterFilter(): [RosterFilter, (filter: RosterFilter) => void] {- const [filter, setFilter] = useState(readFilter);- const update = useCallback((next: RosterFilter) => {- setFilter(next);- try {- localStorage.setItem(FILTER_KEY, next);- } catch {- // Private mode: the filter holds for this window.- }- }, []);- return [filter, update];-}diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/de.json b/dodaios/ui/web/frontend/src/i18n/locales/society/de.jsonindex 72009522ce..665d37543c 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/de.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/de.json@@ -1,16 +1,16 @@{"society": {"card": {- "options_collapse": "Optionen einklappen",- "options_expand": "Optionen ausklappen"+ "options_collapse": "Details ausblenden",+ "options_expand": "Details anzeigen"},"agent_pane": {"tabs": "Agentendetails",- "tab_overview": "Übersicht",+ "tab_overview": "Details","tab_tools": "Werkzeuge & Zugriff","tab_memory": "Gedächtnis","tab_tasks": "Aufgaben",- "tab_browser": "Browser",+ "tab_browser": "Computer","tab_history": "Verlauf","back": "Zurück","next_steps": "Nächste Schritte",@@ -30,7 +30,7 @@"open": "Öffnen","instructions_empty": "Noch keine festen Anweisungen. Sag ihm, was seine Aufgabe ist, hier oder im Chat.","runs_on": "Läuft auf",- "seat_hint": "Das Modell wechselst du in der Modellauswahl des Chats. Die Laufzeit bleibt für das ganze Leben des Agenten gleich.",+ "seat_hint": "Ändere das Modell hier oder im +-Menü des Chats. Die Laufzeit bleibt für das ganze Leben des Agenten gleich.","anatomy": "Woraus er besteht","instructions_learned": "Geschrieben, dazu {0} gelernte Regeln","instructions_written": "Wie er arbeitet",@@ -119,7 +119,13 @@"keep_private": "Privat behalten","keep": "Behalten","forget": "Vergessen",- "more_lines": "+{0} weitere Zeilen"+ "more_lines": "+{0} weitere Zeilen",+ "close": "Details schließen",+ "more": "Mehr",+ "runtime": "Laufzeit",+ "see_all": "Alle anzeigen",+ "history_detail": "Chats und Anrufe",+ "record_line": "{0} Läufe · {1} ausgegeben · zuletzt aktiv {2}"},"browser_profiles": {"profile_unavailable": "Profil getrennt — bitte ein Profil auswählen",@@ -2077,8 +2083,7 @@"setup_in_chat": "Im Chat einrichten","setup_prompt": "Leg mir eine Routine an: ","or_chat": "Oder im Chat beschreiben",- "empty_body": "Aufgaben, die dieser Agent von selbst erledigt, etwa eine Morgenübersicht oder ein Wochencheck.",- "active_hint": "Aktive von allen Routinen"+ "empty_body": "Aufgaben, die dieser Agent von selbst erledigt, etwa eine Morgenübersicht oder ein Wochencheck."},"parking": {"title": "Pausiert: Ergebnisse blieben ungelesen",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/en.json b/dodaios/ui/web/frontend/src/i18n/locales/society/en.jsonindex d5ddd308c3..9fdaefd984 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/en.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/en.json@@ -1,16 +1,16 @@{"society": {"card": {- "options_collapse": "Collapse Options",- "options_expand": "Expand Options"+ "options_collapse": "Hide details",+ "options_expand": "Show details"},"agent_pane": {"tabs": "Agent details",- "tab_overview": "Overview",+ "tab_overview": "Details","tab_tools": "Tools & access","tab_memory": "Memory","tab_tasks": "Tasks",- "tab_browser": "Browser",+ "tab_browser": "Computer","tab_history": "History","back": "Back","next_steps": "Next steps",@@ -30,7 +30,7 @@"open": "Open","instructions_empty": "No standing instructions yet. Tell it what its job is, here or in the chat.","runs_on": "Runs on",- "seat_hint": "Change the model in the chat's model picker. The runtime stays the same for the agent's whole life.",+ "seat_hint": "Change the model here or in the chat's + menu. The runtime stays the same for the agent's whole life.","anatomy": "What it is made of","instructions_learned": "Written, plus {0} learned rules","instructions_written": "How it works",@@ -119,7 +119,13 @@"keep_private": "Keep private","keep": "Keep","forget": "Forget",- "more_lines": "+{0} more lines"+ "more_lines": "+{0} more lines",+ "close": "Close details",+ "more": "More",+ "runtime": "Runtime",+ "see_all": "See all",+ "history_detail": "Chats and calls",+ "record_line": "{0} runs · {1} spent · last active {2}"},"browser_profiles": {"profile_unavailable": "Profile disconnected — choose a profile",@@ -2077,8 +2083,7 @@"setup_in_chat": "Set one up in chat","setup_prompt": "Create a routine for me: ","or_chat": "Or describe it in chat",- "empty_body": "Jobs this agent runs on its own, like a morning digest or a weekly check.",- "active_hint": "Active of all routines"+ "empty_body": "Jobs this agent runs on its own, like a morning digest or a weekly check."},"parking": {"title": "Paused: results went unread",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/es.json b/dodaios/ui/web/frontend/src/i18n/locales/society/es.jsonindex 7bce608aea..3b11a6f67a 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/es.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/es.json@@ -1,16 +1,16 @@{"society": {"card": {- "options_collapse": "Contraer opciones",- "options_expand": "Expandir opciones"+ "options_collapse": "Ocultar detalles",+ "options_expand": "Mostrar detalles"},"agent_pane": {"tabs": "Detalles del agente",- "tab_overview": "Resumen",+ "tab_overview": "Detalles","tab_tools": "Herramientas y acceso","tab_memory": "Memoria","tab_tasks": "Tareas",- "tab_browser": "Navegador",+ "tab_browser": "Ordenador","tab_history": "Historial","back": "Volver","next_steps": "Próximos pasos",@@ -30,7 +30,7 @@"open": "Abrir","instructions_empty": "Aún no hay instrucciones fijas. Dile cuál es su trabajo, aquí o en el chat.","runs_on": "Funciona con",- "seat_hint": "Cambia el modelo en el selector de modelo del chat. El entorno de ejecución es el mismo durante toda la vida del agente.",+ "seat_hint": "Cambia el modelo aquí o en el menú + del chat. El entorno se mantiene durante toda la vida del agente.","anatomy": "De qué está hecho","instructions_learned": "Escritas, más {0} reglas aprendidas","instructions_written": "Cómo trabaja",@@ -119,7 +119,13 @@"keep_private": "Mantener privado","keep": "Conservar","forget": "Olvidar",- "more_lines": "+{0} líneas más"+ "more_lines": "+{0} líneas más",+ "close": "Cerrar detalles",+ "more": "Más",+ "runtime": "Entorno",+ "see_all": "Ver todo",+ "history_detail": "Chats y llamadas",+ "record_line": "{0} ejecuciones · {1} gastado · última actividad {2}"},"browser_profiles": {"profile_unavailable": "Perfil desconectado — elige un perfil",@@ -2077,8 +2083,7 @@"setup_in_chat": "Configurar en el chat","setup_prompt": "Créame una rutina: ","or_chat": "O descríbela en el chat",- "empty_body": "Tareas que este agente hace por su cuenta, como un resumen matutino o una revisión semanal.",- "active_hint": "Activas de todas las rutinas"+ "empty_body": "Tareas que este agente hace por su cuenta, como un resumen matutino o una revisión semanal."},"parking": {"title": "En pausa: resultados sin leer",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json b/dodaios/ui/web/frontend/src/i18n/locales/society/pt.jsonindex bf3140a2f1..c1f39d6fc4 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json@@ -1,16 +1,16 @@{"society": {"card": {- "options_collapse": "Recolher opções",- "options_expand": "Expandir opções"+ "options_collapse": "Ocultar detalhes",+ "options_expand": "Mostrar detalhes"},"agent_pane": {"tabs": "Detalhes do agente",- "tab_overview": "Visão geral",+ "tab_overview": "Detalhes","tab_tools": "Ferramentas e acesso","tab_memory": "Memória","tab_tasks": "Tarefas",- "tab_browser": "Navegador",+ "tab_browser": "Computador","tab_history": "Histórico","back": "Voltar","next_steps": "Próximos passos",@@ -30,7 +30,7 @@"open": "Abrir","instructions_empty": "Ainda não há instruções fixas. Diga qual é o trabalho dele, aqui ou no chat.","runs_on": "Roda em",- "seat_hint": "Troque o modelo no seletor de modelo do chat. O ambiente de execução é o mesmo durante toda a vida do agente.",+ "seat_hint": "Mude o modelo aqui ou no menu + do chat. O ambiente continua o mesmo durante toda a vida do agente.","anatomy": "Do que ele é feito","instructions_learned": "Escritas, mais {0} regras aprendidas","instructions_written": "Como ele trabalha",@@ -119,7 +119,13 @@"keep_private": "Manter privado","keep": "Manter","forget": "Esquecer",- "more_lines": "+{0} linhas"+ "more_lines": "+{0} linhas",+ "close": "Fechar detalhes",+ "more": "Mais",+ "runtime": "Ambiente",+ "see_all": "Ver tudo",+ "history_detail": "Conversas e chamadas",+ "record_line": "{0} execuções · {1} gasto · última atividade {2}"},"browser_profiles": {"profile_unavailable": "Perfil desligado — escolhe um perfil",@@ -2077,8 +2083,7 @@"setup_in_chat": "Configurar no chat","setup_prompt": "Cria-me uma rotina: ","or_chat": "Ou descreva-a no chat",- "empty_body": "Tarefas que este agente faz sozinho, como um resumo da manhã ou uma verificação semanal.",- "active_hint": "Ativas de todas as rotinas"+ "empty_body": "Tarefas que este agente faz sozinho, como um resumo da manhã ou uma verificação semanal."},"parking": {"title": "Em pausa: resultados não lidos",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json b/dodaios/ui/web/frontend/src/i18n/locales/society/zh.jsonindex 073afe348f..e12818a7da 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json@@ -1,16 +1,16 @@{"society": {"card": {- "options_collapse": "收起选项",- "options_expand": "展开选项"+ "options_collapse": "隐藏详情",+ "options_expand": "显示详情"},"agent_pane": {"tabs": "智能体详情",- "tab_overview": "概览",+ "tab_overview": "详情","tab_tools": "工具与权限","tab_memory": "记忆","tab_tasks": "任务",- "tab_browser": "浏览器",+ "tab_browser": "电脑","tab_history": "历史","back": "返回","next_steps": "下一步",@@ -30,7 +30,7 @@"open": "打开","instructions_empty": "还没有固定指令。在这里或聊天中告诉它它的工作是什么。","runs_on": "运行于",- "seat_hint": "在聊天的模型选择器中更换模型。运行环境在智能体的整个生命周期内保持不变。",+ "seat_hint": "可在这里或聊天的 + 菜单中更换模型。运行环境在智能体的整个生命周期内保持不变。","anatomy": "它的组成","instructions_learned": "已写好,另有 {0} 条学到的规则","instructions_written": "它的工作方式",@@ -119,7 +119,13 @@"keep_private": "保持私有","keep": "保留","forget": "忘记",- "more_lines": "还有 {0} 行"+ "more_lines": "还有 {0} 行",+ "close": "关闭详情",+ "more": "更多",+ "runtime": "运行环境",+ "see_all": "查看全部",+ "history_detail": "聊天和通话",+ "record_line": "{0} 次运行 · 已花费 {1} · 最近活跃 {2}"},"browser_profiles": {"profile_unavailable": "配置文件已断开 — 请选择一个配置文件",@@ -2077,8 +2083,7 @@"setup_in_chat": "在聊天中设置","setup_prompt": "帮我创建一个例行任务:","or_chat": "或在聊天中描述",- "empty_body": "这个智能体自行完成的工作,例如早间摘要或每周检查。",- "active_hint": "启用的例行任务 / 全部"+ "empty_body": "这个智能体自行完成的工作,例如早间摘要或每周检查。"},"parking": {"title": "已暂停:结果无人查看",