Skip to documentation content

Task Rows

List the tasks in an agent run with the status of each, and offer a retry on the ones that failed.

task-rows-demo

Overview

Task Rows shows where each task in a run stands: queued, running, completed, or failed. A task with details opens to show what it is made of, and a failed task can offer Retry.

It shows the status you pass for each task. Update the array as your agent reports progress.

Use Tool Chips for individual tool calls and their output, and Task Rows for the larger units of work a person would recognize.

Anatomy

TaskRows
  • RowOne task: its status icon, label, summary, and status in words
  • DetailsLines under a task, behind a disclosure
  • RetryA button on a failed task, when you handle it

Installing task-rows brings Button and Collapsible along as registry dependencies.

Behavior

Status

Each status has an icon and a word. The word is always shown, so the icon's color is never the only cue.

Details

A task with details is a button that opens them. A task without details is plain text.

Retry

Pass onRetry to show Retry on every failed task. It calls your handler with the task id. Changing the task's status is your application's work.

Variants

cards gives each task its own bordered card. list joins the tasks in one block with dividers, which suits a longer run.

Accessibility

The tasks are a list. A task with details is a button that reports whether it is expanded. Retry is named with its task, such as "Retry: Draft supplier emails". Icons are decorative, and with reduced motion the running icon does not rotate.

Task Rows does not announce status changes. If the person needs to hear that a task failed, announce it from your own status region.

KeyAction
TabMove across tasks with details and Retry buttons
Enter or SpaceOpen or close the focused task, or retry it

Installation

npx honestui@latest add https://ai.honestui.com/r/task-rows.json

Usage

import { TaskRows } from "@/components/ai/task-rows"

<TaskRows
  tasks={run.tasks.map((task) => ({
    id: task.id,
    label: task.title,
    status: task.state,
    summary: task.summary,
  }))}
  onRetry={(taskId) => agent.retryTask(run.id, taskId)}
/>

Examples

List variant

The same tasks joined in one block.

task-rows-list

API reference

TaskRows

Accepts native ul props beyond those listed.

PropTypeDefaultDescription
tasksTask[]RequiredThe tasks, in order.
variant"cards" | "list""cards"Separate cards, or one joined block.
onRetry(taskId: string) => voidNonePassing it shows Retry on failed tasks.
labelsPartial<TaskRowsLabels>EnglishThe four status words and the Retry name.

Types

ExportShape
Taskid, label, status, and optional summary, details
TaskStatus"queued", "running", "done", or "error"
TaskDetaillabel, and an optional value