Activity History
Show who changed what and when on a record, in a timeline people can scan, filter and trust.
6 states5 edge casesDesktop + Mobile
01The problem
When something looks wrong — an amount changed, a status reverted, a file disappeared — the first question is “who did this, and when?”. Without a history, users ask around in chat. With a raw event log, they scroll through hundreds of “updated record” entries that say nothing about what actually changed.
02When to use
Use when
- Records edited by several people: deals, invoices, tickets, documents
- Regulated or financial data needing an audit trail
- Records that change state through a workflow
Avoid when
- Single-user data where nobody else changes anything.
- High-frequency system updates (sensor readings, sync heartbeats) — summarise them instead.
03Recommended UX
Statecraft recommendation
Show a chronological timeline on each record where every entry names the person, the action and the specific change — “Dana changed amount from $4,800 to $9,200” — with consecutive minor edits by the same person collapsed into one entry.
“Dana updated this invoice” forces users to compare versions themselves. The before → after value is the information they came for.
Collapsing a burst of edits by one person keeps the timeline readable without hiding anything.
Placing history on the record, not in a separate admin log, means it's actually used when questions arise.
04Interaction flow
- 01
Change happens
User, API or automation edits the record.
- 02
Event recorded
Actor, timestamp, field, before and after.
- 03
Timeline renders
Grouped by day; consecutive edits collapsed.
- 04
Filter
Comments only, changes only, or by person.
Result
- Answer found
- Change reverted
05Desktop behaviour
On desktop, the timeline sits beside or below the record and mixes changes with comments, so the discussion and the edits read as one story.
Desktop rules
- Each entry: avatar, name, action sentence, relative time (absolute time on hover).
- Field changes show old → new values; long text shows a diff on expand.
- Filters: All, Comments, Changes.
- Automation and API changes show their source (“via Salesforce sync”).
06Mobile behaviour
On mobile, the timeline is a tab or section of the record, with compact entries and changes expandable on tap.
Mobile rules
- Compact rows: name, action, time; tap to expand values.
- Keep the comment composer separate from the history so it doesn't scroll away.
- Load older entries on scroll, newest first.
07States
Timeline
Entries grouped by day, newest first.
Collapsed edits
“Dana made 6 changes” — expands to the list.
Filtered
Comments or changes only; count shown.
Loading older
Older entries loaded on scroll.
Empty
“Created by Alex on 2 Oct. No changes since.”
Restricted entries
Changes to fields the viewer can't see are summarised without values.
08Edge cases
EC-01
Sensitive field changes
A salary field changes, and some viewers can't see salaries.
Recommendation
Show “Alex changed a restricted field” without values for those viewers.
EC-02
Deleted users
A change was made by someone who has since left.
Recommendation
Keep their name with a “(deactivated)” label. Never rewrite history to “Unknown user”.
EC-03
Bulk changes
An admin updates 500 records at once.
Recommendation
Record per-record entries, but tag them with the batch so the timeline reads “as part of a bulk update of 500 invoices”.
EC-04
Automations
A workflow rule changes status automatically.
Recommendation
Name the rule as the actor (“Rule: Overdue after 30 days”) with a link to it, rather than attributing it to the rule's creator.
EC-05
Time zones
A team spans London and San Francisco.
Recommendation
Show relative time, with the absolute time in the viewer's time zone on hover.
09Microcopy
Change
Avoid
“Dana updated this record”
Prefer
“Dana changed amount from $4,800 to $9,200”
Collapsed
Prefer
“Dana made 6 changes · Show”
Automation
Prefer
“Status set to Overdue by rule “30 days past due””
Empty
Avoid
“No activity”
Prefer
“Created by Alex on 2 Oct. No changes since.”
10Accessibility
- The timeline is an ordered list; each entry is a complete sentence for screen readers.
- Use <time> elements with machine-readable datetimes.
- Expandable groups use buttons with aria-expanded.
11Developer notes
- 01
Write history as an append-only event log at the domain layer (actor, source, field, before, after, batch id), not inferred from row snapshots.
- 02
Apply field-level permissions when reading history, not when writing it.
- 03
Collapse consecutive edits at read time so the raw log stays complete.
- 04
Index by record and time for fast pagination.
12Implementation prompt
For Claude Code, Codex or Cursor
Implement an activity history timeline on records.
Requirements:
- Append-only event log: actor (user, API, automation), source, field, before, after, batch id, timestamp.
- Timeline on the record: grouped by day, newest first, mixing comments and changes.
- Entries as sentences with before → after values; long text diff on expand.
- Collapse consecutive edits by the same actor within a short window.
- Filters: All / Comments / Changes.
- Automation and integration sources named as actors.
- Field-level permission filtering at read time ("changed a restricted field").
- Deactivated users keep their names with a label.
- Relative time with absolute local time on hover; <time> elements.
- Pagination of older entries.
- Mobile: compact rows, tap to expand values.
Do not redesign the existing interface.