# Agent → Activity (`/agent/activity`)

Status: CONFIRMED by the operator 2026-09-11, in his own edits. Where the live
screen differs from this file (side panel instead of popup, "Load older" instead
of a page selector, a CRM kind chip), the file is the intent and the screen is
the gap.

## What it is for
One list of everything the AI did or was asked to do, across every channel,
with the rows that need a person on top. The operator comes here to see what the
AI did, why, and to act on what it held. Comments are one kind among many: a DM,
a website chat, an AI flow step, an interpretation and any kind added later must
read the same way. Nothing on the screen may assume a comment (operator,
2026-09-11: today it leans on comments; tomorrow it is any AI activity). A CRM
write is a tool the AI used within an activity; it shows inside that row's
detail, never as a row or a kind of its own.

## What it must show
- One list, newest first, two presets: **Everything** and **Needs action**
  (`?preset=needs`). Needs action = comment or
  moderation escalation (ruling 18). The count sits on the preset control.
- Columns: select box · time · channel chip · kind chip (Comment, Message,
  Private reply, Interpretation, AI Flow step) · Details (who, and the comment,
  message or step) · Outcome word (sent, held, failed, skipped, hidden, deleted…)
  with how long a held row has waited, and "after N tries" when a job retried.
- A search box (`?q=`) that also searches held and failed replies.
- A Filter menu (channel, outcome, kind, source, date range) that closes on Done
  and leaves one removable chip per active filter; Clear all keeps the search.
- Clicking a row opens its popup: who, chips, outcome; the plain-words ask when
  it waits; the customer's text and the bot's reply or draft; the actions the
  registry allows for that kind and outcome; Source (our record and the platform
  link when it exists); Earlier tries for a retried job.
- Load older pagination at the bottom with proper select page like how list in othet parts of the website does it.

## What it must do
- Approve, edit-then-send, or reject a held reply or private opener.
- Hide, unhide or delete a comment; bulk hide/delete on selected rows, each with
  a confirm that names what happens.
- Replay selected rows through the agent and show the results.
- Export selected traces.
- Override an `approve` decision. `moderate` deletes are final at Meta and are
  never overridable.

## Deliberately not here
- No right/wrong marks, no corrections banner, no verdict queue, with one exception: the weekly
  sample of 5 AI deletes, where a person can mark a delete wrong (his moderation design of
  2026-09-27, BOARD 6). The old corrections feature is still ordered removed; until then, it is debt.
- No moderation console or review queue as separate screens 
- No configuration: switches, thresholds and audiences live on Agent → Settings.

## Known gaps against intent (operator, 2026-09-04)
- Too much copy, clutter, and controls that are missing or do not work. Measure
  each control first, then trim copy, then layout.
- The review detail panel and the filter UI are owed a redesign (07-27 orders).

## Proof
`apps/web/src/routes/agent/Activity.test.tsx` and `ActivitySections.test.tsx`
pass; `apps/api/src/feed/agent-feed.service.test.ts` pins the outcome words,
needs-action rule and retry folding. Looked at on prod after each change.
