Task Tree
Shows the tasks of a run and how they break into parts. A task with one part continues straight down; a task with several branches them out. Each row has a Status mark, so the tree updates as your app changes task states. For a saved plan with criteria and dependencies, use Plan Outline. For agents that start other agents, use Agent Fanout.
Installation
pnpm dlx shadcn@latest add https://sprout.tulipfarm.ai/r/task-tree.jsonCopies Task Tree and the components it uses (Button and Status) into your app, installs the packages, and adds the styles. Then import it from @/components/ui/task-tree. Needs Tailwind CSS 4 and a components.json from shadcn init.
Install the following dependencies:
pnpm add clsx tailwind-merge @hugeicons/core-free-icons @hugeicons/react @xyflow/reactAdd Sprout base once per app: the
cn()helper and the design tokens.lib/sprout/classes.ts- Design tokens, for your global CSS
Copy and paste the following code into your project.
'use client'; import { Handle, Position, ReactFlow, useNodesInitialized, type Edge, type EdgeProps, type Node, type NodeProps, } from '@xyflow/react'; import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState, type ComponentProps, type ReactNode, type RefObject, } from 'react'; import { cn } from '@/lib/sprout/classes'; import { motion } from '@/lib/sprout/flow'; import { Status, type StatusState } from '@/components/ui/status'; export interface TaskTreeTask { id: string; title: ReactNode; state?: StatusState | undefined; value?: number | null | undefined; detail?: ReactNode; children?: readonly TaskTreeTask[] | undefined; } export interface TaskTreeProps extends Omit<ComponentProps<'section'>, 'title' | 'children'> { tasks: readonly TaskTreeTask[]; title?: ReactNode; summary?: ReactNode; empty?: ReactNode; } interface Mark { state: StatusState; value: number | null | undefined; done: number; leaves: number; } const finished = new Set<StatusState>(['success', 'warning', 'skipped']); function rollUp(parts: Mark[]): StatusState { const has = (state: StatusState) => parts.some(part => part.state === state); if (has('error')) return 'error'; if (has('running')) return 'running'; if (has('paused')) return 'paused'; if (parts.every(part => part.state === 'pending')) return 'pending'; if (parts.every(part => finished.has(part.state))) return parts.every(part => part.state === 'skipped') ? 'skipped' : has('warning') ? 'warning' : 'success'; if (has('stopped')) return 'stopped'; return 'running'; } function measure(tasks: readonly TaskTreeTask[], marks = new Map<string, Mark>()) { for (const task of tasks) { const children = task.children ?? []; if (children.length === 0) { const state = task.state ?? 'pending'; marks.set(task.id, { state, value: task.value, done: finished.has(state) ? 1 : 0, leaves: 1 }); continue; } measure(children, marks); const parts = children.map(child => marks.get(child.id)!); const done = parts.reduce((sum, part) => sum + part.done, 0); const leaves = parts.reduce((sum, part) => sum + part.leaves, 0); const state = task.state ?? rollUp(parts); const value = task.state ? task.value : state === 'running' ? (done / leaves) * 100 : undefined; marks.set(task.id, { state, value, done, leaves }); } return marks; } const rowHeight = 32; const indent = 24; const markCenter = 8; const markTop = 8; const markBottom = 24; const gap = 2; const radius = 6; type TaskNodeData = { task: TaskTreeTask; mark: Mark; width: number; entering: boolean; hops: number; }; type TaskNode = Node<TaskNodeData, 'task'>; type TaskEdge = Edge<{ path: string; hops: number; doneAt: number | null }, 'task'>; function chainPath(from: TaskNode, to: TaskNode) { const x = from.position.x + markCenter; return `M ${x} ${from.position.y + markBottom + gap} V ${to.position.y + markTop - gap}`; } function branchPath(from: TaskNode, to: TaskNode) { const x = from.position.x + markCenter; const y = to.position.y + markTop + markCenter; return `M ${x} ${from.position.y + markBottom + gap} V ${y - radius} Q ${x} ${y} ${x + radius} ${y} H ${to.position.x - gap - 1}`; } const lineTravel = 280; const rowEnter = 220; function hopsOf(task: TaskTreeTask): number { const children = task.children ?? []; if (task.state || children.length === 0) return 0; return 1 + Math.max(...children.map(hopsOf)); } interface History { primed: boolean; doneAt: Map<string, number>; addedAt: Map<string, number>; } function place(tasks: readonly TaskTreeTask[], marks: Map<string, Mark>, width: number, history: History) { const { primed, doneAt, addedAt } = history; const now = typeof performance === 'undefined' ? 0 : performance.now(); const nodes: TaskNode[] = []; const edges: TaskEdge[] = []; const visit = (task: TaskTreeTask, column: number, parent?: TaskNode, chain?: boolean) => { const children = task.children ?? []; const mark = marks.get(task.id)!; const x = column * indent; if (!addedAt.has(task.id)) addedAt.set(task.id, primed ? now : -Infinity); const node: TaskNode = { id: task.id, type: 'task', position: { x, y: nodes.length * rowHeight }, width: Math.max(0, width - x), height: rowHeight, data: { task, mark, width: Math.max(0, width - x), entering: now - addedAt.get(task.id)! < rowEnter, hops: hopsOf(task), }, }; nodes.push(node); if (parent) { const id = `${parent.id}->${task.id}`; if (mark.state !== 'success') doneAt.delete(id); else if (!doneAt.has(id)) doneAt.set(id, primed ? now : -Infinity); edges.push({ id, type: 'task', source: parent.id, target: task.id, zIndex: doneAt.has(id) ? 1 : 0, data: { path: chain ? chainPath(parent, node) : branchPath(parent, node), hops: node.data.hops, doneAt: doneAt.get(id) ?? null, }, }); } if (children.length === 1) visit(children[0]!, column, node, true); else for (const child of children) visit(child, column + 1, node, false); }; for (const task of tasks) visit(task, 0); return { nodes, edges }; } function useArrival(mark: Mark, hops: number) { const [shown, setShown] = useState(mark); const timers = useRef(new Set<ReturnType<typeof setTimeout>>()); const lastDone = useRef(mark.done); const key = `${mark.state}:${mark.value ?? ''}:${mark.done}`; useEffect(() => { const arrived = mark.done > lastDone.current; lastDone.current = mark.done; const delay = arrived ? motion(hops * lineTravel) : 0; if (delay === 0) { timers.current.forEach(clearTimeout); timers.current.clear(); setShown(mark); return; } const timer = setTimeout(() => { timers.current.delete(timer); setShown(mark); }, delay); timers.current.add(timer); // eslint-disable-next-line react-hooks/exhaustive-deps }, [key, hops]); useEffect(() => { const pending = timers.current; return () => pending.forEach(clearTimeout); }, []); return hops === 0 ? mark : shown; } function RowBody({ task, mark }: { task: TaskTreeTask; mark: Mark }) { return ( <> <Status state={mark.state} value={mark.value} aria-hidden="true" className="sprout-task-tree-status" /> <span className="sprout-task-tree-title">{task.title}</span> {task.detail != null && <span className="sprout-task-tree-detail">{task.detail}</span>} </> ); } function TaskRow({ data }: NodeProps<TaskNode>) { const { task, width, hops, entering } = data; const mark = useArrival(data.mark, hops); return ( <div className="sprout-task-tree-row" data-state={mark.state} {...(entering ? { 'data-entering': '' } : {})} style={{ width }} > <Handle type="target" position={Position.Top} isConnectable={false} className="sprout-task-tree-handle" /> <RowBody task={task} mark={mark} /> <Handle type="source" position={Position.Bottom} isConnectable={false} className="sprout-task-tree-handle" /> </div> ); } function TaskLink({ data }: EdgeProps<TaskEdge>) { const { path, hops, doneAt } = data!; const done = useRef<SVGPathElement>(null); useLayoutEffect(() => { const element = done.current; if (!element || doneAt === null || typeof element.animate !== 'function') return; const duration = motion(lineTravel); const delay = hops * lineTravel - (performance.now() - doneAt); if (duration === 0 || delay + duration <= 0) return; const animation = element.animate([{ strokeDashoffset: -1 }, { strokeDashoffset: 0 }], { duration, delay, easing: 'cubic-bezier(0.22, 1, 0.36, 1)', fill: 'backwards', }); return () => animation.cancel(); }, [doneAt, hops]); return ( <g className="sprout-task-tree-link"> <path className="sprout-task-tree-path" d={path} /> {doneAt !== null && <path ref={done} className="sprout-task-tree-path-done" d={path} pathLength={1} />} </g> ); } function Sketch({ nodes, edges }: { nodes: TaskNode[]; edges: TaskEdge[] }) { return ( <div className="sprout-task-tree-sketch"> <svg className="sprout-task-tree-sketch-lines" focusable="false"> {edges.map(edge => ( <g key={edge.id}> <path className="sprout-task-tree-path" d={edge.data!.path} /> {edge.data!.doneAt !== null && <path className="sprout-task-tree-path-done" d={edge.data!.path} />} </g> ))} </svg> {nodes.map(node => ( <div key={node.id} className="sprout-task-tree-row" data-state={node.data.mark.state} style={{ left: node.position.x, top: node.position.y }} > <RowBody task={node.data.task} mark={node.data.mark} /> </div> ))} </div> ); } function OnDrawn({ root, lines, onDrawn, }: { root: RefObject<HTMLDivElement | null>; lines: number; onDrawn: () => void; }) { const initialized = useNodesInitialized({ includeHiddenNodes: true }); useEffect(() => { if (!initialized) return; let frame = 0; const check = () => { frame = requestAnimationFrame(() => (root.current?.querySelectorAll('.sprout-task-tree-link').length ?? 0) >= lines ? onDrawn() : check(), ); }; check(); return () => cancelAnimationFrame(frame); }, [initialized, root, lines, onDrawn]); return null; } const nodeTypes = { task: TaskRow }; const edgeTypes = { task: TaskLink }; function Outline({ tasks, marks }: { tasks: readonly TaskTreeTask[]; marks: Map<string, Mark> }) { return ( <ul className="sprout-task-tree-list"> {tasks.map(task => { const mark = marks.get(task.id)!; return ( <li key={task.id} data-slot="task-tree-item" data-state={mark.state} className="sprout-task-tree-item"> <span className="sprout-task-tree-item-row"> <Status state={mark.state} value={mark.value} size="sm" /> <span className="sprout-task-tree-item-title">{task.title}</span> {task.detail != null && <span className="sprout-task-tree-detail">{task.detail}</span>} </span> {task.children && task.children.length > 0 && <Outline tasks={task.children} marks={marks} />} </li> ); })} </ul> ); } export function TaskTree({ tasks, title = 'Tasks', summary, empty, className, ...rest }: TaskTreeProps) { const headingId = useId(); const history = useRef<History>({ primed: false, doneAt: new Map(), addedAt: new Map() }); const root = useRef<HTMLElement>(null); const flow = useRef<HTMLDivElement>(null); const [width, setWidth] = useState(0); const [drawn, setDrawn] = useState(false); const marks = measure(tasks); const total = tasks.reduce((sum, task) => sum + marks.get(task.id)!.leaves, 0); const done = tasks.reduce((sum, task) => sum + marks.get(task.id)!.done, 0); const count = summary === undefined ? `${done} of ${total} done` : summary; const { nodes, edges } = place(tasks, marks, width, history.current); useEffect(() => { history.current.primed = true; }, []); useLayoutEffect(() => { const element = root.current; if (!element) return; setWidth(Math.floor(element.getBoundingClientRect().width)); const observer = new ResizeObserver(([entry]) => setWidth(Math.floor(entry!.contentRect.width))); observer.observe(element); return () => observer.disconnect(); }, []); const showFlow = useCallback(() => { for (const animation of flow.current?.getAnimations({ subtree: true }) ?? []) if (animation.effect?.getTiming().iterations !== Infinity) animation.finish(); setDrawn(true); }, []); return ( <section data-slot="task-tree" aria-labelledby={headingId} className={cn('sprout-task-tree', className)} {...rest} ref={root} > <header className="sprout-task-tree-header"> <h3 id={headingId} className="sprout-task-tree-heading"> {title} </h3> {count != null && total > 0 && ( <span className="sprout-task-tree-summary" aria-live="polite"> {count} </span> )} </header> {total > 0 ? ( <> <div className="sprout-task-tree-outline"> <Outline tasks={tasks} marks={marks} /> </div> <div className="sprout-task-tree-stage" aria-hidden="true" style={{ height: nodes.length * rowHeight }}> {!drawn && <Sketch nodes={nodes} edges={edges} />} {width > 0 && ( <div ref={flow} className="sprout-task-tree-flow" {...(drawn ? { 'data-drawn': '' } : {})}> <ReactFlow className="sprout-task-tree-canvas" nodes={nodes} edges={edges} nodeTypes={nodeTypes} edgeTypes={edgeTypes} defaultViewport={{ x: 0, y: 0, zoom: 1 }} minZoom={1} maxZoom={1} panOnDrag={false} panOnScroll={false} zoomOnScroll={false} zoomOnPinch={false} zoomOnDoubleClick={false} preventScrolling={false} nodesDraggable={false} nodesConnectable={false} nodesFocusable={false} edgesFocusable={false} elementsSelectable={false} proOptions={{ hideAttribution: true }} > {!drawn && <OnDrawn root={flow} lines={edges.length} onDrawn={showFlow} />} </ReactFlow> </div> )} </div> </> ) : ( <p className="sprout-task-tree-empty">{empty ?? 'No tasks yet.'}</p> )} </section> ); }And the files it imports:
lib/sprout/icons/add-icon.tsxlib/sprout/icons/create-icon.tsxlib/sprout/icons/minus-icon.tsxlib/sprout/icons/scan-icon.tsxlib/sprout/flow.tsx
Add the styles to your global CSS, after
@import "tailwindcss".@layer components { .sprout-task-tree { min-width: 0; color: var(--sprout-text); font-family: var(--sprout-font); flex-direction: column; gap: 8px; display: flex; } .sprout-task-tree-header { justify-content: space-between; align-items: baseline; gap: 12px; min-width: 0; display: flex; } .sprout-task-tree-heading { min-width: 0; font-size: var(--sprout-text-sm); overflow-wrap: anywhere; margin: 0; font-weight: 500; line-height: 1.25rem; } .sprout-task-tree-summary, .sprout-task-tree-detail { color: var(--sprout-muted); font-size: var(--sprout-text-sm); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; line-height: 1.25rem; } .sprout-task-tree-empty { color: var(--sprout-muted); font-size: var(--sprout-text-sm); margin: 0; line-height: 1.25rem; } .sprout-task-tree-outline { clip-path: inset(50%); white-space: nowrap; width: 1px; height: 1px; position: absolute; overflow: hidden; } .sprout-task-tree-list { margin: 0; padding: 0; list-style: none; } .sprout-task-tree-stage { --sprout-task-tree-line: color-mix(in oklab, var(--sprout-muted) 40%, var(--sprout-surface)); --sprout-task-tree-line-done: var(--sprout-success); width: 100%; position: relative; overflow: hidden; } .sprout-task-tree-sketch, .sprout-task-tree-flow { direction: ltr; position: absolute; inset: 0; } .sprout-task-tree-sketch-lines { width: 100%; height: 100%; position: absolute; inset: 0; overflow: visible; } .sprout-task-tree-sketch .sprout-task-tree-row { position: absolute; right: 0; } .sprout-task-tree-flow:not([data-drawn]) { opacity: 0; } .sprout-task-tree-flow { --sprout-task-tree-page-canvas: var(--sprout-canvas); --sprout-task-tree-page-surface: var(--sprout-surface); --sprout-task-tree-page-hover: var(--sprout-hover); --sprout-task-tree-page-active: var(--sprout-active); --sprout-task-tree-page-text: var(--sprout-text); --sprout-task-tree-page-muted: var(--sprout-muted); --sprout-task-tree-page-line: var(--sprout-line); --sprout-task-tree-page-border: var(--sprout-border); --sprout-task-tree-page-border-strong: var(--sprout-border-strong); --sprout-task-tree-page-input: var(--sprout-input); --sprout-task-tree-page-primary: var(--sprout-primary); --sprout-task-tree-page-primary-hover: var(--sprout-primary-hover); --sprout-task-tree-page-primary-active: var(--sprout-primary-active); --sprout-task-tree-page-primary-subtle: var(--sprout-primary-subtle); --sprout-task-tree-page-on-primary: var(--sprout-on-primary); --sprout-task-tree-page-focus: var(--sprout-focus); --sprout-task-tree-page-danger: var(--sprout-danger); --sprout-task-tree-page-danger-hover: var(--sprout-danger-hover); --sprout-task-tree-page-danger-subtle: var(--sprout-danger-subtle); --sprout-task-tree-page-on-danger: var(--sprout-on-danger); --sprout-task-tree-page-info: var(--sprout-info); --sprout-task-tree-page-info-subtle: var(--sprout-info-subtle); --sprout-task-tree-page-secondary: var(--sprout-secondary); --sprout-task-tree-page-success: var(--sprout-success); --sprout-task-tree-page-success-subtle: var(--sprout-success-subtle); --sprout-task-tree-page-warning: var(--sprout-warning); --sprout-task-tree-page-warning-subtle: var(--sprout-warning-subtle); --sprout-task-tree-page-overlay: var(--sprout-overlay); } .sprout-task-tree-canvas > .react-flow__renderer { --sprout-canvas: var(--sprout-task-tree-page-canvas); --sprout-surface: var(--sprout-task-tree-page-surface); --sprout-hover: var(--sprout-task-tree-page-hover); --sprout-active: var(--sprout-task-tree-page-active); --sprout-text: var(--sprout-task-tree-page-text); --sprout-muted: var(--sprout-task-tree-page-muted); --sprout-line: var(--sprout-task-tree-page-line); --sprout-border: var(--sprout-task-tree-page-border); --sprout-border-strong: var(--sprout-task-tree-page-border-strong); --sprout-input: var(--sprout-task-tree-page-input); --sprout-primary: var(--sprout-task-tree-page-primary); --sprout-primary-hover: var(--sprout-task-tree-page-primary-hover); --sprout-primary-active: var(--sprout-task-tree-page-primary-active); --sprout-primary-subtle: var(--sprout-task-tree-page-primary-subtle); --sprout-on-primary: var(--sprout-task-tree-page-on-primary); --sprout-focus: var(--sprout-task-tree-page-focus); --sprout-danger: var(--sprout-task-tree-page-danger); --sprout-danger-hover: var(--sprout-task-tree-page-danger-hover); --sprout-danger-subtle: var(--sprout-task-tree-page-danger-subtle); --sprout-on-danger: var(--sprout-task-tree-page-on-danger); --sprout-info: var(--sprout-task-tree-page-info); --sprout-info-subtle: var(--sprout-task-tree-page-info-subtle); --sprout-secondary: var(--sprout-task-tree-page-secondary); --sprout-success: var(--sprout-task-tree-page-success); --sprout-success-subtle: var(--sprout-task-tree-page-success-subtle); --sprout-warning: var(--sprout-task-tree-page-warning); --sprout-warning-subtle: var(--sprout-task-tree-page-warning-subtle); --sprout-overlay: var(--sprout-task-tree-page-overlay); } .sprout-task-tree-flow .react-flow__container, .sprout-task-tree-flow .react-flow__viewport, .sprout-task-tree-flow .react-flow__edges, .sprout-task-tree-flow .react-flow__nodes { transform-origin: 0 0; pointer-events: none; position: absolute; inset: 0; } .sprout-task-tree-flow .react-flow__pane { z-index: 1; pointer-events: none; position: absolute; inset: 0; } .sprout-task-tree-flow .react-flow__viewport { z-index: 2; } .sprout-task-tree-flow .react-flow__edges svg { pointer-events: none; position: absolute; overflow: visible; } .sprout-task-tree-flow .react-flow__node { box-sizing: border-box; transform-origin: 0 0; user-select: text; pointer-events: none; position: absolute; } .sprout-task-tree-handle { opacity: 0; pointer-events: none; border: 0; width: 0; min-width: 0; height: 0; min-height: 0; position: absolute; } .sprout-task-tree-row { box-sizing: border-box; align-items: flex-start; gap: 12px; height: 32px; padding-block: 6px; display: flex; } .sprout-task-tree-status { margin-top: 2px; } .sprout-task-tree-title { min-width: 0; font-size: var(--sprout-text-sm); text-overflow: ellipsis; white-space: nowrap; flex: 1; line-height: 1.25rem; overflow: hidden; } .sprout-task-tree-row[data-state="pending"] .sprout-task-tree-title, .sprout-task-tree-row[data-state="skipped"] .sprout-task-tree-title { color: var(--sprout-muted); } .sprout-task-tree-row[data-state="running"] .sprout-task-tree-title { font-weight: 500; } .sprout-task-tree-path, .sprout-task-tree-path-done { fill: none; stroke-width: 2px; stroke-linecap: round; stroke-linejoin: round; } .sprout-task-tree-path { stroke: var(--sprout-task-tree-line); } .sprout-task-tree-path-done { stroke: var(--sprout-task-tree-line-done); stroke-dasharray: 1 1; stroke-dashoffset: 0; } @media (prefers-reduced-motion: no-preference) { .sprout-task-tree-row[data-entering] { animation: sprout-task-tree-enter .22s var(--sprout-motion-ease) backwards; } } @media (prefers-reduced-motion: reduce) { .sprout-task-tree-row[data-entering] { animation: .16s ease-out backwards sprout-task-tree-fade; } } @media (forced-colors: active) { .sprout-task-tree-stage { --sprout-task-tree-line: GrayText; --sprout-task-tree-line-done: CanvasText; forced-color-adjust: none; } } @keyframes sprout-task-tree-enter { from { opacity: 0; transform: translateY(-4px); } } @keyframes sprout-task-tree-fade { from { opacity: 0; } } }Import it from
@/components/ui/task-tree. Update the paths if your@/alias points elsewhere.
pnpm add @tulipfarm/sprout@import "tailwindcss";
@import "@tulipfarm/sprout/styles.css";The package keeps the source and ships fixes with each release. Import from @tulipfarm/sprout/task-tree.
Live run
Two tasks run at a time. A parent’s mark follows its parts: it fills as they finish, and fails if one fails. Lines turn green as the tasks they lead to succeed.
Tasks
0 of 6 done- Scaffolding project
- Installing dependencies
- Defining signups schema
- Implementing join logic
- Adding SQLite layer
- Wiring POST /api/join
- Building join API
- Handling UI states
- Building landing form
- Smoke testing API
- Building join API
- Writing unit tests
- Testing
- Wiring POST /api/join
- Adding SQLite layer
- Implementing join logic
- Validating email input
- Building signup form
- Defining signups schema
- Ignoring DB files
- Writing README
- Installing dependencies
Every state
Parents without a state follow their parts, so one failed upload marks the release failed. “Announcing” sets its own state. Long titles wrap under themselves.
Release
2 of 5 done- Releasing v2.4
- Drafting release notes from 38 merged pull requests and the changelog entries they reference12s
- Publishing packages
- PyPI60%
- npmWaiting for 2FA
- Docker imageRegistry timed out
- Announcing in #releases
- Posting to social
No tasks
Before the first task arrives, the tree says so.
Tasks
No tasks yet. They appear here as the agent plans.
Usage
import { TaskTree } from "@tulipfarm/sprout/task-tree";
<TaskTree
tasks={[
{
id: "scaffold",
title: "Scaffolding project",
state: "success",
children: [
{ id: "deps", title: "Installing dependencies", state: "running", value: 40, detail: "40%" },
{ id: "ignore", title: "Ignoring DB files", state: "success", children: [
{ id: "readme", title: "Writing README", state: "pending" },
] },
],
},
]}
/>tasks:{ id, title, state?, value?, detail?, children? }.stateandvaluego to Status.detailis short muted text at the end of the row, such as a duration or a count.children: the task's parts. One part stays in the same column with a straight line. Two or more move one column in, each with its own branch.- A task with parts and no
statefollows them: failed if any part failed, running if any is running, succeeded once all have finished. While running, its ring fills with the share of parts done. Setstateto override it. title: the heading, “Tasks” by default.summaryreplaces the “3 of 8 done” count; passnullto hide it. The count covers tasks without parts. Succeeded, warning, and skipped tasks count as done.empty: shown when there are no tasks. Defaults to “No tasks yet.”
Lines are drawn with React Flow at a fixed 24px column and 32px row, with panning, zoom, and selection turned off. Long titles end in an ellipsis.
Motion
When a task succeeds, a green line grows from it up to its parent over 280ms. A parent that follows its parts changes only once that line arrives, so the green climbs the tree one level at a time. Other changes show at once. Rows added later fade in over 220ms. The server sends a static drawing of the same tree, which React Flow replaces in place without replaying anything. With reduced motion, lines turn green at once and rows only fade.
Accessibility
The section is named by its heading. Screen readers get the tasks as nested lists, with each Status mark named after its state, such as “Running, 40%”; the drawing is hidden from them. The done count is a polite live region, so progress is announced as tasks finish.
Theme tokens
Lines use --sprout-muted mixed 40% into --sprout-surface, and --sprout-success once the task below them has succeeded. Pending and skipped titles use --sprout-muted. In forced colors, lines use GrayText and finished lines CanvasText.