# Task Rows

The live status of an agent's tasks, each row opening to its steps.

The live status of an agent's tasks as rows (running, failed, completed), each opening to its steps. Capsules (each row its own surface, the radius morphing 22 → 14 while open) or one list card; each row is a disclosure that reveals a hairline rail of detail lines. Fully controlled: the host owns every row's status and which rows are open.

Kind: block · Category: Agent · Status: beta · Targets: React, Vue, Svelte

## Add

```bash
npx fndn add task-rows
```

It writes the folder `task-rows/` into the project's ui folder (`index.ts`, `task-rows.tsx`, `TaskRows.vue`, `TaskRows.svelte`, `task-rows.recipe.ts`), and what it is built from: [Collapsible](/components/collapsible.md), [Status Pill](/components/status-pill.md). First time: [Installation](/installation.md).

## Usage

```tsx
import { TaskRows } from "@/components/ui/task-rows";
```

```vue
import { TaskRows } from "@/components/ui/task-rows";
```

```svelte
import { TaskRows } from "$lib/components/ui/task-rows";
```

## Parts

In the DOM the root carries `data-slot="task-rows"` and each part `data-slot="task-rows-<part>"`; in the recipe the root is the `base` slot and each part a slot named after it in camelCase.

| Part | Element | data-slot | Flags | Notes |
| --- | --- | --- | --- | --- |
| `root` | `div` | `task-rows` |  | data-variant capsules \| list |
| `row` | `div` | `task-rows-row` | repeats | A collapsible (variant row) with this class on its root: its trigger is the whole row (badge · label · status · amount in the trigger's label part, then the caret), its region holds the detail grid. data-state=open\|closed on the row from the engine; the capsule radius follows it. |
| `badge` | `span` | `task-rows-badge` |  | 24px aria-hidden slot; the mark or the ring replace each other in place |
| `mark` | `span` | `task-rows-mark` | optional | 22px filled badge, data-tone green \| red; scales in from 0.5 on a status swap |
| `ring` | `span` | `task-rows-ring` | optional | 24px progress ring; data-active spins (also under reduced motion) |
| `ring-track` | `circle` | `task-rows-ring-track` | optional |  |
| `ring-arc` | `circle` | `task-rows-ring-arc` | optional |  |
| `step` | `span` | `task-rows-step` | optional | step number inside the ring |
| `label` | `span` | `task-rows-label` |  | Truncates; full text in title |
| `amount` | `span` | `task-rows-amount` |  | Tabular figures, never truncated |
| `status` | `span` | `task-rows-status` |  | role=status live region that stays mounted; holds a status-pill (sm; green Completed, red Failed + retry glyph) or, while running, sr-only words. Sits before the amount so a pill that arrives moves nothing |
| `detail-grid` | `div` | `task-rows-detail-grid` |  |  |
| `rail` | `span` | `task-rows-rail` |  |  |
| `detail-list` | `div` | `task-rows-detail-list` |  |  |
| `detail` | `div` | `task-rows-detail` | repeats |  |
| `detail-label` | `span` | `task-rows-detail-label` |  |  |
| `detail-meta` | `span` | `task-rows-detail-meta` |  |  |

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"capsules" \| "list"` | `"capsules"` |  |
| `rows` | `{ key: string; label: string; amount: string; status: done \| running \| failed; step?: number; details: { label, meta }[] }[]` |  | Rows in order; the host updates status as work progresses. A row appended later enters without a stagger delay. |
| `open` | `array` |  | Bindable (React: `defaultOpen` and `onOpenChange`; Vue: `v-model:open`; Svelte: `bind:open`). Keys of expanded rows. Each row is a collapsible: aria-expanded on its trigger, data-state on the row. |
| `labels` | `object` |  | { completed, failed, running } |
| `appear` | `boolean` | `false` | Whether the rows present at mount fade up, staggered. Off by default: set it on the list your code adds live, never on one rendered from history or with the page (a mount is not an arrival). Rows added after mount enter either way. |

Other attributes and `class` go to the root; `class` is merged through the recipe.

## Events

| Event | Payload |
| --- | --- |
| `toggleRow` | (key: string, open: boolean) |
| `openChange` | (keys: string[]) (React; Vue/Svelte through v-model:open / bind:open) |

## States

`row-hover`, `row-press`, `row-focus-visible`, `row-open`, `running`, `failed`, `done`

## Keyboard and accessibility

Keyboard:

- Tab moves through the row triggers
- Enter / Space expand or collapse a row; focus stays on the trigger

Notes:

- Each trigger is a real button with aria-expanded and aria-controls pointing at its details.
- Status text sits in a role=status region per row that stays mounted; the pill inside it is swapped, so a change (running → failed → completed) is announced once. While running the region holds a visually hidden 'Running'.
- The badge slot (mark, ring, step number) is aria-hidden.
- Collapsed details are visibility: hidden, so they are not read out.

## Motion

- mount: nothing plays unless appear is set; with appear, rows present at first render fade up over duration.enter (easing.out-strong, fill both), staggered by duration.stagger and capped at motion.stagger-max; a row added after mount always enters, with no delay
- expand / collapse: each row's collapsible reveals the details (its reveal recipe; instant from the keyboard); the detail lines do not enter again; the capsule radius morphs 22 → radius.window over duration.reveal easing.out-strong and the caret turns from right to down over duration.move
- status swap: transitions armed by data-ready (never first paint), interruptible: a new mark scales in from 0.5 with opacity (duration.press / duration.base), a ring fades in, a status-pill arrives out of opacity 0 + blur(2px) over duration.base; the pill sits before the amount, so nothing to its right moves
- loops: the running ring spins (1.1s linear) and keeps spinning under reduced motion; the retry glyph on a failed pill is static
- hover (gated) and press: the collapsible trigger's (--fndn-hover, --fndn-hover-2)

## Tokens

`color.surface`, `color.ink`, `color.ink-2`, `color.ink-3`, `color.line`, `color.green`, `color.red`, `color.on-accent`, `shadow.card`, `radius.card`, `radius.window`, `text.xs`, `font.mono`, `easing.out-strong`, `duration.base`, `duration.press`, `duration.reveal`, `duration.enter`, `duration.stagger`, `motion.stagger-max`, `text.sm`

## Dependencies

- [Collapsible](/components/collapsible.md)
- [Status Pill](/components/status-pill.md)

## Notes

- The rows are fully controlled by rows[].status: to show a pending → failed → completed sequence on one row, change its status.

## Examples

### Agent preparing a release

React · `capsules.tsx`

```tsx
import { TaskRows, type TaskRow } from "@/components/ui/task-rows";

const rows: TaskRow[] = [
  {
    key: "tests",
    label: "Ran the test suite",
    amount: "412 tests",
    status: "done",
    details: [
      { label: "Unit tests", meta: "388/388" },
      { label: "Playwright smoke tests", meta: "24/24" },
    ],
  },
  {
    key: "preview",
    label: "Deployed the preview of harbor/web",
    amount: "2m 14s",
    status: "done",
    details: [
      { label: "Compiled 1,284 modules", meta: "48s" },
      { label: "Uploaded assets", meta: "18.2 MB" },
    ],
  },
  {
    key: "notes",
    label: "Writing the release notes",
    amount: "23 PRs",
    status: "running",
    step: 3,
    details: [
      { label: "Grouped merged pull requests", meta: "23" },
      { label: "Drafting the summary", meta: "2 of 4" },
    ],
  },
];

export default function Capsules() {
  return <TaskRows rows={rows} defaultOpen={["notes"]} />;
}
```

Vue · `capsules.vue`

```vue
<script setup lang="ts">
import { ref } from "vue";
import { TaskRows, type TaskRow } from "@/components/ui/task-rows";

const rows: TaskRow[] = [
  {
    key: "tests",
    label: "Ran the test suite",
    amount: "412 tests",
    status: "done",
    details: [
      { label: "Unit tests", meta: "388/388" },
      { label: "Playwright smoke tests", meta: "24/24" },
    ],
  },
  {
    key: "preview",
    label: "Deployed the preview of harbor/web",
    amount: "2m 14s",
    status: "done",
    details: [
      { label: "Compiled 1,284 modules", meta: "48s" },
      { label: "Uploaded assets", meta: "18.2 MB" },
    ],
  },
  {
    key: "notes",
    label: "Writing the release notes",
    amount: "23 PRs",
    status: "running",
    step: 3,
    details: [
      { label: "Grouped merged pull requests", meta: "23" },
      { label: "Drafting the summary", meta: "2 of 4" },
    ],
  },
];

const open = ref(["notes"]);
</script>

<template>
  <TaskRows v-model:open="open" :rows="rows" />
</template>
```

Svelte · `capsules.svelte`

```svelte
<script lang="ts">
  import { TaskRows, type TaskRow } from "$lib/components/ui/task-rows";

  const rows: TaskRow[] = [
    {
      key: "tests",
      label: "Ran the test suite",
      amount: "412 tests",
      status: "done",
      details: [
        { label: "Unit tests", meta: "388/388" },
        { label: "Playwright smoke tests", meta: "24/24" },
      ],
    },
    {
      key: "preview",
      label: "Deployed the preview of harbor/web",
      amount: "2m 14s",
      status: "done",
      details: [
        { label: "Compiled 1,284 modules", meta: "48s" },
        { label: "Uploaded assets", meta: "18.2 MB" },
      ],
    },
    {
      key: "notes",
      label: "Writing the release notes",
      amount: "23 PRs",
      status: "running",
      step: 3,
      details: [
        { label: "Grouped merged pull requests", meta: "23" },
        { label: "Drafting the summary", meta: "2 of 4" },
      ],
    },
  ];

  let open = $state(["notes"]);
</script>

<TaskRows bind:open {rows} />
```

### Month-end close, as a list

React · `list.tsx`

```tsx
import { TaskRows, type TaskRow } from "@/components/ui/task-rows";

const rows: TaskRow[] = [
  {
    key: "payouts",
    label: "Matched Stripe payouts to invoices",
    amount: "1,284 charges",
    status: "done",
    details: [
      { label: "Matched automatically", meta: "1,271" },
      { label: "Matched by amount and date", meta: "13" },
    ],
  },
  {
    key: "refunds",
    label: "Reconciled October refunds",
    amount: "$18,420.50",
    status: "done",
    details: [
      { label: "Refunds issued in Stripe", meta: "37" },
      { label: "Credit notes in the ledger", meta: "37" },
    ],
  },
  {
    key: "failed",
    label: "Checking failed renewals",
    amount: "12 invoices",
    status: "running",
    step: 2,
    details: [
      { label: "Card declined", meta: "9" },
      { label: "Bank transfer overdue", meta: "3" },
    ],
  },
  {
    key: "export",
    label: "Export the journal to the accountant",
    amount: "1 file",
    status: "failed",
    details: [
      { label: "close-2026-10.csv", meta: "built" },
      { label: "Upload to the shared drive", meta: "403" },
    ],
  },
];

export default function List() {
  return <TaskRows variant="list" rows={rows} />;
}
```

Vue · `list.vue`

```vue
<script setup lang="ts">
import { TaskRows, type TaskRow } from "@/components/ui/task-rows";

const rows: TaskRow[] = [
  {
    key: "payouts",
    label: "Matched Stripe payouts to invoices",
    amount: "1,284 charges",
    status: "done",
    details: [
      { label: "Matched automatically", meta: "1,271" },
      { label: "Matched by amount and date", meta: "13" },
    ],
  },
  {
    key: "refunds",
    label: "Reconciled October refunds",
    amount: "$18,420.50",
    status: "done",
    details: [
      { label: "Refunds issued in Stripe", meta: "37" },
      { label: "Credit notes in the ledger", meta: "37" },
    ],
  },
  {
    key: "failed",
    label: "Checking failed renewals",
    amount: "12 invoices",
    status: "running",
    step: 2,
    details: [
      { label: "Card declined", meta: "9" },
      { label: "Bank transfer overdue", meta: "3" },
    ],
  },
  {
    key: "export",
    label: "Export the journal to the accountant",
    amount: "1 file",
    status: "failed",
    details: [
      { label: "close-2026-10.csv", meta: "built" },
      { label: "Upload to the shared drive", meta: "403" },
    ],
  },
];
</script>

<template>
  <TaskRows variant="list" :rows="rows" />
</template>
```

Svelte · `list.svelte`

```svelte
<script lang="ts">
  import { TaskRows, type TaskRow } from "$lib/components/ui/task-rows";

  const rows: TaskRow[] = [
    {
      key: "payouts",
      label: "Matched Stripe payouts to invoices",
      amount: "1,284 charges",
      status: "done",
      details: [
        { label: "Matched automatically", meta: "1,271" },
        { label: "Matched by amount and date", meta: "13" },
      ],
    },
    {
      key: "refunds",
      label: "Reconciled October refunds",
      amount: "$18,420.50",
      status: "done",
      details: [
        { label: "Refunds issued in Stripe", meta: "37" },
        { label: "Credit notes in the ledger", meta: "37" },
      ],
    },
    {
      key: "failed",
      label: "Checking failed renewals",
      amount: "12 invoices",
      status: "running",
      step: 2,
      details: [
        { label: "Card declined", meta: "9" },
        { label: "Bank transfer overdue", meta: "3" },
      ],
    },
    {
      key: "export",
      label: "Export the journal to the accountant",
      amount: "1 file",
      status: "failed",
      details: [
        { label: "close-2026-10.csv", meta: "built" },
        { label: "Upload to the shared drive", meta: "403" },
      ],
    },
  ];
</script>

<TaskRows variant="list" {rows} />
```

### Import stopped on one file

React · `failed-step.tsx`

```tsx
import { TaskRows, type TaskRow } from "@/components/ui/task-rows";

const rows: TaskRow[] = [
  {
    key: "patients",
    label: "Imported patient records",
    amount: "4,812 records",
    status: "done",
    details: [
      { label: "patients-2026.csv", meta: "4,812" },
      { label: "Duplicates merged", meta: "26" },
    ],
  },
  {
    key: "providers",
    label: "Matched providers to calendars",
    amount: "14 providers",
    status: "done",
    details: [{ label: "Matched by email", meta: "12" }, { label: "Matched by name", meta: "2" }],
  },
  {
    key: "appointments",
    label: "Import upcoming appointments",
    amount: "2 files",
    status: "failed",
    details: [
      { label: "appointments-q1.csv: unknown provider P-0193", meta: "row 1,904" },
      { label: "appointments-q2.csv", meta: "not started" },
    ],
  },
];

export default function FailedStep() {
  return <TaskRows rows={rows} defaultOpen={["appointments"]} />;
}
```

Vue · `failed-step.vue`

```vue
<script setup lang="ts">
import { ref } from "vue";
import { TaskRows, type TaskRow } from "@/components/ui/task-rows";

const rows: TaskRow[] = [
  {
    key: "patients",
    label: "Imported patient records",
    amount: "4,812 records",
    status: "done",
    details: [
      { label: "patients-2026.csv", meta: "4,812" },
      { label: "Duplicates merged", meta: "26" },
    ],
  },
  {
    key: "providers",
    label: "Matched providers to calendars",
    amount: "14 providers",
    status: "done",
    details: [{ label: "Matched by email", meta: "12" }, { label: "Matched by name", meta: "2" }],
  },
  {
    key: "appointments",
    label: "Import upcoming appointments",
    amount: "2 files",
    status: "failed",
    details: [
      { label: "appointments-q1.csv: unknown provider P-0193", meta: "row 1,904" },
      { label: "appointments-q2.csv", meta: "not started" },
    ],
  },
];

const open = ref(["appointments"]);
</script>

<template>
  <TaskRows v-model:open="open" :rows="rows" />
</template>
```

Svelte · `failed-step.svelte`

```svelte
<script lang="ts">
  import { TaskRows, type TaskRow } from "$lib/components/ui/task-rows";

  const rows: TaskRow[] = [
    {
      key: "patients",
      label: "Imported patient records",
      amount: "4,812 records",
      status: "done",
      details: [
        { label: "patients-2026.csv", meta: "4,812" },
        { label: "Duplicates merged", meta: "26" },
      ],
    },
    {
      key: "providers",
      label: "Matched providers to calendars",
      amount: "14 providers",
      status: "done",
      details: [{ label: "Matched by email", meta: "12" }, { label: "Matched by name", meta: "2" }],
    },
    {
      key: "appointments",
      label: "Import upcoming appointments",
      amount: "2 files",
      status: "failed",
      details: [
        { label: "appointments-q1.csv: unknown provider P-0193", meta: "row 1,904" },
        { label: "appointments-q2.csv", meta: "not started" },
      ],
    },
  ];

  let open = $state(["appointments"]);
</script>

<TaskRows bind:open {rows} />
```

### Triage running step by step

React · `live-progress.tsx`

```tsx
import { useEffect, useState } from "react";
import { TaskRows, type TaskRow } from "@/components/ui/task-rows";

const steps: Omit<TaskRow, "status">[] = [
  {
    key: "read",
    label: "Read the overnight tickets",
    amount: "86 tickets",
    details: [{ label: "Email", meta: "61" }, { label: "Chat transcripts", meta: "25" }],
  },
  {
    key: "tag",
    label: "Tag tickets by product area",
    amount: "86 tickets",
    details: [{ label: "Booking widget", meta: "34" }, { label: "Billing", meta: "19" }],
  },
  {
    key: "draft",
    label: "Draft replies to billing questions",
    amount: "19 drafts",
    details: [
      { label: "Refund requests", meta: "7" },
      { label: "Invoice address changes", meta: "12" },
    ],
  },
  {
    key: "escalate",
    label: "Escalate the calendar sync reports",
    amount: "5 tickets",
    details: [
      { label: "Assigned to Priya Raman", meta: "5" },
      { label: "Linked to incident INC-482", meta: "1" },
    ],
  },
];

export default function LiveProgress() {
  const [stage, setStage] = useState(0);
  useEffect(() => {
    if (stage > steps.length - 1) return;
    const timer = window.setTimeout(() => setStage(stage + 1), 1400);
    return () => clearTimeout(timer);
  }, [stage]);
  /* rows before `stage` are done, the one at `stage` is running, later ones have not started */
  const rows: TaskRow[] = steps
    .slice(0, stage + 1)
    .map((row, i) => (i < stage ? { ...row, status: "done" } : { ...row, status: "running", step: i + 1 }));
  return <TaskRows rows={rows} />;
}
```

Vue · `live-progress.vue`

```vue
<script setup lang="ts">
import { computed, onBeforeUnmount, onMounted, ref } from "vue";
import { TaskRows, type TaskRow } from "@/components/ui/task-rows";

const steps: Omit<TaskRow, "status">[] = [
  {
    key: "read",
    label: "Read the overnight tickets",
    amount: "86 tickets",
    details: [{ label: "Email", meta: "61" }, { label: "Chat transcripts", meta: "25" }],
  },
  {
    key: "tag",
    label: "Tag tickets by product area",
    amount: "86 tickets",
    details: [{ label: "Booking widget", meta: "34" }, { label: "Billing", meta: "19" }],
  },
  {
    key: "draft",
    label: "Draft replies to billing questions",
    amount: "19 drafts",
    details: [
      { label: "Refund requests", meta: "7" },
      { label: "Invoice address changes", meta: "12" },
    ],
  },
  {
    key: "escalate",
    label: "Escalate the calendar sync reports",
    amount: "5 tickets",
    details: [
      { label: "Assigned to Priya Raman", meta: "5" },
      { label: "Linked to incident INC-482", meta: "1" },
    ],
  },
];

const stage = ref(0);
let timer = 0;
const tick = () => {
  if (stage.value <= steps.length - 1) timer = window.setTimeout(() => { stage.value++; tick(); }, 1400);
};
onMounted(tick);
onBeforeUnmount(() => clearTimeout(timer));
/* rows before `stage` are done, the one at `stage` is running, later ones have not started */
const rows = computed((): TaskRow[] =>
  steps
    .slice(0, stage.value + 1)
    .map((row, i) => (i < stage.value ? { ...row, status: "done" } : { ...row, status: "running", step: i + 1 })),
);
</script>

<template>
  <TaskRows :rows="rows" />
</template>
```

Svelte · `live-progress.svelte`

```svelte
<script lang="ts">
  import { onMount } from "svelte";
  import { TaskRows, type TaskRow } from "$lib/components/ui/task-rows";

  const steps = [
    {
      key: "read",
      label: "Read the overnight tickets",
      amount: "86 tickets",
      details: [{ label: "Email", meta: "61" }, { label: "Chat transcripts", meta: "25" }],
    },
    {
      key: "tag",
      label: "Tag tickets by product area",
      amount: "86 tickets",
      details: [{ label: "Booking widget", meta: "34" }, { label: "Billing", meta: "19" }],
    },
    {
      key: "draft",
      label: "Draft replies to billing questions",
      amount: "19 drafts",
      details: [
        { label: "Refund requests", meta: "7" },
        { label: "Invoice address changes", meta: "12" },
      ],
    },
    {
      key: "escalate",
      label: "Escalate the calendar sync reports",
      amount: "5 tickets",
      details: [
        { label: "Assigned to Priya Raman", meta: "5" },
        { label: "Linked to incident INC-482", meta: "1" },
      ],
    },
  ];

  let stage = $state(0);
  onMount(() => {
    let timer = 0;
    const tick = () => {
      if (stage <= steps.length - 1) timer = window.setTimeout(() => { stage++; tick(); }, 1400);
    };
    tick();
    return () => clearTimeout(timer);
  });
  /* rows before `stage` are done, the one at `stage` is running, later ones have not started */
  const rows = $derived<TaskRow[]>(
    steps
      .slice(0, stage + 1)
      .map((row, i) => (i < stage ? { ...row, status: "done" } : { ...row, status: "running", step: i + 1 })),
  );
</script>

<TaskRows {rows} />
```

## Recipe

`task-rows.recipe.ts`:

```ts
import { tv, type VariantProps } from "../lib/tv";

/* task-rows — live agent task status: running, failed, completed.
 *   capsules  each row its own surface capsule; the radius morphs 22 → 14 while it is open
 *   list      one card, rows separated by hairlines
 * Each row is the real Collapsible (variant row); `row` is passed to it as className. The
 * collapsible owns the trigger's metrics, hover, press, caret and the reveal; the row lays out its
 * label part (badge · label · status · amount) and wraps the amount to a second line (at the end)
 * before the label is squeezed below 96px. The pills are the real StatusPill.
 * Fully controlled: the host owns every row's status and which rows are open.
 *
 * Motion (`docs motion`), all here:
 *   mount     a mount is not an arrival: a plain mount shows its rows at once. With appear (the
 *             host's prop, for a list its code adds live) the rows present at first render fade up,
 *             staggered and capped (--fndn-row-index, set by the adapter only on those rows)
 *   arrival   a row added after mount always fades up, with no delay
 *   expand    the collapsible reveals the details as one container; the capsule radius moves with
 *             it, in the same timing family
 *   status    a new badge or pill replaces the old one in its own fixed slot: marks scale in from
 *             0.5 with opacity, rings fade, status pills arrive out of a 2px blur. @starting-style
 *             armed by the ready variant, so nothing plays at first paint and a swap mid-way retargets
 *   loops     the running ring spins (also under reduced motion: it is the loading signal)
 * Each row is the real Collapsible, marked data-task-rows="row". */

export const taskRows = tv({
  slots: {
    base: "flex w-full max-w-[440px] min-w-0 flex-col gap-2 text-sm",
    row: [
      "self-stretch min-w-0 overflow-hidden rounded-[22px] bg-surface shadow-card",
      "data-[state=open]:rounded-window motion-radius-reveal",
      "animate-[fndn-fade-up_var(--fndn-duration-enter)_var(--fndn-easing-out-strong)_calc(min(var(--fndn-row-index,0),var(--fndn-motion-stagger-max))*var(--fndn-duration-stagger))_both]",
      /* the collapsible's label part holds the row */
      "[&>[data-slot=collapsible-trigger]>[data-slot=collapsible-label]]:flex",
      "[&>[data-slot=collapsible-trigger]>[data-slot=collapsible-label]]:flex-wrap",
      "[&>[data-slot=collapsible-trigger]>[data-slot=collapsible-label]]:items-center",
      "[&>[data-slot=collapsible-trigger]>[data-slot=collapsible-label]]:gap-x-2.5",
      "[&>[data-slot=collapsible-trigger]>[data-slot=collapsible-label]]:gap-y-0.5",
    ],
    /* 24px slot: the mark or the ring replace each other in place */
    badge: "grid shrink-0 size-6 place-items-center [&>*]:[grid-area:1/1]",
    mark: [
      "grid size-[22px] place-items-center rounded-[50%] bg-green text-[13px] text-on-accent",
      "opacity-100 [transform:scale(1)] motion-opacity-base motion-transform-press",
    ],
    /* a progress ring with the step number inside (24px track + 28% round-capped arc) */
    ring: [
      "relative grid size-6 place-items-center opacity-100 motion-opacity-base",
      "[&>svg]:absolute [&>svg]:inset-0 [&>svg]:size-6 [&>svg]:animate-[fndn-spin_1.1s_linear_infinite]",
    ],
    ringTrack: "stroke-line",
    ringArc: "stroke-ink-3",
    step: "relative text-[10.5px] font-semibold leading-none tabular-nums text-ink",
    /* a growing label still starts on the page's side */
    label: "flex-[1_1_96px] min-w-0 overflow-hidden text-ellipsis [unicode-bidi:plaintext] [&:dir(rtl)]:text-right",
    amount: "shrink-0 ms-auto text-dense tabular-nums whitespace-nowrap text-ink-2 [unicode-bidi:plaintext]",
    /* the live region stays mounted; only the StatusPill inside it is replaced. It sits before the
     * amount, so a pill that arrives takes room from the label and nothing after it moves. While
     * running the ring says it visually; the words are for assistive technology only. */
    status: [
      "inline-grid shrink-0 [&:has(>.sr-only)]:absolute",
      "[&>[data-slot=status-pill]]:opacity-100 [&>[data-slot=status-pill]]:[filter:blur(0)]",
      "[&>[data-slot=status-pill]]:motion-opacity-base [&>[data-slot=status-pill]]:motion-filter-base",
    ],
    /* details: the collapsible's region holds them */
    detailGrid: "grid grid-cols-[24px_minmax(0,1fr)] gap-2.5 mb-2.5 px-2.5",
    rail: "w-px h-full mx-auto bg-line",
    detailList: "flex min-w-0 flex-col gap-1.5",
    detail: "flex min-w-0 items-center justify-between gap-2.5",
    detailLabel: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap text-xs text-ink-2 [unicode-bidi:plaintext]",
    detailMeta: "shrink-0 font-mono text-[11.5px] tabular-nums whitespace-nowrap text-ink-2 [unicode-bidi:plaintext]",
  },
  variants: {
    /* appear=false (the default): the rows present at mount are simply there; a row added later
     * still enters. Set per row by the adapter. */
    appear: { true: {}, false: { row: "animate-none" } },
    /* set after the first render: a new badge or pill enters from @starting-style, first paint does not */
    ready: {
      true: {
        mark: "starting:opacity-0 starting:[transform:scale(0.5)] motion-reduce:starting:[transform:none]",
        ring: "starting:opacity-0",
        status: "[&>[data-slot=status-pill]]:starting:opacity-0 [&>[data-slot=status-pill]]:starting:[filter:blur(2px)]",
      },
    },
    /* the mark: a green check, or a red cross a size smaller */
    tone: { green: {}, red: { mark: "bg-red text-[12px]" } },
    variant: {
      capsules: {},
      list: {
        base: "gap-0 self-start overflow-hidden rounded-card bg-surface shadow-card",
        row: "rounded-none data-[state=open]:rounded-none bg-transparent shadow-none border-b border-solid border-line last:border-b-0",
      },
    },
  },
  defaultVariants: { variant: "capsules" },
});

export type TaskRowsRecipeProps = VariantProps<typeof taskRows>;
```
