Proposal Actions
Approve and Reject for one task proposal: async pending with no double submit, inline errors, an on-screen reject confirmation, and agent access set by agentApproval (confirm, allow or deny). Renders nothing in snapshot mode.
Example
T-011 · Split the billing service. Approve fails once on purpose.
proposal-actions-demo.tsxCopy code
Installation
Copy code
Usage
ImportCopy code
API reference
ProposalActions
| Prop | Type | Default |
|---|---|---|
taskIdrequired | string | – |
moderequired | BoardMode | – |
onApproveA returned Promise keeps the button pending; a rejection shows its message. | (id: string) => void | Promise<void> | – |
onRejectRuns after the on-screen confirmation, with the same pending and error handling. | (id: string) => void | Promise<void> | – |
agentApproval | AgentApproval | "confirm" |
labels | Partial<ProposalLabels> | – |
renderError | (error: unknown) => string | messageOf |
className | string | – |
Other exports
type ProposalActionsPropsAccessibility
- Async approve and reject with pending state and no double press; errors show inline.
Agent actions
Both actions carry data-agent-confirm: an agent can ask, a person decides.
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.