# BackgroundStatus

A small persistent indicator for runs still going while the person is elsewhere.

- **Use it for**: A small indicator for runs still going elsewhere.
- **Not for**: The list of runs itself. Try [RunBoard](https://unseenui.com/components/run-board/).

## Good to know

- Zero counts are hidden and an idle status reads "Nothing running". An unknown count still shows, as "?".

## Installation

```bash
npm install @stackunseen/ui
```

## Usage

```tsx
import { BackgroundStatus } from '@stackunseen/ui/conversation-flow';
import '@stackunseen/ui/styles.css';
import '@stackunseen/ui/conversation-flow.css';

<BackgroundStatus variant="pill" running={running} waiting={waiting} onOpen={openBoard} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `label` | `string` |  |
| `lastHeartbeatAt` | `string` | Last time the host heard from any background run. |
| `locale` | `string` |  |
| `now` | `string` | The host clock, for deterministic rendering. |
| `onOpen` | `(() => void)` |  |
| `running` (required) | `Measurement<number>` |  |
| `staleAfterMs` | `number` | Heartbeat age after which the indicator reports no recent update. |
| `timeZone` | `string` |  |
| `variant` | `"banner" \| "pill"` |  |
| `waiting` (required) | `Measurement<number>` |  |

## Keyboard

Tab reaches controls; Enter or Space activates buttons. Accordions use arrow keys, Home and End. Select menus support arrows and typeahead; Escape closes menus and dialogs and restores focus.

## Works with

[RunBoard](https://unseenui.com/components/run-board/), [AgentLanes](https://unseenui.com/components/agent-lanes/), [SubagentTree](https://unseenui.com/components/subagent-tree/), [ExecutionTimeline](https://unseenui.com/components/execution-timeline/), [WorkflowGraph](https://unseenui.com/components/workflow-graph/), [AttentionQueue](https://unseenui.com/components/attention-queue/), [RunCompare](https://unseenui.com/components/run-compare/), [ContextBar](https://unseenui.com/components/context-bar/), [Plan](https://unseenui.com/components/plan/), [AgentSteering](https://unseenui.com/components/agent-steering/), [CostLedger](https://unseenui.com/components/cost-ledger/), [ContextWindowMeter](https://unseenui.com/components/context-window-meter/)

Page: https://unseenui.com/components/background-status/
