Action receipt

Tells you what the assistant just did, one line per action, with Undo.

Examples

After a split

Assistant:

Done. Here is what changed.

  • Done: Split dinner with Maya
  • Done: Matched the receipt
  • Done: Moved $50 to savings

One action failed

Assistant:

Rent is paid. The phone bill is not.

  • Done: Paid rent$450
  • Failed: Phone bill failedCard expired

State

  • Assistant:
    • Done: Split dinner with Maya
    • Done: Moved $50 to savings

    completedefault

  • Assistant:
    • Done: Paid rent$450
    • Failed: Phone bill failedCard expired

    partial

  • Assistant:
    • Undone: Split dinner with Maya
    • Undone: Moved $50 to savings
    Undone

    undone

States

  • Assistant:
    • Done: Split dinner with Maya
    • Done: Moved $50 to savings

    complete

  • Assistant:
    • Done: Paid rent$450
    • Failed: Phone bill failedCard expired

    partial

  • Assistant:
    • Undone: Split dinner with Maya
    • Undone: Moved $50 to savings
    Undone

    undone

Usage

When to use it
Use
The assistant finished work that changed money, bills or goals.
Use
Several actions that should read as one record.
Not for
A step while the assistant is still working. Use Tool call.
Not for
Asking before the money moves. Use Approval request.
Not for
A plain answer with nothing changed. Use Message.

Rules

6 rules
Must
Write each line in the past tense with its amount. Because a screen reader reads each line after "Done:", so "Done: Moving money" claims nothing finished.
Must
Pass onUndo for anything that moved money; set undone once it is reversed. Because without onUndo there is no Undo to press, and without undone the lines stay green after it.
Must
Mark a line failed and put the reason in detail; keep the lines that worked. Because dropping the lines that worked hides money that did move, and only detail says why one failed.
Should
Write one line per action, at most five; group small ones.
Should
Keep summary to one sentence or leave it out.
Never
Wrap the receipt in a Card or a grey panel. Because it renders as an assistant Message, and a box around it splits it from the conversation.

Accessibility

3 checks
Each line has a hidden word (Done, Failed, Undone) before its label.
Undo and Undone sit in a polite live region, so the change is announced.
A failed line is told by the warning shape and the word, not color alone.

Edge cases

3 edge cases
Long line
Truncates; the detail truncates first.
Every line failed
Send a plain message with the reason instead.
Undo no longer possible
Leave onUndo out and say why in the summary.

API

6 props
lines
{label, detail?, failed?}[] default required
summary
string
undone
boolean default false
onUndo
() => void
name
string default 'Assistant'
labels
{undo?, undone?, done?, failed?} default English words

Tokens

7 tokens
--text-sm
14px
--text-base
16px
--fg
#0f0f0d
--fg-3
#6b6a63
--success-text
#17703a
--danger-text
#b42323
--control-sm
32px

Install

For your coding agent

GitHub

Please star me pookie

141

A new design system every week

Leave your email before you copy the prompt.