Skip to content
TuffTasks, docs and chat for teams and AI agents

Planning & Execution

Task Board Answer

An agent's breakdown of a project as a mini board — cards stream into Todo, Doing and Done, drag between columns, rename in place, then create them all.

1 variantMIT

Preview

Landing page launch

0 tasks

Loading0 of 9

Splitting the launch into design, copy and build work…

Todo

0

Doing

0

Done

0

Shift + arrows move a focused card

Installation

Copies the component into components/ui and installs its dependencies and theme tokens.

pnpm dlx shadcn@latest add https://tuffui.com/r/task-board-answer.json

Usage

Pass your own data and wire the callbacks to your agent runtime.

import { TaskBoardAnswer, type TaskBoardTask } from "@/components/ui/task-board-answer";

// Rendered by the agent in answer to "break the landing page launch into tasks".
export function TaskPlanAnswer({ plan, streaming }: Props) {
  const [tasks, setTasks] = useState<TaskBoardTask[]>(plan.tasks);
  const [status, setStatus] = useState<TaskBoardStatus>("ready");

  return (
    <TaskBoardAnswer
      title="Landing page launch"
      tasks={tasks} // { id, title, column: "todo", assignee, due: "2026-11-18", estimate: 2, label: "Copy" }
      onTasksChange={setTasks} // drags, Shift + arrow moves and renames
      status={streaming ? "streaming" : status}
      expectedCount={plan.expected}
      projectName="Website · Q4 launch"
      projectHref={plan.projectUrl}
      onRegenerate={() => sendFollowUp("Try a different breakdown")}
      onCreate={async (tasks) => {
        setStatus("creating");
        await runTool("create_tasks", { project: plan.projectId, tasks });
        setStatus("created");
      }}
    />
  );
}

Props

PropTypeDefaultDescription
tasks*TaskBoardTask[]—Every card, in board order. Each column shows its cards in the order they appear in the list. Append while streaming and new cards fade up.
onTasksChange(tasks: TaskBoardTask[]) => void—Called with the whole list after a card is dragged, moved with Shift + arrows, or renamed. Without it the board is read-only.
columnsTaskBoardColumn[]Todo · Doing · DoneColumns left to right. Each has an id, a title and an optional icon.
status"streaming" | "ready" | "creating" | "created""ready"Streaming shows a count and disables the actions. Ready allows dragging and renaming. Creating spins the primary button. Created swaps the actions for a confirmation.
expectedCountnumber—Total cards expected, for "4 of 9" in the header while streaming.
summaryReactNode—Agent line above the board. Defaults to a count of tasks and owners.
streamingTextReactNode"Breaking it down into tasks…"Shown in place of the summary while streaming.
onCreate(tasks: TaskBoardTask[]) => void—Shows the primary "Create N tasks" button. Gets the edited list.
onRegenerate() => void—Shows "Regenerate".
projectNamestring"the project"Named in the confirmation: "9 tasks created in …".
projectHrefstring—Makes "Open in project" a link.
onOpenProject() => void—Called by "Open in project" when there is no `projectHref`.
liftedIdstring | null—A card shown picked up: raised and tilted. For an agent or a script moving cards; set its column while lifted and it glides there.
editingIdstring | null—A card shown with its title in an edit field, driven from outside. Update its title in `tasks` to type into it.
labelColorsRecord<string, string>—CSS colours by label name. Labels not listed get a tint derived from their name.
formatDue(iso: string) => string"Nov 18"Due date on each card.
formatEstimate(hours: number) => string"3h", "30m"Estimate on each card and the total in the subtitle.
iconIconKanbanPhosphor icon in the header tile.
titleReactNode"Task plan"Header title.
subtitleReactNode—Line under the title. Defaults to "9 tasks · 3 people · 26h".
introbooleantrueCards fade up as they arrive. Skipped with reduced motion.
classNamestring—Extra classes for the root element.
type TaskBoardTask = {
  id: string;
  title: string;          // "Write hero headline and subhead"
  column: string;         // "todo"
  assignee?: { name: string; src?: string };
  due?: string;           // "2026-11-18"
  estimate?: number;      // hours, 2
  label?: string;         // "Copy"
};

type TaskBoardColumn = {
  id: string;             // "doing"
  title: string;          // "Doing"
  icon?: Icon;
  iconClassName?: string; // "text-warning"
};

// Keyboard: Enter or F2 renames a focused card, Shift + ←/→ moves it between
// columns, Shift + ↑/↓ reorders it.
// Also exported: moveTask(tasks, id, column, index) and defaultTaskColumns.