# Mission Control

> The home page of a multi-agent workspace: a direct chat with the orchestrating agent in the middle and, around it, live, what is coordinated where.

Pattern · Halo kit · [Live page](https://ui.twentyfirst.media/halo/patterns/MissionControlScreen/)

The home page of a multi-agent workspace: a direct chat with the orchestrating agent in the middle and, around it, live, what is coordinated where.

- **Centre**: the main agent's chat (`ChatThread`, `ChatMessage`, `Composer` with `@` mentions of the leads); `PromptStarters` while it is empty.
- **Beside it**: open approvals as compact `ApprovalCard`s (money with `MoneyPreview` and the passkey step), today's costs against the budget (`UsageMeter`).
- **Below**: `AgentNetwork` with handoffs moving along the lines and `CoordinationTicker` with the latest handoffs, runs and approvals.
- **Phones**: the chat first, the rest as tabs (Agents, Activity, Approvals, Costs).
- **Glass**: switch glass on in the look menu; `AppearanceProvider` paints `Ambient` behind the frame and every panel turns to glass.

## Code

```tsx
import * as React from "react";
import {
  AgentMark,
  AgentNetwork,
  AgentStatus,
  AppShell,
  AppearanceProvider,
  ApprovalCard,
  ChatMessage,
  ChatThread,
  CommandPalette,
  Composer,
  CoordinationTicker,
  IconButton,
  MoneyPreview,
  Panel,
  PromptStarters,
  SearchTrigger,
  Tabs,
  UsageMeter,
  useUI,
  useWidth,
} from "@twentyfirstmedia/halo";
import type {
  AgentNetworkHandoff,
  ApprovalKey,
  NotificationItem,
  SidebarGroup,
} from "@twentyfirstmedia/halo";
import { NETWORK, NOW, TICKER } from "./_coordination";

const GROUPS: SidebarGroup[] = [
  {
    items: [
      { id: "home", label: "Mission control", icon: "home", href: "/" },
      {
        id: "approvals",
        label: "Approvals",
        icon: "lock",
        href: "/approvals",
        count: 3,
        countTone: "signal",
      },
      { id: "chats", label: "Chats", icon: "mail", href: "/chats", count: 4 },
      { id: "agents", label: "Agents", icon: "bot", href: "/agents" },
    ],
  },
  {
    label: "Workspace",
    items: [
      { id: "projects", label: "Projects", icon: "folder", href: "/projects" },
      { id: "costs", label: "Costs", icon: "card", href: "/costs" },
      { id: "settings", label: "Settings", icon: "settings", href: "/settings" },
    ],
  },
];

const NOTES: NotificationItem[] = [
  {
    id: 1,
    icon: "lock",
    tint: "lilac",
    title: "Refund of €40.00 waits for you",
    text: "Shop lead · Northwind Shop",
    time: "11:57",
    unread: true,
  },
  {
    id: 2,
    icon: "x",
    tint: "blush",
    title: "Release failed on the iOS target",
    text: "Atlas App",
    time: "11:40",
    unread: true,
  },
];

const STARTERS = [
  {
    icon: "sparkle" as const,
    tint: "lilac" as const,
    title: "Brief me on today",
    text: "What moved, what waits for me",
    prompt: "Brief me on today: what moved and what waits for me?",
  },
  {
    icon: "lock" as const,
    tint: "butter" as const,
    title: "Open approvals",
    text: "Oldest first, with the risk",
    prompt: "Walk me through the open approvals, oldest first.",
  },
  {
    icon: "zap" as const,
    tint: "sky" as const,
    title: "Plan a launch",
    text: "Split it across the leads",
    prompt: "Plan the Atlas 2.4 launch and hand the parts to the leads.",
  },
  {
    icon: "card" as const,
    tint: "mint" as const,
    title: "Costs this week",
    text: "Per project against the budget",
    prompt: "How do this week's costs compare to the budgets?",
  },
];

type Msg = { id: string; role: "user" | "assistant"; text: string };

function MainChat({ grow }: { grow?: boolean }) {
  const [messages, setMessages] = React.useState<Msg[]>([]);
  const [busy, setBusy] = React.useState(false);
  const send = (text: string) => {
    if (!text.trim()) return;
    const n = messages.length;
    setMessages((m) => [...m, { id: `u${n}`, role: "user", text }]);
    setBusy(true);
    setTimeout(() => {
      setMessages((m) => [
        ...m,
        {
          id: `a${n}`,
          role: "assistant",
          text: "On it. I asked the **Shop lead** for the refund details and the **App lead** for the failed build. Two approvals wait for you on the right.",
        },
      ]);
      setBusy(false);
    }, 900);
  };
  return (
    <Panel
      title="Main agent"
      subtitle="Orchestrates 3 leads and 6 agents"
      action={<AgentStatus status="Running" step="Planning the week" />}
      style={grow ? { minHeight: 560 } : undefined}
    >
      <div className="tf-col" style={{ gap: 12, flex: 1, minHeight: 0 }}>
        {messages.length === 0 ? (
          <div className="tf-col" style={{ gap: 16, alignItems: "center", padding: "24px 0" }}>
            <AgentMark tint="lilac" icon="sparkle" size={48} />
            <p className="tf-card-desc" style={{ margin: 0, textAlign: "center" }}>
              Ask the main agent anything. It hands the work to the right lead.
            </p>
            <PromptStarters items={STARTERS} onPick={send} />
          </div>
        ) : (
          <div style={{ flex: 1, minHeight: 280, display: "flex" }}>
            <ChatThread label="Main agent">
              {messages.map((m) => (
                <ChatMessage
                  key={m.id}
                  id={m.id}
                  role={m.role}
                  name={m.role === "assistant" ? "Main agent" : undefined}
                  tint="lilac"
                  text={m.text}
                />
              ))}
            </ChatThread>
          </div>
        )}
        <Composer
          placeholder="Message the main agent…"
          busy={busy}
          onSend={(text) => send(text)}
          mentionOptions={[
            {
              id: "shop-lead",
              label: "Shop lead",
              group: "Leads",
              tint: "sky",
              role: "Northwind Shop",
            },
            { id: "app-lead", label: "App lead", group: "Leads", tint: "mint", role: "Atlas App" },
            {
              id: "office-lead",
              label: "Office lead",
              group: "Leads",
              tint: "butter",
              role: "Back office",
            },
          ]}
        />
      </div>
    </Panel>
  );
}

function Approvals() {
  const [done, setDone] = React.useState<Record<string, ApprovalKey>>({});
  const decide = (id: string) => (key: ApprovalKey) =>
    new Promise<void>((resolve) => {
      setTimeout(() => {
        setDone((d) => ({ ...d, [id]: key }));
        resolve();
      }, 600);
    });
  return (
    <div className="tf-col" style={{ gap: 12 }}>
      <ApprovalCard
        compact
        stepUp
        family="money"
        agent="Shop lead"
        project="Northwind Shop"
        age="3 min"
        title="Refund €40.00 for order 4417"
        text="The parcel arrived damaged; the photo is in the thread."
        decision={done.refund ? { key: done.refund, by: "You", at: "now" } : null}
        onDecide={decide("refund")}
      >
        <MoneyPreview
          amount={40}
          currency="EUR"
          recipient="Card ending 4242"
          refund={{ payment: "Order 4417 · €40.00", paidAt: "Apr 12" }}
          stepUp
        />
      </ApprovalCard>
      <ApprovalCard
        compact
        family="marketing"
        agent="Ads"
        project="Northwind Shop"
        age="24 min"
        title="Raise the search budget to €30 a day"
        text="Cost per order fell 18% this week."
        decision={done.ads ? { key: done.ads, by: "You", at: "now" } : null}
        onDecide={decide("ads")}
      />
    </div>
  );
}

function Costs() {
  return (
    <div className="tf-col" style={{ gap: 16 }}>
      <UsageMeter
        label="Today, all projects"
        used={38.4}
        limit={60}
        format={(v) => `€${v.toFixed(2)}`}
      />
      <UsageMeter
        label="Northwind Shop"
        used={21.1}
        limit={25}
        format={(v) => `€${v.toFixed(2)}`}
      />
      <UsageMeter label="Atlas App" used={12.9} limit={25} format={(v) => `€${v.toFixed(2)}`} />
      <UsageMeter label="Back office" used={4.4} limit={10} format={(v) => `€${v.toFixed(2)}`} />
    </div>
  );
}

const ROUTES: [string, string, string][] = [
  ["main", "shop-lead", "Refund request"],
  ["shop-lead", "support", "Ask for the photo"],
  ["main", "app-lead", "Fix the iOS build"],
  ["app-lead", "release", "Retry with Xcode 18"],
  ["qa", "app-lead", "Tests passed"],
  ["main", "books", "November invoices"],
];

function MissionControl() {
  const [boxRef, width] = useWidth<HTMLDivElement>(undefined, 1200);
  const phone = width < 640;
  const wide = width >= 1100;
  const [handoffs, setHandoffs] = React.useState<AgentNetworkHandoff[]>([]);
  const n = React.useRef(0);
  const motion = useUI().motion;
  React.useEffect(() => {
    if (motion === "off" || typeof window === "undefined") return;
    if (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
    const timer = setInterval(() => {
      const [from, to, label] = ROUTES[n.current % ROUTES.length]!;
      n.current += 1;
      setHandoffs((h) => [...h.slice(-10), { id: `h${n.current}`, from, to, label }]);
    }, 3000);
    return () => clearInterval(timer);
  }, [motion]);
  const network = <AgentNetwork root={NETWORK} handoffs={handoffs} height={360} />;
  const ticker = <CoordinationTicker items={TICKER} now={NOW} max={5} />;
  if (phone)
    return (
      <div ref={boxRef} className="tf-col" style={{ gap: 16 }}>
        <MainChat />
        <Panel>
          <Tabs
            items={["Agents", "Activity", "Approvals", "Costs"]}
            label="Mission control"
            block
            panels={{
              Agents: network,
              Activity: ticker,
              Approvals: <Approvals />,
              Costs: <Costs />,
            }}
          />
        </Panel>
      </div>
    );
  if (!wide)
    return (
      <div ref={boxRef} className="tf-col" style={{ gap: 16 }}>
        <MainChat />
        <Panel title="Agents" subtitle="Handoffs move live along the lines">
          {network}
        </Panel>
        <div
          style={{
            display: "grid",
            gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
            gap: 16,
            alignItems: "start",
          }}
        >
          <Panel title="Waiting for you" subtitle="2 approvals">
            <Approvals />
          </Panel>
          <div className="tf-col" style={{ gap: 16 }}>
            <Panel title="Coordination">{ticker}</Panel>
            <Panel title="Costs today" subtitle="Against the daily budget">
              <Costs />
            </Panel>
          </div>
        </div>
      </div>
    );
  return (
    <div ref={boxRef} className="tf-col" style={{ gap: 16 }}>
      <div
        style={{
          display: "grid",
          gridTemplateColumns: "minmax(0, 1fr) minmax(300px, 380px)",
          gap: 16,
          alignItems: "start",
        }}
      >
        <MainChat grow />
        <div className="tf-col" style={{ gap: 16 }}>
          <Panel title="Waiting for you" subtitle="2 approvals">
            <Approvals />
          </Panel>
          <Panel title="Costs today" subtitle="Against the daily budget">
            <Costs />
          </Panel>
        </div>
      </div>
      <div
        style={{
          display: "grid",
          gridTemplateColumns: "minmax(0, 1.6fr) minmax(0, 1fr)",
          gap: 16,
          alignItems: "start",
        }}
      >
        <Panel title="Agents" subtitle="Handoffs move live along the lines">
          {network}
        </Panel>
        <Panel title="Coordination">{ticker}</Panel>
      </div>
    </div>
  );
}

function App() {
  const [search, setSearch] = React.useState(false);
  const [notes, setNotes] = React.useState(NOTES);
  return (
    <>
      <AppShell
        navigation="sidebar"
        topbar
        brand="Control"
        pathname="/"
        topStart={
          <SearchTrigger
            placeholder="Search agents, chats, approvals…"
            shortcut="⌘K"
            bindShortcut
            onClick={() => setSearch(true)}
          />
        }
        topStartCompact={
          <IconButton
            icon="search"
            label="Search"
            variant="ghost"
            onClick={() => setSearch(true)}
          />
        }
        notifications={{
          items: notes,
          onReadAll: () => setNotes((x) => x.map((i) => ({ ...i, unread: false }))),
        }}
        appearance
        sidebarGroups={GROUPS}
        user={{ name: "Mara Ellis", email: "mara@example.com" }}
        tabBar
        dock={false}
      >
        <MissionControl />
      </AppShell>
      <CommandPalette
        open={search}
        onClose={() => setSearch(false)}
        placeholder="Search agents, chats, approvals…"
        items={GROUPS.flatMap((g) => g.items || []).map((it) => ({
          group: "Pages",
          label: it.label,
          icon: it.icon,
          run: () => setSearch(false),
        }))}
      />
    </>
  );
}

export default function Preview() {
  // In an app: <AppearanceProvider kits={["halo", "pro"]}> once around everything; glass shows
  // Ambient behind the frame. Here the preview starts in the docs' kit and theme.
  const ui = useUI();
  return (
    <AppearanceProvider
      key={`${ui.kit}-${ui.theme}`}
      scope="subtree"
      storageKey={false}
      kits={["halo", "pro"]}
      defaults={{ kit: ui.kit, theme: ui.theme === "dark" ? "dark" : "light" }}
    >
      <App />
    </AppearanceProvider>
  );
}
```

## Props

### AppShell

| Prop | Type | Notes |
| --- | --- | --- |
| `active?` | `string` | Id (or label) of the current page; or let `pathname` find it. |
| `pathname?` | `string` | The current path (`usePathname()` in Next.js): the page whose `href` matches it marks itself, the longest match winning, so `/settings/billing` marks "Billing" before "Settings". |
| `linkAs?` | `ElementType` | The element nav items with an `href` render as everywhere in the shell (top nav, sidebar, tab bar, rail, dock), e.g. Next.js `Link`; default `UIProvider linkAs`, else `a`. |
| `notifications?` | `NotificationCenterProps` | The bell in the top bar: unread count, a popover (a sheet on phones) with the list. |
| `appearance?` | `boolean \| AppearanceMenuProps` | The look menu (`AppearanceMenu`) in the top bar; `true` for the default one. |
| `tabBar?` | `boolean \| number` | On phones (up to 760px wide): a tab bar at the bottom with the first pages (default 4) and "More" for the rest. `true` or the number of tabs. |
| `skipLink?` | `boolean` | A "Skip to content" link before the navigation (default true). |
| `mainId?` | `string` | Id of the `<main>` element the skip link jumps to (default generated). |
| `brand?` | `ReactNode` | The product name, or a node (a logo mark with the name; collapsed sidebars show it whole). |
| `brandDot?` | `boolean` | The status dot after the brand (default `true`); turn it off next to a logo of your own. |
| `tag?` | `string` |  |
| `nav?` | `NavItem[]` |  |
| `user?` | `{ name: string; email?: string }` |  |
| `onNavigate?` | `(label: string) => void` |  |
| `topExtra?` | `ReactNode` |  |
| `sheetStyle?` | `CSSProperties` |  |
| `contentKey?` | `string \| number` |  |
| `side?` | `ReactNode` |  |
| `dock?` | `boolean` |  |
| `dockItems?` | `DockProps["items"]` |  |
| `railTop?` | `RailItem[]` |  |
| `railBottom?` | `RailItem[]` |  |
| `fill?` | `boolean` | The shell is the whole page: at least the viewport's height (100dvh), no outer radius, the sheet fills the rest; on desktop the sidebar stays in view while the page scrolls, on phones the sheet starts right under the sidebar's bar. |
| `navigation?` | `"top" \| "sidebar"` |  |
| `sidebarGroups?` | `SidebarGroup[]` | With `navigation="sidebar"`: groups instead of the flat `nav` list. |
| `sidebar?` | `Partial<Omit<SidebarProps, "variant" \| "groups">>` | With `navigation="sidebar"`: more sidebar props (collapsed, storageKey, shortcut, linkAs …). |
| `workspaces?` | `WorkspaceSwitcherProps` | With `navigation="sidebar"`: the workspace switcher at the top instead of the brand. |
| `userMenu?` | `(MenuItem \| "-")[]` | The account menu's entries (with `navigation="sidebar"` at the foot of the sidebar). |
| `topbar?` | `boolean \| ReactNode` | With `navigation="sidebar"`: a bar across the top of the frame. The brand (or `workspaces`) moves into its start, as wide as the sidebar below it (expanded or collapsed); `topStart` follows it, `topEnd` sits at the end. Frame, bar and sidebar read as one L around the sheet. Content given here goes between `topStart` and `topEnd`. On phones the bar is the sidebar's bar (menu button and brand) with `topEnd` on the right and `topStart` behind an icon button. |
| `topStart?` | `ReactNode` | With `topbar`: right after the brand, e.g. a search field or a command palette trigger. |
| `topEnd?` | `ReactNode` | With `topbar`: at the end of the bar (buttons, menus); `topExtra` goes there too. |
| `topStartCompact?` | `ReactNode` | With `topbar` on phones: what stands in for `topStart` (default: an icon button that opens `topStart` over the bar). |
| `topStartIcon?` | `IconName` | The icon of that button (default `search`). |
| `topStartLabel?` | `string` | The accessible name of that button (default "Search"). |
| `children?` | `ReactNode` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### AgentNetwork

| Prop | Type | Notes |
| --- | --- | --- |
| `root` | `AgentNetworkNode` | The orchestrator, with its leads and their agents as children. |
| `handoffs?` | `AgentNetworkHandoff[]` | Handoffs from your event stream; each new id animates a packet from `from` to `to`. |
| `animateInitial?` | `boolean` | Also animates the handoffs present at mount (default: only later ones). |
| `layout?` | `"auto" \| "graph" \| "list"` | "auto" (default): the graph, or a list when narrower than 560px. |
| `height?` | `number` | Height of the graph viewport (default 440). |
| `selected?` | `string \| null` | Selected node id (controlled); `null` for none. |
| `defaultSelected?` | `string \| null` |  |
| `onSelect?` | `(node: AgentNetworkNode \| null) => void` |  |
| `renderDetails?` | `(node: AgentNetworkNode) => ReactNode` | More content for the details card of the selected node. |
| `openLabel?` | `string` | Text of the details card's link (default "Open"). |
| `label?` | `string` | Accessible name of the graph (default "Agent network"). |
| `linkAs?` | `ElementType` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### CoordinationTicker

| Prop | Type | Notes |
| --- | --- | --- |
| `items` | `CoordinationEvent[]` | Newest first. |
| `max?` | `number` | Shows at most this many. |
| `live?` | `boolean` | Announces new lines to screen readers (default true). |
| `now?` | `Date \| string \| number` | Reference time for "2 min ago" (default now). |
| `emptyText?` | `string` |  |
| `label?` | `string` |  |
| `linkAs?` | `ElementType` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### ChatThread

| Prop | Type | Notes |
| --- | --- | --- |
| `children?` | `ReactNode` |  |
| `jumpTo?` | `string` | Scrolls to the message with this `id` (a search hit) and marks it for a moment. |
| `jumpKey?` | `string \| number` | Change it to jump to the same message again. |
| `stickToBottom?` | `boolean` | Follows the newest message while it grows, unless the reader scrolled up (default true). |
| `label?` | `string` | Accessible name (default "Conversation"). |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### ChatMessage

| Prop | Type | Notes |
| --- | --- | --- |
| `role` | `"user" \| "assistant" \| "system"` | Required |
| `id?` | `string` | Stable id: `ChatThread jumpTo` scrolls to it (rendered as `data-message-id`). |
| `name?` | `string` |  |
| `time?` | `string` |  |
| `model?` | `string` |  |
| `text?` | `string` |  |
| `streaming?` | `boolean` |  |
| `tint?` | `Tint` |  |
| `icon?` | `IconName` | Icon of a system line. |
| `sources?` | `Source[]` |  |
| `attachments?` | `ChatAttachment[]` | Images show as thumbnails, other files as chips with a download link. |
| `mentions?` | `Mention[]` | Mentions in a user's `text` (from `Composer`), drawn as tinted chips. |
| `highlight?` | `string` | Marks the words of a search in the text. |
| `voice?` | `{ src?: string; duration?: number; transcript?: ReactNode; peaks?: number[] }` | A voice message instead of text: the player, its length and the transcript. |
| `dictated?` | `boolean` | "Dictated" under the message. |
| `inVoice?` | `boolean` | "In voice conversation" under the message. |
| `usage?` | `string` |  |
| `onRetry?` | `() => void` | Regenerate: pass it on the last answer only. |
| `onFeedback?` | `(v: "up" \| "down" \| null) => void` | Thumbs up or down (null when the reader takes it back). |
| `onFeedbackComment?` | `(v: "up" \| "down", comment?: string) => void` | The comment after thumbs down (an empty comment for thumbs up). |
| `actions?` | `boolean` | `false` hides the action row; the rest of the props pick which actions show. |
| `actionsVisible?` | `"always" \| "hover"` | When the action row shows: "always", or "hover" (on hover and focus; always on touch screens). Default "always" for an answer with `onRetry` (the last one) and for a message with versions, else "hover". |
| `onEdit?` | `(text: string) => void` | Edit in place on the user's own message: called with the new text. |
| `editing?` | `boolean` | Controls whether the editor is open. |
| `onEditingChange?` | `(editing: boolean) => void` |  |
| `versionIndex?` | `number` | Versions of an edited message or a regenerated answer: "‹ 2/3 ›" (0-based index). |
| `versionCount?` | `number` |  |
| `onVersionChange?` | `(index: number) => void` |  |
| `versionBusy?` | `boolean` | While a version is being made. |
| `before?` | `ReactNode` | Content above the bubble: a tool call, the reasoning, an approval card. |
| `after?` | `ReactNode` | Content below the bubble: an approval card, a form, a result. |
| `children?` | `ReactNode` |  |
| `feedback?` | `"up" \| "down" \| null` |  |
| `linkAs?` | `ElementType` | Router link for relative links in the text. |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### Composer

| Prop | Type | Notes |
| --- | --- | --- |
| `value?` | `string` |  |
| `onChange?` | `(v: string) => void` |  |
| `onSend?` | `(text: string, files: (File \| ComposerAttachment)[], meta: ComposerSendMeta) => void` | Sends text, files and what goes with it (mentions, whether it was dictated). |
| `busy?` | `boolean` |  |
| `onStop?` | `() => void` |  |
| `placeholder?` | `string` |  |
| `label?` | `string` |  |
| `models?` | `ModelOption[]` |  |
| `model?` | `string` |  |
| `onModel?` | `(id: string) => void` |  |
| `commands?` | `ComposerCommand[]` |  |
| `onCommand?` | `(c: ComposerCommand) => void` |  |
| `attachments?` | `(File \| ComposerAttachment)[]` | Files to send: `File`s (images get a thumbnail) or items with progress or an error. |
| `onAttach?` | `(files: FileList \| File[]) => void` | Turns on attaching by the paperclip, by dropping and by pasting files. |
| `onRemoveAttachment?` | `(i: number) => void` |  |
| `camera?` | `boolean` | A camera button on touch screens (takes a photo as an attachment). |
| `hint?` | `string` |  |
| `left?` | `ReactNode` |  |
| `disabled?` | `boolean` |  |
| `mentionOptions?` | `MentionOption[]` | Who can be mentioned with `@`: agents and people, grouped by `group`. |
| `mentions?` | `Mention[]` | Controls the mentions in the text (they move along as the text changes). |
| `onMentionsChange?` | `(mentions: Mention[]) => void` |  |
| `dictation?` | `ComposerDictation` | Dictation, run by your app (speech to text on your server): `active` shows the recording state, `interim` the words heard so far in the field. Put the final words into `value`. |
| `onDictate?` | `() => void` | Shows the microphone and starts or stops dictation (also ⌥ Space). |
| `onVoiceMessage?` | `(audio: Blob, durationMs: number) => void` | Hold the microphone to record a voice message, slide away to cancel, let go to send. The recording stays in the browser until you get it here. |
| `onTyping?` | `() => void` | Called while the person types, at most every `typingInterval` ms (default 3000). |
| `typingInterval?` | `number` |  |
| `typing?` | `string[]` | Names of the people typing right now, shown above the field. |
| `readOnly?` | `boolean` | Shows the read-along bar instead of the field (watching a conversation). |
| `onStepIn?` | `() => void` | "Step in" on the read-along bar. |
| `readOnlyText?` | `string` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### PromptStarters

| Prop | Type | Notes |
| --- | --- | --- |
| `items` | `{ icon?: IconName; tint?: Tint; title: string; text?: string; prompt?: string }[]` | Required |
| `onPick?` | `(prompt: string) => void` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### ApprovalCard

| Prop | Type | Notes |
| --- | --- | --- |
| `title` | `ReactNode` | Required |
| `text?` | `ReactNode` |  |
| `children?` | `ReactNode` |  |
| `agent?` | `string` |  |
| `project?` | `string` |  |
| `family?` | `RiskFamily` |  |
| `familyLabel?` | `string` |  |
| `age?` | `string` |  |
| `escalation?` | `ReactNode` |  |
| `trace?` | `ReactNode` |  |
| `note?` | `ReactNode` |  |
| `heading?` | `string` |  |
| `options?` | `ApprovalOption[]` |  |
| `approveLabel?` | `string` |  |
| `onDecide?` | `(key: ApprovalKey, text?: string) => void \| Promise<unknown>` | Called with the answer (and the text of B or D). Return a Promise to keep the card busy until it settles: the answer's button spins and every answer is disabled; a rejection shows an error (a rejected string is shown as is) and keeps the card open. Once it resolves, a card without a `decision` prop collapses to its one-line record; with a plain callback, set `decision` yourself. |
| `decision?` | `ApprovalDecision \| null` | The decision record: shown as one line instead of the card; `null` keeps the card open. |
| `compact?` | `boolean` | Side panels: tighter, the answers in a row, the payload folded behind "Show what runs" (one click, never a summary). |
| `stepUp?` | `boolean` | Money, legal and infrastructure decisions: A and B (the answers that run something) need a fresh passkey. They show "Needs your passkey"; while `onDecide` is pending the pressed answer says "Confirm with passkey". Do the WebAuthn step-up in `onDecide` and reject if it fails. |
| `busy?` | `ApprovalKey \| null` | The answer being sent, when you track it yourself (controlled busy state). |
| `error?` | `ReactNode` | An error to show above the answers (controlled); a rejected `onDecide` shows one by itself. |
| `screen?` | `boolean` | Fills its container, e.g. a deep link on a phone: the content scrolls and A–D stay at the bottom, full width, in thumb reach (with the safe area). |
| `href?` | `string` | Makes the title a link to the full approval (with `linkAs` for a router's link). |
| `linkAs?` | `ElementType` |  |
| `onApprove?` | `() => void` |  |
| `onDeny?` | `() => void` |  |
| `onEdit?` | `(text: string) => void` |  |
| `state?` | `"approved" \| "denied"` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### MoneyPreview

| Prop | Type | Notes |
| --- | --- | --- |
| `title?` | `ReactNode` |  |
| `amount` | `number` | In the currency's units (12.5 = €12.50); negative for money going out of a booking. |
| `currency?` | `string` | ISO code (default EUR). |
| `recipient?` | `string` | Already masked ("DE89 …3000", "…4242"). |
| `reference?` | `ReactNode` |  |
| `account?` | `ReactNode` |  |
| `bookings?` | `MoneyBooking[]` | The bookings this writes, with their sum below. |
| `refund?` | `{ payment: ReactNode; paidAt?: ReactNode; original?: number }` | A refund: the payment it goes back to. |
| `stepUp?` | `boolean` | Shows "Needs a fresh passkey" (default true). |
| `facts?` | `KeyValueItem[]` |  |
| `warnings?` | `ReactNode[]` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### UsageMeter

| Prop | Type | Notes |
| --- | --- | --- |
| `used` | `number` | Required |
| `limit` | `number` | Required |
| `label?` | `string` |  |
| `caption?` | `string` |  |
| `format?` | `(v: number) => string` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### Tabs

| Prop | Type | Notes |
| --- | --- | --- |
| `items` | `string[]` | Required |
| `value?` | `string` |  |
| `defaultValue?` | `string` |  |
| `onChange?` | `(v: string) => void` |  |
| `block?` | `boolean` |  |
| `panels?` | `Record<string, ReactNode>` | Content per tab; renders the tab panels under the bar, wired with tab/tabpanel roles. |
| `label?` | `string` | Accessible name of the tab list. |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### SearchTrigger

| Prop | Type | Notes |
| --- | --- | --- |
| `placeholder?` | `string` | The text in the field (default "Search"). |
| `label?` | `string` | Accessible name instead of the visible text (keep the visible text in it). |
| `shortcut?` | `string` | The key hint, e.g. "⌘K" (hidden on touch screens). |
| `bindShortcut?` | `boolean` | ⌘/Ctrl + the hint's last key opens it too, except while typing in a field. |
| `onClick?` | `() => void` | Opens your search, e.g. a `CommandPalette`. |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### CommandPalette

| Prop | Type | Notes |
| --- | --- | --- |
| `items` | `PaletteItem[]` | Required |
| `onClose?` | `() => void` |  |
| `placeholder?` | `string` |  |
| `inline?` | `boolean` |  |
| `loading?` | `boolean` | Results are on their way (async search): shows a loading row. |
| `empty?` | `ReactNode` | Shown when nothing matches (default: "Nothing matches …"). |
| `onQueryChange?` | `(query: string) => void` | Called with the query as the user types, for searching on a server. |
| `open?` | `boolean` | Optional: with `open` the component stays mounted while it animates out; without it, render it only while open. |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |
