Activity feed
What people and agents did across the workspace, newest first and grouped by day.
What a block is
A block is a kit component for a whole area of a screen, built only from other kit components and tokens. You import it like any component; nothing is copied into your app. Put it inside your page’s <main>: it brings no header or nav of its own.
When to use
- a workspace or project activity page
- catch up on what people and agents did since yesterday
- jump from an event to the thing it happened to, or reply to a comment
- one record's history, like an invoice created, sent, viewed and paid — variant="history"
- an agent activity log where recent steps can be undone and the rest are final — variant="agent" under a page FilterBar
When not to use
- the steps of one agent run — AgentTrail or RunDetail
- planned work in stages — Timeline
- a queue of things waiting on you — AgentInbox
- one record's discussion — CommentThread
- toasts for what just happened — NotificationStack
Usage
Filter by type or person, open the thing an event happened to, reply to a comment, and load older activity as you go. variant="history" shows one record's events, like an invoice, on a rail with a time column and status chips.
Layout
- head: h2 and count line, with the filter group (Type, Person, Clear filters) at the end; it wraps under the title when narrow
- one section per day, labelled by its h3 (Today, Yesterday, Mon 9 Nov), over a card-surface ordered list of events
- an event row is Avatar, the copy (verb line, optional detail, time with Badges) and its actions at the end
- the block is its own inline-size container; below --grid-breakpoint-sm (40rem) of block width the actions move under the copy
- history: the block is one card (surface-card, border-faint, radius-surface-md). Each event is a time column (space-12, mono), the rail and the copy with the status word at the end; the rail line runs only to the next event of the same day. Below --grid-breakpoint-sm the time column goes and time and status join a meta line under the copy, and Load more fills the width
- agent: no frame of its own (put it in a kit Card); the h2 and count line are screen-reader only. Days are split by a divider, each labelled by its h3 caption. A step is a time column (space-10, mono), the rail (Avatar sm, 1px line in --border-strong to the next step of the same day), the copy (sentence 14/20, meta and reason 12/16) and the end column (Undo over its deadline, or the Badge). Below --grid-breakpoint-sm the time column goes and the time leads the meta line, the end column moves under the copy (Undo beside its deadline), and an undone or final step with a note drops the line under the meta and shows the note beside its Badge. Load more reads Load earlier days and fills the width
Props
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| events | array | Yes | — | { id, type: "comment" | "change" | "run" | "member" | "billing", actor: { id, name, kind?: "person" | "agent", src?, initials? }, verb, object, at: epoch ms | ISO string, detail?, status?: { label, tone? }, canReply? }[]. Any order; shown newest first in day groups. verb is lower case ("commented on") so the line reads actor + verb + object. variant="agent" takes { id, at: epoch ms | ISO string, actor: { id, name, initials?, kind?: "agent" | "person" | "system" }, sentence: string | inline nodes, meta: string (agent · app · task · who allowed it), reason?: string, undo?: { until: epoch ms | ISO string, onUndo }, state?: "undone" | "final", note?: string }[] instead. actor.kind sets the rail Avatar: agent an info circle, person a neutral circle, system a neutral square; left out, the tint comes from the name. The marker is hidden from screen readers, so meta says who it was in words. A row may instead be a marker { id, kind: "marker", at, label, tone?: "neutral" | "info" | "success" | "warning" | "danger" }: a point in time that splits the steps, like a phase (Detected, Mitigated, Resolved). It sorts with the steps by time and is not counted as a step. |
| filters | object | No | — | Controlled { types: type[], people: actorId[] }. Empty arrays mean no filter on that axis. Filtering is over the loaded events; an app that filters on the server keeps filters controlled and replaces events. |
| defaultFilters | object | No | { types: [], people: [] } | Uncontrolled starting filters. |
| onFiltersChange | function | No | — | (filters) => void |
| onOpen | function | No | — | (eventId) => void. Each event gets an Open button (named Open + the object) when set. variant="agent": each step (not a marker) gets an sm ghost Open at the row end, after Undo or the Badge, named Open + the sentence. |
| onReply | function | No | — | (eventId) => void. Comment events get Reply (named Reply to + the actor) when set; canReply: false hides it on one event. |
| onLoadMore | function | No | — | () => void. Fetch the next page and append it to events. |
| hasMore | boolean | No | false | Load more shows when this is true and onLoadMore is set. |
| loading | boolean | No | false | Skeleton rows: the whole feed with no events yet, else under the list. Load more reads Loading… and ignores clicks, keeping focus. |
| now | number | No | — | Epoch ms for Today / Yesterday. Default the time of first render. |
| locale | string | No | en-GB | — |
| timeZone | string | No | — | IANA zone for day groups and times. Pass it when the server and the viewer may differ. |
| title | string | No | Activity | — |
| description | string | No | — | Line under the title. Default: how many events show, and how many match the filters. |
| variant | feed | history | agent | No | feed | feed: Avatars, Type and Person filters, Open and Reply. history: one record's events on the rail Timeline and AgentTrail share (16px rail, 12px dot, 1px line), a time column when wide and the status word at the row end; no Avatars, filters or actions. agent: an agent's steps on that rail with an Avatar sm marker in place of the dot, a time column (space-10, mono) when wide, the sentence (struck when undone), a meta line and a reason; at the row end an sm outline Undo (Undo2) with a mono deadline ("14:22 · 8 min left", only until undo.until), or a soft Badge Undone (Undo2) or Final (Lock). No frame, no visible heading and no built-in filters: put it in a Card under the page's PageHeader and FilterBar. Marker rows show the time, a 12px dot in the marker's tone on the rail, a soft Badge with a Flag icon and the label, and a border-strong rule to the row end. onOpen adds an sm ghost Open to each step. filters, defaultFilters, onFiltersChange, onReply and the status chip props don't apply. With no now prop it re-renders once a minute (or at the nearest deadline) while an Undo shows, so the deadline counts down and Undo goes at until; the timer stops when no Undo is left. |
| statusChips | array | No | — | string[] of status words, like ["Created", "Sent", "Paid"]. Shows All plus one chip each as a kit SegmentedControl (sm); a chip matches event.status.label. |
| statusChip | string | No | — | Controlled chip: a status word, or null for All. Leave it out for uncontrolled (starts on All). |
| onStatusChipChange | function | No | — | (chip: string | null) => void |
| error | string | No | — | The events could not load: the reason, shown under "Couldn't load activity". With no events it replaces the feed; with events it replaces Load more. |
| onRetry | function | No | — | () => void. Shows an outline Retry button in the error state. |
Built from
Related
- Component
AgentTrail
A vertical step list for a running agent task: done steps with durations, the current step with a live timer, then pending steps.
- Block
Run detail
One agent run on one screen: clock, cost, pending approval and every step, all following the step you pick.
- Component
Timeline
Vertical sequence of now, next, and later for ordered multi-stage work.
- Component
AgentInbox
A queue of what agents need from you: approvals, questions, failed runs and finished recaps.