# Status

One frame for every in-chat status: a thought, a tool call or a run of them, an edit, a compaction, an account switch, a system line, and a turn's folded work.

Live variants: https://design.arcadia.is/components/status

```tsx
import {
  Status, StatusProps, StatusKind, StatusState, StatusTone, StatusFrame,
  StatusPart, StatusFile,
} from "@arcadia/ui";
```

```tsx
import { Status } from "@arcadia/ui";

function InContext() {
  const since = useSince(4200);
  return (
    <div {...sx("site-status-column", StatusStyles.column)}>
      <div {...sx("site-status-stack", StatusStyles.stack)}>
        <Status kind="thinking" action="Thinking" state="running" since={since} />
        <Status kind="tool" action="Read" object="src/pricing.ts" mono glyph="file-text" state="done" />
        <Status kind="tool" action="Edited" object="src/cart/total.ts" mono state="failed" tone="warning">
          <p {...stylex.props(StatusStyles.prose)}>The text to replace was not found in src/cart/total.ts.</p>
        </Status>
        <Status kind="system" action="Crew messaged" object="the cart suite passes on main" glyph="team" />
        <Status kind="worked-for" durationMs={252000} facts={["3 edits", "2 commands"]} defaultOpen>
          <Status kind="thinking" action="Thought" elapsedMs={4000}>
            <p {...stylex.props(StatusStyles.prose)}>The stale price comes from keying the cache on SKU alone.</p>
          </Status>
          <Status kind="tool" action="Read" object="src/pricing.ts" mono glyph="file-text" state="done" />
          <Status kind="tool" action="Ran" object="bun test src/cart" mono state="done" />
        </Status>
      </div>
    </div>
  );
}
```

## With a character

```tsx
import { Avatar, characterFromId, Status } from "@arcadia/ui";

function WithCharacter() {
  const since = useSince(4200);
  return (
    <Status kind="thinking" frame="none" action="Looking through files" state="running" since={since}
      avatar={<Avatar kind="agent" avatar={characterFromId("agt_juniper")} name="Juniper" size={16} state="working" />} />
  );
}
```

## Accessibility

A line that folds or takes `onHeaderClick` is one button named by its verb and its object, with its figure read after them; a static line with nothing under it is plain text. The glyph is decoration: a failure and a retry are words in the line, so the state is never carried by colour alone. An edit's files are a list named Files changed, each row reading its path and its counts.

Nothing here is a live region: a turn that runs its clock does not announce a tick, and the product decides what to announce once. Under reduced motion the sweep stops and the chevron turns in one frame; the words, the inks and the counts still tell the state.

## API reference

### Status

- `kind` (`"frame"`)
- `rootStyle` (`RootStyle`): A component's typed override prop: `Layout` and its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).

Rest props go to `HTMLAttributes<HTMLDivElement>`.
