Skip to content
Eskais UI

Agent tasks

Task Detail Panel

An agent task's goal, acceptance and evidence, dependencies that select their task, the pending decision with proposal actions, usage and the attempt timeline. TaskDetailPanel shows it as a non-modal panel; TaskDetailDialog as a modal dialog or a right-side drawer. Escape and a close button close either.

Example

Branch history opens your git view.

Installation

npx shadcn@latest add @eskais/task-detail-panel

Usage

Import
import { TaskDetailPanel } from "@/components/ui/task-detail-panel"import {  TaskDetailAcceptance,  TaskDetailActivity,  TaskDetailAttachments,  TaskDetailAttempts,  TaskDetailContent,  TaskDetailDecision,  TaskDetailDependencies,  TaskDetailDetails,  TaskDetailGoal,  TaskDetailLinks,  TaskDetailLocation,  TaskDetailMeta,  TaskDetailUsage,  taskDetailMainSections,  taskDetailSideSections,} from "@/components/ui/task-detail-content"import {  TaskDetailAcceptance,  TaskDetailActivity,  TaskDetailAttachments,  TaskDetailAttempts,  TaskDetailDecision,  TaskDetailDependencies,  TaskDetailDetails,  TaskDetailGoal,  TaskDetailLinks,  TaskDetailLocation,  TaskDetailUsage,  taskDetailMainSections,  taskDetailSideSections,} from "@/components/ui/task-detail-sections"import { TaskDetailDialog } from "@/components/ui/task-detail-dialog"import { Block, DetailValue, insidePopup } from "@/components/ui/task-detail-parts"

TaskDetailPanel beside a board, or TaskDetailDialog as a modal; renderHeader, renderBeforeBody and renderAfterBody add a stats strip, a git line or a changes section to the dialog's frame, and hide or sections leave out what the header already shows. Each section (TaskDetailActivity, TaskDetailUsage…) also renders on its own.

API reference

TaskDetailPanel

Takes Omit<ComponentProps<"section">, "children"> &.

TaskDetailMeta

PropTypeDefault
taskrequiredTaskView–
labelsTaskDisplayOptions["labels"]agentTaskBoardLabels

TaskDetailContent

PropTypeDefault
layout`"split"` sets the side column beside the main one once the content is 56rem wide, inside an `@container/task-detail`; `"stack"` (default) keeps one column, the side after the main."stack" | "split""stack"
showStatusLists the status among the details; turn it off where a header already shows it.booleantrue
hideSections and detail rows to leave out, like the ones a header already shows: `hide={["status", "cost", "attemptsSummary", "acceptance"]}`.readonly (TaskDetailSection | TaskDetailRow)[]nothingHidden
sectionsThe sections of each column, in order; a column you pass shows only those. Both default to every section.{ main?: readonly TaskDetailMainSection[] side?: readonly TaskDetailSideSection[] }–

Also takes TaskDetailSectionProps.

TaskDetailGoal

PropTypeDefault
taskrequiredTaskView–
renderThreadLink(thread: ThreadRef) => ReactNode–
onOpenThread(thread: ThreadRef) => void–
renderLinkReplaces the default link in the detail's list of links.(link: TaskLink) => ReactNode–
renderAttachmentsReplaces the attachment strip.(task: TaskView) => ReactNode–
renderLocationReplaces the stage track.(task: TaskView) => ReactNode–
headingLevelnumber3

Also takes TaskDisplayOptions.

TaskDetailDecision

PropTypeDefault
taskrequiredTaskView–
renderThreadLink(thread: ThreadRef) => ReactNode–
onOpenThread(thread: ThreadRef) => void–
renderLinkReplaces the default link in the detail's list of links.(link: TaskLink) => ReactNode–
renderAttachmentsReplaces the attachment strip.(task: TaskView) => ReactNode–
renderLocationReplaces the stage track.(task: TaskView) => ReactNode–
headingLevelnumber3

Also takes TaskDisplayOptions.

TaskDetailAcceptance

PropTypeDefault
taskrequiredTaskView–
renderThreadLink(thread: ThreadRef) => ReactNode–
onOpenThread(thread: ThreadRef) => void–
renderLinkReplaces the default link in the detail's list of links.(link: TaskLink) => ReactNode–
renderAttachmentsReplaces the attachment strip.(task: TaskView) => ReactNode–
renderLocationReplaces the stage track.(task: TaskView) => ReactNode–
headingLevelnumber3

Also takes TaskDisplayOptions.

TaskDetailAttachments

PropTypeDefault
taskrequiredTaskView–
renderThreadLink(thread: ThreadRef) => ReactNode–
onOpenThread(thread: ThreadRef) => void–
renderLinkReplaces the default link in the detail's list of links.(link: TaskLink) => ReactNode–
renderAttachmentsReplaces the attachment strip.(task: TaskView) => ReactNode–
renderLocationReplaces the stage track.(task: TaskView) => ReactNode–
headingLevelnumber3

Also takes TaskDisplayOptions.

TaskDetailActivity

PropTypeDefault
taskrequiredTaskView–
renderThreadLink(thread: ThreadRef) => ReactNode–
onOpenThread(thread: ThreadRef) => void–
renderLinkReplaces the default link in the detail's list of links.(link: TaskLink) => ReactNode–
renderAttachmentsReplaces the attachment strip.(task: TaskView) => ReactNode–
renderLocationReplaces the stage track.(task: TaskView) => ReactNode–
headingLevelnumber3

Also takes TaskDisplayOptions.

TaskDetailDetails

PropTypeDefault
taskrequiredTaskView–
renderThreadLink(thread: ThreadRef) => ReactNode–
onOpenThread(thread: ThreadRef) => void–
renderLinkReplaces the default link in the detail's list of links.(link: TaskLink) => ReactNode–
renderAttachmentsReplaces the attachment strip.(task: TaskView) => ReactNode–
renderLocationReplaces the stage track.(task: TaskView) => ReactNode–
headingLevelnumber–
hideRows to leave out, like the ones a header already shows.readonly TaskDetailRow[]noRows

Also takes TaskDisplayOptions.

TaskDetailDependencies

PropTypeDefault
taskrequiredTaskView–
renderThreadLink(thread: ThreadRef) => ReactNode–
onOpenThread(thread: ThreadRef) => void–
renderLinkReplaces the default link in the detail's list of links.(link: TaskLink) => ReactNode–
renderAttachmentsReplaces the attachment strip.(task: TaskView) => ReactNode–
renderLocationReplaces the stage track.(task: TaskView) => ReactNode–
headingLevelnumber3

Also takes TaskDisplayOptions.

TaskDetailAttempts

PropTypeDefault
taskrequiredTaskView–
renderThreadLink(thread: ThreadRef) => ReactNode–
onOpenThread(thread: ThreadRef) => void–
renderLinkReplaces the default link in the detail's list of links.(link: TaskLink) => ReactNode–
renderAttachmentsReplaces the attachment strip.(task: TaskView) => ReactNode–
renderLocationReplaces the stage track.(task: TaskView) => ReactNode–
headingLevelnumber3

Also takes TaskDisplayOptions.

TaskDetailUsage

PropTypeDefault
taskrequiredTaskView–
renderThreadLink(thread: ThreadRef) => ReactNode–
onOpenThread(thread: ThreadRef) => void–
renderLinkReplaces the default link in the detail's list of links.(link: TaskLink) => ReactNode–
renderAttachmentsReplaces the attachment strip.(task: TaskView) => ReactNode–
renderLocationReplaces the stage track.(task: TaskView) => ReactNode–
headingLevelnumber3

Also takes TaskDisplayOptions.

PropTypeDefault
taskrequiredTaskView–
renderThreadLink(thread: ThreadRef) => ReactNode–
onOpenThread(thread: ThreadRef) => void–
renderLinkReplaces the default link in the detail's list of links.(link: TaskLink) => ReactNode–
renderAttachmentsReplaces the attachment strip.(task: TaskView) => ReactNode–
renderLocationReplaces the stage track.(task: TaskView) => ReactNode–
headingLevelnumber3

Also takes TaskDisplayOptions.

TaskDetailLocation

PropTypeDefault
taskrequiredTaskView–
renderThreadLink(thread: ThreadRef) => ReactNode–
onOpenThread(thread: ThreadRef) => void–
renderLinkReplaces the default link in the detail's list of links.(link: TaskLink) => ReactNode–
renderAttachmentsReplaces the attachment strip.(task: TaskView) => ReactNode–
renderLocationReplaces the stage track.(task: TaskView) => ReactNode–
headingLevelnumber3

Also takes TaskDisplayOptions.

TaskDetailDialog

PropTypeDefault
taskrequiredThe task to show; `undefined` closes the dialog.TaskView | undefined–
presentation"dialog" | "drawer""dialog"
onCloserequiredRuns when a person or an agent closes it; clear the task to close it, or keep it to refuse.(reason: CloseReason | "imperative") => void–
finalFocusWhere focus goes once it closes; the element focused before it opened by default.ComponentProps<typeof DialogContent>["finalFocus"]–
renderHeaderUnder the title, inside the fixed header: a stats strip, a git line.(task: TaskView) => ReactNode–
renderBeforeBodyIn the scrolling body, before the task's sections: a changes section.(task: TaskView) => ReactNode–
renderAfterBodyIn the scrolling body, after the task's sections.(task: TaskView) => ReactNode–
classNamestring–

Also takes TaskDetailContentProps except task, headingLevel, layout, showStatus.

DetailValue

PropTypeDefault
termrequiredstring–
childrenReactNode–
quantityShown instead of `children`; an estimate or a sourced value gets a tooltip saying so.Quantity–
localestring–
formatCurrency(usd: number) => string–
quantityLabelsPartial<QuantityLabels>–
inlineTerm and value on one row.booleanfalse
wrapLets the value wrap instead of truncating.booleanfalse

Block

PropTypeDefault
titlerequiredstring–
levelrequirednumber–
classNamestring–
childrenrequiredReactNode–

Other exports

taskDetailMainSectionstaskDetailSideSectionsinsidePopuptype CloseReasontype TaskDetailPanelPropstype TaskDetailContentPropstype TaskDetailMainSectiontype TaskDetailRowtype TaskDetailSectiontype TaskDetailSectionPropstype TaskDetailSideSectiontype TaskDetailDialogPropstype DetailValueProps

Accessibility

  • A section with the task title as its heading; sections inside take the next level.
  • TaskDetailDialog is named by the task's title, focuses itself as it opens so reading starts at the top, and keeps its close button and Escape whatever its slots hold.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.