# AgentActivity

Supply UI 1.1.0. AI assistants.

A list of what was changed and by whom (the person, the assistant, the app), newest first, with a button that puts back everything the assistant changed and keeps what the person changed after it

A list of what was changed on the page and by whom, newest first, with a button that puts back everything the assistant changed. Put it where the person can see what an assistant did for them.

## Options

| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `className` | `string` |  | More classes on the outer element, for layout around it (margins, grid placement), not to restyle it. |
| `empty` | `ReactNode` |  | Shown while nothing has changed. |
| `limit` | `number` | `6` | How many of the latest changes to list. |
| `undoLabel` | `ReactNode` |  | The words on the button that puts back what the assistant changed: "Undo what the assistant did" by default. |

## CSS parts

With the CSS in parts (`/ui/css/`), it needs: `components/button.css`, `components/card.css`, `components/tabs.css`, `components/dialog.css`, `components/button-group-toggle.css`, `components/tab-bar.css`, `components/prose.css`, `components/carousel-arrows.css`, `components/page-transitions.css`, `parts/carousel.css`, `parts/changed-by-whom.css`, `parts/board.css`, besides the ones every page loads.

## AI assistants: notes

The parts that let an assistant see and use the screen the way a person does: the bridge (`AgentBridge`, `getAgent()`), the record of changes with undo, and suggestions.

**Do**
- Mark everything that deletes, pays or sends with `data-agent-confirm`, so an assistant asks first.
- Check the assistant's list once (`getAgent().snapshot()`): every control has a name a person would recognise.

**Don't**
- Don't let an assistant act on anything a person could not do with the same screen.
