Skip to content

TaskTree

Stable

A list of tasks and the smaller tasks inside them, each with a status and an Open button.

Also known as tree view, subtasks, task hierarchy

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Tasks inside tasks

  • Plan the trip3 nested tasks Running
    • Look up flightsDone
    • Compare hotels1 nested tasks Running
      • Read guest reviewsPartial
  • Email the travel agentFailed

The (+N) count includes every task inside. Close a parent task to hide what is inside.

When to use it

Shows the helpers an assistant has started, with smaller tasks indented under the task that started them. Failed rows wait for you, and finished rows can tidy themselves away.

Made of: Open and close arrow · Status icon · Name · (+N) count · Status in words · Open button · Dismiss button (failed rows) · Spoken update

Use it for

  • Beside the box where people type, to show what helpers are doing.
  • A task that splits into smaller tasks, each with its own status.
  • Letting people open one helper to see what it did.

Not for

  • The steps of one task in the order they happen: use StepTimeline.
  • Separate tasks grouped by what they need from the person: use AgentSessionList.
  • A to-do list the person ticks off: use Checklist.

Do and avoid

  • Plan the trip2 nested tasks Partial
    • Find flightsDone
    • Book the hotelFailed

Do. One level of helpers under the main task is easy to follow.
  • Plan the trip4 nested tasks Partial
    • Book travel3 nested tasks Partial
      • Flights2 nested tasks Partial
        • Outbound1 nested tasks Partial
          • Seat choiceFailed

Avoid. Deep nesting pushes rows to the right until nobody can follow.

Do

  • Keep failed rows visible until the person dismisses them.
  • Remove the row from your own data when it is dismissed, so a later update does not bring it back.
  • Let finished rows leave on their own when they would otherwise pile up.
  • Use Open to take people to that task's own page.

Avoid

  • Don't show status with only color. Each row has an icon shape and words.
  • Don't make the wait so short that a result vanishes before it can be read.
  • Don't nest deeper than people can follow. Each level moves further right.
  • Don't use it for a simple list of steps in order. Use StepTimeline.

On a phone

  • Each level of nesting indents by 20px, so deep trees leave less width for the task name, which is cut with an ellipsis.
  • The status word and Open button wrap under the name when the row is narrow.
  • The expand, Open and dismiss controls keep their size and have a 44px tap area on a touch screen.

Seen in products

  • Claude Code shows a task panel below the prompt input.
  • Each Claude Code row has the subagent name, a status (Running, Done, Failed, Stopped or Partial), a custom color and a (+N) count of nested children, shown as an indented tree.
  • In Claude Code, Enter opens the subagent's own transcript, where the user can type follow-ups.
  • In Claude Code a finished row disappears after 30 seconds, and failed rows persist until dismissed with x.
  • Background subagents' permission prompts surface in the main session labeled with the subagent's name.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started