# AuditTimeline: a record's history and comments

AuditTimeline is the history at the end of every record and side panel in an app built on Meadowstack: each change is an entry with a label, the person and the time. Decisions carry their status glyph, routine changes a dot, and anything someone wrote shows as a filled bubble.

Checked 2 December 2026. By Bohuslav Poláček. https://meadowstack.com/components/audit-timeline/

*Left, a change order's history at Stonebridge, rejected with its reason; right, the first changes of a task at Brightpath. Both are the demo's records, with times against Wednesday 2 December 2026.*

A live screen, rendered from the kit's components on the page: https://meadowstack.com/components/audit-timeline/

## What it is for

Every record in an app built on Meadowstack ends with its history, and every change of state writes an entry there. A side panel follows one order: what the record is, the next step, its properties, its actions, then this timeline. Comments live in the same list, so a question sits beside the change it is about.

The preview shows the two kinds of history the demo has. The change order "Relocation of the 11 kV cable" from the [Stonebridge example](https://meadowstack.com/examples/construction-site-management/) went through decisions, so its entries carry status glyphs, and the supervisor's note and the reason for the rejection are bubbles. The [Brightpath](https://meadowstack.com/examples/agency-capacity-planning/) task shows routine changes: created, an assignee set, its status moved, each a label with a dot or a glyph.

It is not for a team conversation, which is `ChatMessage`'s job (the manifest's `not`). How the history fits a whole record is the [audit trail pattern](https://meadowstack.com/patterns/audit-trail/) and the [record side panel](https://meadowstack.com/patterns/record-side-panel/).

## The rules and where they live

- **Every state change writes an audit entry, shown with AuditTimeline.** The root `AGENTS.md`, Permissions and audit.
- **Entries are labels without a grammatical subject**: "Approved" and the person beside it, never "John approved". `AGENTS.md` (Lightness) and `docs/patterns.md`; `docs/principles.md` gives the reason: in languages whose verbs carry gender, "approved by him or her" is never right.
- **Written text is a filled bubble.** `AGENTS.md`, under writing next to a record, and the manifest's summary.
- **Routine events get a dot, decisions their status glyph.** The comment over the starter's `eventMeta` (`templates/starter/src/modules/requests/domain/status.tsx`); the demo's modules keep the same split in their own maps, such as `historyMeta` in the budget module.
- **A rejection stores its reason as the entry's detail**, with the person and the time (the skill `kit-approval`), which is why the reason in the preview is a bubble under "Rejected".
- **The history comes last in a side panel**: `docs/principles.md`, Side panels (Linear's peek).
- **Checked.** `kit-approval` asks for a test that the history shows the label with the approver's name beside it, and the labels never need a verb that agrees with a person.

## What AI coding tools write instead

The manifest names two things: **a hand-built activity list** and **comments rendered by hand**. Asked for an audit log, a tool writes sentences such as "Anna approved the order on 3 Oct" into a list, computes "2 days ago" from the clock in the render, and puts comments in a second list under a separate heading. The sentences break as soon as the app speaks a language with gendered verbs, the relative times drift between the server and the browser, and a reader has to match comments to changes by their dates.

The other common gap is where the entries come from. A page that writes history only when its own button is clicked misses every change made elsewhere: in bulk, by the assistant, through the api. In Meadowstack the api writes the entry on every transition, the component only shows it, and `now` comes in as a prop, so a screen and a test render the same times.

## How to use it

`AuditTimeline` takes `events`, an optional `now` and a `className`. Each `AuditEvent` has:

| Field | What it holds |
| --- | --- |
| `id`, `title` | The entry and its label without a subject: "Rejected", "Status: In progress". |
| `actor`, `actorKind` | The person, or `"system"` for an import or a scheduled check; `actorIcon` and `actorHue` adjust its mark. |
| `at` | ISO time, shown relative to `now`. |
| `detail` | Written text, drawn as a filled bubble: a comment, a reason, a note. |
| `icon`, `tone` | A 16px status glyph in place of the dot, and its tone. |
| `subject` | What the entry is about, when one history covers several things. |

Keep the labels in one map per module (`historyMeta`, `eventMeta`), so the list, the side panel and the full page always agree, and put the comment box, a [Composer](https://meadowstack.com/components/composer/) in a `Field`, right under the timeline.

## Its entry in the manifest

*The component's rules as the kit's manifest states them, the same entry an AI coding tool reads.*

| Manifest field | AuditTimeline |
| --- | --- |
| What it is | A record's history and comments; written text is a filled bubble. |
| Use it for | At the end of every record and side panel; every state change writes an entry. |
| Not for | For a team conversation (ChatMessage) |
| It replaces | A hand-built activity list; Comments rendered by hand |
| Screen types | Record; Index; Worklist; Workspace |
| Import | `import { AuditTimeline } from "@meadowstack-studio/kit";` |

Read from the kit's component manifest when the site was built (126 components, packages/kit/src/components.json); the same entry answers an AI coding tool through the kit's MCP server.

## Where the example apps use it

*The example apps and modules that render AuditTimeline, read from the demo's code when the site builds.*

| Example app | Modules that render it |
| --- | --- |
| [An app for a packaging and print company](https://meadowstack.com/examples/packaging-print-production/) | Jobs, Print file editor, Quotes, Cutting dies, Colour |
| [An app for a studio or agency](https://meadowstack.com/examples/agency-capacity-planning/) | Capacity, Tasks, Finance |
| [An app for a haulage company](https://meadowstack.com/examples/haulage-dispatch-planning/) | Freight, Drivers, Costs |
| [An app for a roastery with an online shop](https://meadowstack.com/examples/coffee-roastery-production/) | Roasting, Green coffee, Shop, Wholesale, Scenarios |
| [An app for a sports club](https://meadowstack.com/examples/sports-club-court-bookings/) | Front desk, Courts, Club, Coaching, Rentals |
| [An app for a construction company](https://meadowstack.com/examples/construction-site-management/) | Sites, Schedule, Crews, Machines, Site diary, Drawings, Foreman's phone, Budget |
| [An app for an accounting office](https://meadowstack.com/examples/accounting-office-documents/) | Documents, Bookkeeping, Official mail, Invoicing |
| [An app for restaurants and venues](https://meadowstack.com/examples/restaurant-staff-rota/) | Shifts, Kitchen, Food safety, People, Handbook |
| [An app for one person](https://meadowstack.com/examples/personal-app-for-a-creator/) | Brand deals, Content, Money, Training |

Read from the demo's source when the site was built: 9 of 9 example apps render <AuditTimeline>, in the modules named here as each app's sidebar names them.

## How the demo turns events into entries

*Brightpath's task events as entries: a label without a subject, the person beside it, a status glyph for a change of status, and a comment's text as the detail, which the timeline draws as a bubble.*

From `apps/demo/src/modules/tasks/components/issue-panel.tsx` in the Meadowstack repository:

```tsx
function eventToAudit(event: IssueEvent, name: (id: string) => string): AuditEvent {
  const base = { id: event.id, at: event.at, actor: name(event.actorId) };
  switch (event.type) {
    case "created":
      return { ...base, title: tx("Založeno", "Created") };
    case "status": {
      const status = Object.values(statusMeta).find((meta) => meta.label === event.detail);
      return { ...base, title: `${tx("Stav", "Status")}: ${event.detail}`, icon: status?.icon };
    }
    case "priority":
      return { ...base, title: `${tx("Priorita", "Priority")}: ${event.detail}` };
    case "assignee":
      return { ...base, title: `${tx("Řešitel", "Assignee")}: ${event.detail}` };
    case "label":
      return { ...base, title: tx("Štítky upraveny", "Labels changed") };
    case "comment":
      return { ...base, title: tx("Komentář", "Comment"), detail: event.detail };
```

## Questions

### Why are history entries labels without a subject?

Because a sentence such as approved by him or her is never right in a language whose verbs carry gender. A label such as Approved, with the person beside it, reads the same in every language and for everyone.

### Where do comments go?

Into the same timeline, as Comment entries whose text is a filled bubble, so a question sits beside the change it is about. The box to write one is a Composer in a Field right under the history.

### Who writes the entries?

The api, on every change of state, with the person and the time; a rejection stores its reason as the entry's detail. The component only shows them, so a screen that forgets cannot leave a gap in the history.

### Can the system be the actor of an entry?

Yes. An entry can name a person or the system, for an import or a scheduled check, and the system gets its own mark instead of a person's avatar.

## Related

- [A time-off request waiting for a decision](https://meadowstack.com/screens/time-off-approval/) (Screens)
- [An order record with its decision](https://meadowstack.com/screens/order-record/) (Screens)
- [The approval flow](https://meadowstack.com/patterns/approval-flow/) (Patterns)
- [The audit trail](https://meadowstack.com/patterns/audit-trail/) (Patterns)
- [A document inbox that catches a changed bank account](https://meadowstack.com/screens/document-inbox/) (Screens)
- [A driver record that says what expires next](https://meadowstack.com/screens/driver-record/) (Screens)
