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
Usage
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
| Prop | Type | Default |
|---|---|---|
taskrequired | TaskView | – |
labels | TaskDisplayOptions["labels"] | agentTaskBoardLabels |
TaskDetailContent
| Prop | Type | Default |
|---|---|---|
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. | boolean | true |
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
| Prop | Type | Default |
|---|---|---|
taskrequired | TaskView | – |
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 | – |
headingLevel | number | 3 |
Also takes TaskDisplayOptions.
TaskDetailDecision
| Prop | Type | Default |
|---|---|---|
taskrequired | TaskView | – |
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 | – |
headingLevel | number | 3 |
Also takes TaskDisplayOptions.
TaskDetailAcceptance
| Prop | Type | Default |
|---|---|---|
taskrequired | TaskView | – |
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 | – |
headingLevel | number | 3 |
Also takes TaskDisplayOptions.
TaskDetailAttachments
| Prop | Type | Default |
|---|---|---|
taskrequired | TaskView | – |
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 | – |
headingLevel | number | 3 |
Also takes TaskDisplayOptions.
TaskDetailActivity
| Prop | Type | Default |
|---|---|---|
taskrequired | TaskView | – |
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 | – |
headingLevel | number | 3 |
Also takes TaskDisplayOptions.
TaskDetailDetails
| Prop | Type | Default |
|---|---|---|
taskrequired | TaskView | – |
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 | – |
headingLevel | number | – |
hideRows to leave out, like the ones a header already shows. | readonly TaskDetailRow[] | noRows |
Also takes TaskDisplayOptions.
TaskDetailDependencies
| Prop | Type | Default |
|---|---|---|
taskrequired | TaskView | – |
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 | – |
headingLevel | number | 3 |
Also takes TaskDisplayOptions.
TaskDetailAttempts
| Prop | Type | Default |
|---|---|---|
taskrequired | TaskView | – |
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 | – |
headingLevel | number | 3 |
Also takes TaskDisplayOptions.
TaskDetailUsage
| Prop | Type | Default |
|---|---|---|
taskrequired | TaskView | – |
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 | – |
headingLevel | number | 3 |
Also takes TaskDisplayOptions.
TaskDetailLinks
| Prop | Type | Default |
|---|---|---|
taskrequired | TaskView | – |
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 | – |
headingLevel | number | 3 |
Also takes TaskDisplayOptions.
TaskDetailLocation
| Prop | Type | Default |
|---|---|---|
taskrequired | TaskView | – |
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 | – |
headingLevel | number | 3 |
Also takes TaskDisplayOptions.
TaskDetailDialog
| Prop | Type | Default |
|---|---|---|
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 | – |
className | string | – |
Also takes TaskDetailContentProps except task, headingLevel, layout, showStatus.
DetailValue
| Prop | Type | Default |
|---|---|---|
termrequired | string | – |
children | ReactNode | – |
quantityShown instead of `children`; an estimate or a sourced value gets a tooltip saying so. | Quantity | – |
locale | string | – |
formatCurrency | (usd: number) => string | – |
quantityLabels | Partial<QuantityLabels> | – |
inlineTerm and value on one row. | boolean | false |
wrapLets the value wrap instead of truncating. | boolean | false |
Block
| Prop | Type | Default |
|---|---|---|
titlerequired | string | – |
levelrequired | number | – |
className | string | – |
childrenrequired | ReactNode | – |
Other exports
taskDetailMainSectionstaskDetailSideSectionsinsidePopuptype CloseReasontype TaskDetailPanelPropstype TaskDetailContentPropstype TaskDetailMainSectiontype TaskDetailRowtype TaskDetailSectiontype TaskDetailSectionPropstype TaskDetailSideSectiontype TaskDetailDialogPropstype DetailValuePropsAccessibility
- 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.