# Status glyph, run states (Notchset): prompt.md (v1.0.0)

- id: `status-glyph-run` · version 1.0.0 · component · free
- category: AI
- build: one set of files for every shadcn style
- install: `npx shadcn@latest add https://notchset.dev/r/status-glyph-run.json`
- npm dependencies: none
- registry dependencies: utils, https://notchset.dev/r/notchset-foundation.json
- docs: https://notchset.dev/components/status-glyph-run
- The install command carries everything this item needs (files, CSS, tokens, npm and registry dependencies). Prefer it to copying source by hand.

A run's state, a shape each: queued (dashed ring), running (the one lit state, a Signature arc turning), waiting on you (warn, one ping), paused (the arc frozen), done (ok fill, the tick draws), failed (a danger cross), stopped (an ink square, never red) and stale (a dotted ring with a clock)..

## Build it
- Stack: React 18.3 or 19, TypeScript, Tailwind CSS v4 utility classes on the foundation's roles, a components.json (imports use its aliases).
- Packages: none beyond `react` and `react-dom`.
- Files: `components/ui/notchset/status-glyph-run.tsx`; shared code: `lib/notchset/words.ts`.
- Registry dependencies, installed with it automatically: shadcn `utils` (cn), `notchset-foundation`.
- Builds: one set of files, the same for every shadcn style.
- Exports to keep: `STATUS_GLYPH_RUN_LABELS`, `StatusGlyphRun`, and every exported type.
- CSS: the install adds the notchset foundation (its roles, keyframes and motion switch, reading your shadcn tokens for colour) to your global stylesheet once. Nothing to import by hand.
- Re-running `add` (or `--overwrite`) re-applies those rules: put overrides in your own CSS, never in the installed rules.
- Colours: every part reads the foundation's roles (`--ns-canvas`, `--ns-ink`, `--ns-line`, `--ns-signal` …), which read your shadcn tokens (`--background`, `--foreground`, `--border`, `--destructive` …), plus the optional `--success` and `--warning`. Retheme on `:root` or any container; never add Tailwind colour classes inside the component.
- This item reads `--ns-bad`, `--ns-ease`, `--ns-ink-2`, `--ns-ink-3`, `--ns-ok`, `--ns-on-fill`, `--ns-signal`, `--ns-time-color`, `--ns-time-panel`, `--ns-time-quick`, `--ns-time-spin`, `--ns-time-sweep`, `--ns-warn-ink`.
- Retune it (on any ancestor) with the foundation's roles and hooks: `--ns-agent-b`, `--ns-agent-c`, `--ns-agent-d`, `--ns-agent-drift`, `--ns-agent-fill`, `--ns-agent-h1`, `--ns-agent-h2`, `--ns-agent-h3`, `--ns-agent-shift`, `--ns-avatar-card`, `--ns-avatar-lg`, `--ns-avatar-md`, `--ns-avatar-sm`, `--ns-avatar-xs`, `--ns-bad`, `--ns-bad-ink`, `--ns-band`, `--ns-band-edge`, `--ns-band-grade`, `--ns-band-optimal`, `--ns-banner-beat`, `--ns-banner-radius`, `--ns-beat`, `--ns-beat-ease`, `--ns-bezel`, `--ns-bloom-close`, `--ns-bloom-open`, `--ns-bloom-rise`, `--ns-btn-bad`, `--ns-btn-bad-hover`, `--ns-btn-bad-line`, `--ns-btn-bezel`, `--ns-btn-chosen`, `--ns-btn-gone`, `--ns-btn-morph`, `--ns-btn-ok`, `--ns-btn-press`, `--ns-btn-release`, `--ns-btn-result`, `--ns-btn-roll`, `--ns-btn-stagger`, `--ns-btn-stagger-step`, `--ns-btn-tick`, `--ns-btn-tonal`, `--ns-btn-tonal-edge`, `--ns-btn-tonal-hover`, `--ns-bulk-clear`, `--ns-button`, `--ns-button-field-inset`, `--ns-button-lg`, `--ns-button-sm`, `--ns-canvas`, `--ns-card-tilt`, `--ns-cat-1`, `--ns-cat-2`, `--ns-cat-3`, `--ns-cat-4`, `--ns-cat-5`, `--ns-cat-6`, `--ns-check`, `--ns-check-round`, `--ns-cheer-1`, `--ns-cheer-2`, `--ns-cheer-3`, `--ns-cheer-edge`, `--ns-cheer-fold`, `--ns-cheer-glow`, `--ns-cheer-lift`, `--ns-chip`, `--ns-chip-pick`, `--ns-control`, `--ns-control-lg`, `--ns-control-pad`, `--ns-control-sm`, `--ns-corner`, `--ns-danger`, `--ns-deep`, `--ns-deep-ink`, `--ns-deep-ink-2`, `--ns-deep-line`, `--ns-depth-card`, `--ns-depth-lift`, `--ns-depth-surface`, `--ns-dialog`, `--ns-dialog-grow`, `--ns-dialog-lg`, `--ns-dialog-max`, `--ns-dialog-shrink`, `--ns-dialog-sm`, `--ns-dialog-top`, `--ns-dock-bottom`, `--ns-drop`, `--ns-ease`, `--ns-ease-arrive`, `--ns-ease-breathe`, `--ns-ease-drum`, `--ns-ease-exit`, `--ns-ease-fling`, `--ns-ease-glide`, `--ns-ease-grow`, `--ns-ease-move`, `--ns-ease-panel`, `--ns-ease-pop`, `--ns-ease-press`, `--ns-ease-spring`, `--ns-ebg-arm`, `--ns-ebg-lit`, `--ns-emoji`, `--ns-emoji-md`, `--ns-emoji-sm`, `--ns-field`, `--ns-field-edge`, `--ns-field-h`, `--ns-fill`, `--ns-fill-time`, `--ns-flood-arc`, `--ns-flood-aurora`, `--ns-flood-behind-1`, `--ns-flood-behind-2`, `--ns-flood-bloom`, `--ns-flood-deep`, `--ns-flood-dial-bloom`, `--ns-flood-glass`, `--ns-flood-grain`, `--ns-flood-image`, `--ns-flood-ink`, `--ns-flood-ink-low`, `--ns-flood-light`, `--ns-flood-mid`, `--ns-flood-pale`, `--ns-flood-pane`, `--ns-flood-pane-edge`, `--ns-flood-pill-ink`, `--ns-flood-ribbon`, `--ns-flood-ribbon-core`, `--ns-flood-shadow`, `--ns-flood-sheen`, `--ns-flood-wash`, `--ns-font-body`, `--ns-font-display`, `--ns-font-mono`, `--ns-font-script`, `--ns-glass`, `--ns-glass-blur`, `--ns-glass-shadow`, `--ns-glow`, `--ns-glyph-pad`, `--ns-grain`, `--ns-gutter`, `--ns-header`, `--ns-help-max`, `--ns-hit`, `--ns-hover`, `--ns-icon`, `--ns-icon-lg`, `--ns-icon-sm`, `--ns-icon-stroke`, `--ns-info`, `--ns-info-ink`, `--ns-ink`, `--ns-ink-2`, `--ns-ink-3`, `--ns-ink-4`, `--ns-layer-bar`, `--ns-layer-modal`, `--ns-layer-panel`, `--ns-layer-popup`, `--ns-layer-sticky`, `--ns-layer-tip`, `--ns-layer-toast`, `--ns-layer-zoom`, `--ns-lead-body`, `--ns-lead-figure`, `--ns-lead-large`, `--ns-lead-meta`, `--ns-lead-small`, `--ns-lead-sub`, `--ns-lead-title`, `--ns-leading`, `--ns-leading-prose`, `--ns-leading-title`, `--ns-lift`, `--ns-light-1`, `--ns-light-2`, `--ns-light-3`, `--ns-light-spread`, `--ns-light-strength`, `--ns-line`, `--ns-line-soft`, `--ns-lit-edge`, `--ns-map-grass`, `--ns-map-water`, `--ns-mark-edge`, `--ns-mark-lifted`, `--ns-mark-rest`, `--ns-mark-swap`, `--ns-marker`, `--ns-marker-ink`, `--ns-mc-place`, `--ns-mc-roll`, `--ns-measure`, `--ns-menu-dy`, `--ns-menu-lit`, `--ns-menu-pad`, `--ns-menu-row`, `--ns-menu-rule`, `--ns-mesh`, `--ns-mesh-frost`, `--ns-nest-inset`, `--ns-nest-outer`, `--ns-nest-r`, `--ns-notch-ease`, `--ns-ok`, `--ns-ok-ink`, `--ns-on-fill`, `--ns-orb-body`, `--ns-orb-cool`, `--ns-orb-core`, `--ns-orb-dawn`, `--ns-orb-deep`, `--ns-orb-edge`, `--ns-orb-grain`, `--ns-orb-ground`, `--ns-orb-halo`, `--ns-orb-inner`, `--ns-orb-key`, `--ns-orb-lift`, `--ns-orb-limb`, `--ns-orb-limb-from`, `--ns-orb-rim`, `--ns-orb-skin-hi`, `--ns-orb-skin-lo`, `--ns-orb-skin-mid`, `--ns-orb-warm`, `--ns-palette-min`, `--ns-panel`, `--ns-panel-room`, `--ns-panel-w`, `--ns-panel-w-lg`, `--ns-pick-slot`, `--ns-pill-prop`, `--ns-play-fill`, `--ns-play-fill-color`, `--ns-play-lift`, `--ns-play-lift-y`, `--ns-play-open`, `--ns-play-open-content`, `--ns-play-press`, `--ns-play-press-box`, `--ns-play-reduced`, `--ns-play-ring`, `--ns-play-roll`, `--ns-play-shake`, `--ns-play-spring`, `--ns-play-swap`, `--ns-play-swap-blur`, `--ns-press-min`, `--ns-press-scale`, `--ns-press-x`, `--ns-press-y`, `--ns-primary-hover`, `--ns-primary-press`, `--ns-prism-edge`, `--ns-prism-glint`, `--ns-prism-sheen`, `--ns-prism-tint`, `--ns-pulse`, `--ns-radius`, `--ns-radius-2xl`, `--ns-radius-button`, `--ns-radius-button-lg`, `--ns-radius-button-sm`, `--ns-radius-card`, `--ns-radius-check`, `--ns-radius-control`, `--ns-radius-control-sm`, `--ns-radius-float`, `--ns-radius-full`, `--ns-radius-lg`, `--ns-radius-mark`, `--ns-radius-menu-row`, `--ns-radius-modal`, `--ns-radius-pill`, `--ns-radius-sm`, `--ns-radius-xl`, `--ns-radius-xs`, `--ns-raised`, `--ns-ramp-1`, `--ns-ramp-2`, `--ns-ramp-3`, `--ns-ramp-4`, `--ns-ramp-5`, `--ns-ramp-shine`, `--ns-range`, `--ns-rest-1`, `--ns-rest-2`, `--ns-rest-3`, `--ns-rise`, `--ns-row`, `--ns-row-compact`, `--ns-row-hue`, `--ns-scrim`, `--ns-search-h`, `--ns-segment`, `--ns-segment-inset`, `--ns-segment-lift`, `--ns-segment-sm`, `--ns-selected`, `--ns-series`, `--ns-series-core`, `--ns-series-glint`, `--ns-series-tint`, `--ns-shadow-dialog`, `--ns-shadow-float`, `--ns-shadow-lift`, `--ns-shadow-panel`, `--ns-sheet`, `--ns-sheet-back`, `--ns-sheet-bottom`, `--ns-sheet-drop`, `--ns-sheet-rise`, `--ns-shift`, `--ns-side`, `--ns-signal`, `--ns-signal-ink`, `--ns-signal-wash`, `--ns-sk-figure`, `--ns-sk-land`, `--ns-sk-p`, `--ns-sk-p0`, `--ns-sk-p1`, `--ns-sk-p2`, `--ns-sk-p3`, `--ns-sk-p4`, `--ns-sk-p5`, `--ns-sk-p6`, `--ns-sk-p7`, `--ns-sk-read`, `--ns-sk-sweep`, `--ns-skeleton`, `--ns-skeleton-bone`, `--ns-skeleton-bone-light`, `--ns-skeleton-light`, `--ns-slab`, `--ns-slab-edge`, `--ns-slab-ink`, `--ns-sleep-awake`, `--ns-sleep-deep`, `--ns-sleep-light`, `--ns-sleep-rem`, `--ns-space-1`, `--ns-space-2`, `--ns-space-3`, `--ns-space-4`, `--ns-space-5`, `--ns-space-6`, `--ns-space-8`, `--ns-space-section`, `--ns-stack-fan`, `--ns-stack-fan-gap`, `--ns-stack-fan-lag`, `--ns-stack-on`, `--ns-stagger-item`, `--ns-stagger-mark`, `--ns-stagger-max`, `--ns-standing-critical`, `--ns-standing-in`, `--ns-standing-out`, `--ns-state-doing`, `--ns-state-done`, `--ns-state-review`, `--ns-state-todo`, `--ns-step`, `--ns-step-from`, `--ns-step-sign`, `--ns-swipe-surface`, `--ns-switch-h`, `--ns-switch-w`, `--ns-text-body`, `--ns-text-control`, `--ns-text-control-lg`, `--ns-text-display`, `--ns-text-editorial`, `--ns-text-empty`, `--ns-text-figure`, `--ns-text-giant`, `--ns-text-heading`, `--ns-text-headline`, `--ns-text-input`, `--ns-text-large`, `--ns-text-lede`, `--ns-text-meta`, `--ns-text-record`, `--ns-text-sentence`, `--ns-text-small`, `--ns-text-sub`, `--ns-text-title`, `--ns-theme-fade`, `--ns-tile-shadow`, `--ns-time-born`, `--ns-time-color`, `--ns-time-confirm`, `--ns-time-dialog`, `--ns-time-fling`, `--ns-time-flip`, `--ns-time-glide`, `--ns-time-grow`, `--ns-time-hold`, `--ns-time-menu`, `--ns-time-page`, `--ns-time-panel`, `--ns-time-quick`, `--ns-time-roll`, `--ns-time-settle`, `--ns-time-snap`, `--ns-time-spin`, `--ns-time-spring`, `--ns-time-sweep`, `--ns-time-toast`, `--ns-tint`, `--ns-tint-c`, `--ns-tint-ease`, `--ns-tint-fill`, `--ns-tint-gap`, `--ns-tint-h1`, `--ns-tint-h2`, `--ns-tint-h3`, `--ns-tint-ink`, `--ns-tint-row`, `--ns-tip-fold`, `--ns-tip-grow`, `--ns-toast-bottom`, `--ns-toast-gap`, `--ns-toast-left`, `--ns-toast-lift`, `--ns-toast-peek`, `--ns-toast-scale`, `--ns-toast-w`, `--ns-touch`, `--ns-tracking-body`, `--ns-tracking-caps`, `--ns-tracking-control`, `--ns-tracking-display`, `--ns-tracking-headline`, `--ns-tracking-sub`, `--ns-tracking-title`, `--ns-warn`, `--ns-warn-ink`, `--ns-wash-clay`, `--ns-wash-dusk`, `--ns-wash-graphite`, `--ns-wash-ink`, `--ns-wash-sage`, `--ns-wash-sand`, `--ns-weight-light`, `--ns-weight-medium`, `--ns-weight-regular`, `--ns-weight-strong`, `--ns-well`, `--ns-width-lg`, `--ns-width-md`, `--ns-width-sm`, `--ns-width-xl`.
- Never add Tailwind colour classes inside the component.

```tsx
import { StatusGlyphRun, STATUS_GLYPH_RUN_LABELS, type StatusGlyphRunState } from "@/components/ui/notchset/status-glyph-run";
```

## Parts
- A single export that takes props.

## Match the original
- Read `components/ui/notchset/status-glyph-run.tsx` as the reference implementation before changing or recreating anything, and match it: sizes, colours per theme, motion timings, copy and behaviour.
- If you deviate (a prop you can't honour, a style you changed, a dependency you swapped), say so in your reply, part by part.
- Keep the accessibility contract, the keyboard map and the motion levels listed below.

## Use it when
- A run's state beside its name: an agent's task, an import, a background job.

### Not when
- A work item's state (to do, in review) is Status glyph; a step's busy mark inside a button is Spinner.

## Built from
- Words (shared helper, ships with it)

## Mistakes
- Stopped in red: a person stopped it, it is ink
- A spinner as well as the running arc: the arc is the sign of work
- Reusing Status glyph's work states for a run: queued and doing are not running and waiting

## Usage

```tsx
"use client";
import * as React from "react";
import { StatusGlyphRun, STATUS_GLYPH_RUN_LABELS, type StatusGlyphRunState } from "@/components/ui/notchset/status-glyph-run";

/*
 * The run vocabulary at rest: the eight states a run can be in, each its own shape with its name under it. Running
 * is the one lit state and turns; waiting on you pings once; the knob sets the size, or plays one run through its
 * states (queued, running, waiting on you, running, done) so the arc is seen closing into its tick.
 */
const STATES: StatusGlyphRunState[] = ["queued", "running", "waiting", "paused", "done", "failed", "stopped", "stale"];
const RUN: StatusGlyphRunState[] = ["queued", "running", "waiting", "running", "done"];
const BEAT = 1400;

export default function StatusGlyphRunDemo() {
  const size = "md" as "sm" | "md" | "lg";
  const play = false;
  return play ? <OneRun size={size} /> : (
    <div data-slot="run-vocabulary" className="grid grid-cols-4 gap-x-6 gap-y-5 phone:grid-cols-2">
      {STATES.map((s) => (
        <div key={s} className="flex w-24 flex-col items-center gap-2">
          <StatusGlyphRun state={s} label="Fixing the GitHub build" size={size} />
          <span className="text-[length:var(--ns-text-small)] text-[var(--ns-ink-2)]">{STATUS_GLYPH_RUN_LABELS[s]}</span>
        </div>
      ))}
    </div>
  );
}

/* one run through its states, once: the glyph changes in place, the name under it */
function OneRun({ size }: { size: "sm" | "md" | "lg" }) {
  const [step, setStep] = React.useState(0);
  React.useEffect(() => {
    if (step >= RUN.length - 1) return;
    const id = window.setTimeout(() => setStep((n) => n + 1), BEAT);
    return () => window.clearTimeout(id);
  }, [step]);
  const s = RUN[step]!;
  return (
    <div className="flex w-40 flex-col items-center gap-2">
      <StatusGlyphRun state={s} label="Fixing the GitHub build" size={size} />
      <span className="text-[length:var(--ns-text-small)] text-[var(--ns-ink-2)]">{STATUS_GLYPH_RUN_LABELS[s]}</span>
    </div>
  );
}

const pill = "inline-flex min-h-8 items-center gap-2 rounded-[var(--ns-radius-full)] bg-[var(--ns-raised)] px-3 text-[length:var(--ns-text-small)] text-[var(--ns-ink)] shadow-[var(--ns-bezel)]";

/* at work: three run pills in a header, held still as At work always is */
export function AtWork() {
  return (
    <div data-ns-asleep="" className="flex flex-wrap justify-center gap-2">
      <span className={pill}>
        <StatusGlyphRun state="running" label="Fixing the GitHub build" />
        Fixing the GitHub build
        <span className="tabular-nums text-[var(--ns-ink-3)]">0:06</span>
      </span>
      <span className={pill}>
        <StatusGlyphRun state="waiting" label="Approve git push" />
        Waiting on you
      </span>
      <span className={pill}>
        <StatusGlyphRun state="stopped" label="Updating Airtable contacts" />
        Stopped by you
      </span>
    </div>
  );
}
```

## Props

| Prop | Type | Default | What it does |
|---|---|---|---|
| `state` | `StatusGlyphRunState` |  | where the run stands |
| `label` | `string` |  | what the run is doing (or what the glyph stands for), read with the state |
| `labels` | `Partial<StatusGlyphRunLabels>` |  | each state's name and the sentence it is read as, over the English defaults |
| `size` | `keyof typeof PX` | `"md"` | sm 12px (a dense row), md 14px (a row or a pill, the default), lg 18px (a card's lead) |

Full docs: https://notchset.dev/components/status-glyph-run

## Customising
- Colours: every part reads the foundation's roles (`--ns-canvas`, `--ns-ink`, `--ns-line`, `--ns-signal` …), which read your shadcn tokens (`--background`, `--foreground`, `--border`, `--destructive` …), plus the optional `--success` and `--warning`. Retheme on `:root` or any container; never add Tailwind colour classes inside the component.
- Dark mode follows the `.dark` class or `data-theme="dark"` on an ancestor (the shadcn and next-themes conventions).
- Update later: Commit or stash local changes first (or copy the files), so the update can be undone. Read https://notchset.dev/r/changelog.json for the new versions: a major version, an entry marked breaking or a merge says what to change. Then re-run the install with `--overwrite`, on a branch. It replaces the component's files, the shared helper files they import, and the item's CSS rules in the global stylesheet, so review the whole diff (components, shared files, CSS), re-apply your own edits, and run the app's typecheck, tests and build.

## Keyboard

| Keys | Action |
|---|---|
| Tab | passes over it: a reading, not a control |

## Performance

- One small SVG; only a running arc animates (one rotate), and a change of state draws once.
- No dependencies.

## Responsive

- three sizes: 12, 14 and 18px
- dark (tokens)
- reduced motion: the end shape, no turn, ping or draw

## Motion inventory

| Interaction | What moves |
|---|---|
| running: the arc turns on its faint track, slowing over the top | ns-orbit on --ns-time-spin, infinite (data-ns-still). Reduced motion: the arc rests at the top. |
| waiting: one ping in warn, then still | ns-orb-pulse on --ns-time-sweep, --ns-ease, once. Reduced motion: no ping. |
| ending: the arc closes into the ring, then the tick or cross draws | stroke-dasharray on --ns-time-panel, --ns-ease; done's green disc ns-fade on --ns-time-color, then ns-tick-draw on --ns-time-panel after --ns-time-quick. Reduced motion: the end shape shows at once. |

## Accessibility contract (preserve when editing)
- One image named "{state}: {name}" (Running: Fixing the GitHub build); each state has its own shape, so colour is never the only sign.
- The host announces a change of phase once; the glyph never does.

## Install

```bash
# npm
npx shadcn@latest add https://notchset.dev/r/status-glyph-run.json
# pnpm
pnpm dlx shadcn@latest add https://notchset.dev/r/status-glyph-run.json
# yarn
yarn dlx shadcn@latest add https://notchset.dev/r/status-glyph-run.json
# bun
bunx --bun shadcn@latest add https://notchset.dev/r/status-glyph-run.json
```

Or add the `@notchset` registry to components.json and run `npx shadcn@latest add @notchset/status-glyph-run`. Every components.json style gets the same files.

### Manual

1. Install the packages: none beyond `react` and `react-dom`.
2. Copy `components/ui/notchset/status-glyph-run.tsx`, `lib/notchset/words.ts` from https://notchset.dev/r/status-glyph-run.json (each file's `content`, at its `target`), keeping the `@/` path alias of your tsconfig.
3. Add what it builds on: shadcn `utils` (cn), `notchset-foundation`.

## Continue the workflow

- [Change set](https://notchset.dev/components/change-set)
- [Checkpoint rail](https://notchset.dev/components/checkpoint-rail)
- [Message](https://notchset.dev/components/message)

## Source

### components/ui/notchset/status-glyph-run.tsx

```tsx
// Notchset status-glyph-run 1.0.0 · https://notchset.dev/changelog
"use client";
import * as React from "react";
import { cn } from "@/lib/utils";
import { fill } from "@/lib/notchset/words";

/*
 * Status glyph, run states: Status glyph's form for a run (an agent's task, an import, a background job), one shape
 * per state so colour is never the only sign. Queued is a dashed ring; running is the one lit state, a Signature arc
 * turning on a faint track (one lap per --ns-time-spin, slowing over the top); waiting on you is a warn ring with its
 * centre, which pings once as it starts waiting and then holds still; paused freezes the arc where it stands and shows
 * two bars; done closes the arc into the ring and fills it in the ok colour as its tick draws (the one coloured rest);
 * failed closes it into a ring with a cross in the danger colour; stopped is a ring with a square in ink, because a
 * person stopped it and that is never a failure; stale (the run stopped answering) is a dotted ring with a clock.
 * Ending draws in --ns-time-panel. With less motion nothing turns, pings or draws: the end shape shows.
 * The names are RunStatus's (stream-adapters); the words are `labels`, whole sentences.
 *
 *   <StatusGlyphRun state={run.status} label="Fixing the GitHub build" />
 */
type StatusGlyphRunState = "queued" | "running" | "waiting" | "paused" | "done" | "failed" | "stopped" | "stale";
/** Each state's name, and the sentence the glyph is read as ({state} and {name} are filled in). */
type StatusGlyphRunLabels = Record<StatusGlyphRunState, string> & { read: string };
const STATUS_GLYPH_RUN_LABELS: StatusGlyphRunLabels = {
  queued: "Queued",
  running: "Running",
  waiting: "Waiting on you",
  paused: "Paused",
  done: "Done",
  failed: "Failed",
  stopped: "Stopped",
  stale: "Not answering",
  read: "{state}: {name}",
};
const PX = { sm: 12, md: 14, lg: 18 } as const;
type StatusGlyphRunProps = {
  /** where the run stands */
  state: StatusGlyphRunState;
  /** what the run is doing (or what the glyph stands for), read with the state */
  label: string;
  /** each state's name and the sentence it is read as, over the English defaults */
  labels?: Partial<StatusGlyphRunLabels> | undefined;
  /** sm 12px (a dense row), md 14px (a row or a pill, the default), lg 18px (a card's lead) */
  size?: keyof typeof PX | undefined;
  className?: string | undefined;
};

const RING = { cx: 7, cy: 7, r: 5.75, fill: "none", strokeWidth: 1.5 } as const;
/* the arc's share of the ring while it runs; ending, it grows to the whole ring */
const ARC = 0.28;

function Glyph({ state, size, moved }: { state: StatusGlyphRunState; size: number; moved: boolean }) {
  const live = state === "running" || state === "paused";
  const closed = state === "done" || state === "failed";
  /* a shape that arrives with the state draws once, only when the state changed while on screen */
  const draw = moved ? "[stroke-dasharray:1] [animation:ns-tick-draw_var(--ns-time-panel)_var(--ns-ease)_var(--ns-time-quick)_backwards]" : "";
  return (
    <svg viewBox="0 0 14 14" width={size} height={size} aria-hidden className="block overflow-visible">
      {/* the ring: dashed while queued, dotted when stale, a faint track under the arc, whole otherwise */}
      <circle
        {...RING}
        stroke="currentColor"
        strokeDasharray={state === "queued" ? "2.1 2.4" : state === "stale" ? "0.01 2.25" : undefined}
        strokeLinecap={state === "stale" ? "round" : undefined}
        className={cn("[transition:opacity_var(--ns-time-color)]", state === "running" ? "opacity-20" : closed ? "opacity-0" : "opacity-100")}
      />
      {/* the arc: turns while running, holds where it stands when paused, and closes into the ring from where it stood when the run ends */}
      <g className={cn("origin-center [transform-box:view-box]", (live || closed) && "[animation:ns-orbit_var(--ns-time-spin)_infinite]", state !== "running" && "[animation-play-state:paused]")}>
        <circle
          {...RING}
          pathLength={1}
          stroke={state === "running" ? "var(--ns-signal)" : state === "failed" ? "var(--ns-bad)" : state === "done" ? "var(--ns-ok)" : "currentColor"}
          strokeLinecap="round"
          strokeDasharray={live ? `${ARC} 1` : "1 0"}
          transform="rotate(-90 7 7)"
          data-ns-glide=""
          className={cn("[transition:stroke-dasharray_var(--ns-time-panel)_var(--ns-ease),stroke_var(--ns-time-color)]", live || closed ? "opacity-100" : "opacity-0")}
        />
      </g>
      {state === "waiting" && (
        <>
          <circle cx="7" cy="7" r="2.25" fill="currentColor" />
          {/* one ping as it starts waiting, then still */}
          {moved && <circle {...RING} stroke="currentColor" className="origin-center opacity-0 [transform-box:fill-box] [animation:ns-orb-pulse_var(--ns-time-sweep)_var(--ns-ease)]" />}
        </>
      )}
      {state === "paused" && <path d="M5.6 4.9v4.2M8.4 4.9v4.2" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />}
      {state === "stopped" && <rect x="4.9" y="4.9" width="4.2" height="4.2" rx="0.9" fill="currentColor" />}
      {state === "stale" && <path d="M7 4.6V7l1.7 1.1" fill="none" stroke="currentColor" strokeWidth="1.3" strokeLinecap="round" strokeLinejoin="round" />}
      {state === "done" && (
        <>
          <circle cx="7" cy="7" r="6.5" fill="var(--ns-ok)" className={cn(moved && "[animation:ns-fade_var(--ns-time-color)_var(--ns-ease)_var(--ns-time-quick)_backwards]")} />
          <path d="M4.4 7.2 6.2 8.9 9.6 5.4" pathLength={1} fill="none" stroke="var(--ns-on-fill)" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" className={draw} />
        </>
      )}
      {state === "failed" && <path d="M5.1 5.1 8.9 8.9M8.9 5.1 5.1 8.9" pathLength={1} fill="none" stroke="var(--ns-bad)" strokeWidth="1.5" strokeLinecap="round" className={draw} />}
    </svg>
  );
}

/* the tone each state's ink takes: waiting is warn; queued and stale recede; the rest are ink */
const TONE: Record<StatusGlyphRunState, string> = {
  queued: "text-[var(--ns-ink-3)]",
  running: "text-[var(--ns-ink-2)]",
  waiting: "text-[var(--ns-warn-ink)]",
  paused: "text-[var(--ns-ink-2)]",
  done: "text-[var(--ns-ink-2)]",
  failed: "text-[var(--ns-ink-2)]",
  stopped: "text-[var(--ns-ink-2)]",
  stale: "text-[var(--ns-ink-3)]",
};

const StatusGlyphRun = React.forwardRef<HTMLSpanElement, StatusGlyphRunProps>(function StatusGlyphRun({ state, label, labels, size = "md", className }, ref) {
  const L = { ...STATUS_GLYPH_RUN_LABELS, ...labels };
  /* whether the state has changed since it was first drawn: a glyph that arrives done shows done, one that becomes done draws */
  const [last, setLast] = React.useState(state);
  const [moved, setMoved] = React.useState(false);
  if (state !== last) {
    setLast(state);
    setMoved(true);
  }
  return (
    <span ref={ref} data-slot="status-glyph-run" data-state={state} role="img" aria-label={fill(L.read, { state: L[state], name: label })} data-ns-still="" className={cn("grid shrink-0 place-items-center", TONE[state], className)}>
      <Glyph state={state} size={PX[size]} moved={moved} />
    </span>
  );
});

export { STATUS_GLYPH_RUN_LABELS, StatusGlyphRun, type StatusGlyphRunLabels, type StatusGlyphRunProps, type StatusGlyphRunState };
```

### lib/notchset/words.ts

```tsx
// Notchset status-glyph-run 1.0.0 · https://notchset.dev/changelog
import * as React from "react";

/* Built-in words and figures, one way for every piece. */

/** The locale a piece writes in when the app passes none: English at launch, the same on the server and in the browser. */
export const DEFAULT_LOCALE = "en-US";

/** A count's words by the locale's plural rule: `other` always, any of the locale's other forms as it needs them. */
export type Plural = { other: string } & Partial<Record<Intl.LDMLPluralRule, string>>;

/** A whole number (or any figure) in the locale's digits and grouping. */
export function formatCount(n: number, locale: string = DEFAULT_LOCALE, options?: Intl.NumberFormatOptions): string {
  return new Intl.NumberFormat(locale, options).format(n);
}

/** A sentence with its `{name}` blanks filled; a blank with no value is left as written. */
export function fill(sentence: string, vars: Readonly<Record<string, string | number>>): string {
  return sentence.replace(/\{(\w+)\}/g, (blank, name: string) => (name in vars ? String(vars[name]) : blank));
}

/** The same, where a blank is a node (a name in ink): the sentence's own words stay in order around it. */
export function fillNodes(sentence: string, vars: Readonly<Record<string, React.ReactNode>>): React.ReactNode {
  return sentence.split(/(\{\w+\})/).map((part, i) => {
    const name = /^\{(\w+)\}$/.exec(part)?.[1];
    return name !== undefined && name in vars ? React.createElement(React.Fragment, { key: i }, vars[name]) : part;
  });
}

/** A count's sentence by the locale's plural rule, `{count}` written in the locale ("1 message", "4 messages"). */
export function plural(locale: string | undefined, n: number, forms: Plural, vars: Readonly<Record<string, string | number>> = {}): string {
  const loc = locale ?? DEFAULT_LOCALE;
  const rule = new Intl.PluralRules(loc).select(n);
  return fill(forms[rule] ?? forms.other, { count: formatCount(n, loc), ...vars });
}
```

The foundation (the tokens listed above, keyframes and motion levels) installs once with the first component; its CSS is public at https://notchset.dev/r/notchset-foundation.json.
