← All proposals

Event Log

Net-new, in two parts.

Net-new componentOpen in Storybook

proposals/EventLog/HANDOFF.md228 lines · View on GitHub

Handoff: Event Log (with EventLogItem)

Rewritten 2026-11-20 against v2.0.0-beta.21 to the lessons template (docs/LESSONS.md, L1 to L11). Every prop, class and token below was checked against EventLog.tsx, EventLogItem.tsx, event-log.css, event-log-item.css and the stories. Nothing was checked by eye in a session, and the a11y panel was not run (see Accessibility).

What and why

A product often needs a log of events over time: deploys, checks, approvals, an agent joining and working. PDS has nothing for it, so teams draw the rail, the times and the status icons by hand. This proposal is two components: EventLogItem, one event or piece of work (an optional status icon, a label, quiet secondary text, a time, optional expandable detail and a slot for content under it), and Event Log, the list that owns list semantics, spacing and an optional rail joining the icons. EventLogItem is the former AgentStep, renamed and generalized (2026-10-16): an agent run is one region of a larger log, so the row is generic and the agent flavor is a boolean, isAgentic.

Dividers, a Chain of Thought or a Thinking State can sit between items. The full "agent joins an event log" composition is a recipe, Recipes/Event log with agent (proposals/EventLogWithAgent/), not a component.

  • Figma / Jira: Figma page below under Preview; Jira none. Sources were designer screenshots (2026-10-12 and 2026-10-16): a deploy log with a "Zappy engaged" divider, an agent sandbox investigation, and a plain neutral log.
  • Context: context.md

Exploration and decisions

  • Rename AgentStep to EventLogItem rather than keep a wrapper or build a second row. One row, with isAgentic. Chain of Thought renders an EventLog for its body.
  • Event Log is a thin list. It earns its place because the rail must run through the gap between items, and something has to own the ol/li semantics. Each child becomes a list item.
  • Rail is optional (hasRail, default false). It joins only neighbouring EventLogItems, so a divider, a Chain of Thought or a Thinking State between items breaks it. It is drawn by each entry's ::after, in em and lh, so it follows the item's text size.
  • The full event log is a recipe, not a component. Where the agent starts and stops, the divider wording and which entries are agentic are screen decisions.
  • isAgentic changes the status icon color to the discovery foreground; errors stay critical. time sits at the end of the row; an expandable item with a time spans the full row and the chevron comes after the time.
  • Names: EventLog / EventLogItem over ActivityLog and Step (Step implies a sequence).
  • Carried over from AgentStep (see decisions.md): optional status, configurable iconName, tool calls are items with detail, a children slot under the row, Tag for file identifiers, detail text inherits the item's size.
  • decisions.md entries written before 2026-11-04 use the old names (Timeline, TimelineItem); read them as Event Log and Event Log Item. A dated note at the end of decisions.md records the 2026-11-20 review.

API

Event Log

Prop Type Default Purpose
children ReactNode none What goes in the list. Each child becomes a list item.
className string none Additional class names.
hasRail boolean false Draw a vertical rail joining neighbouring EventLogItems. Decorative.
size 'xs' | 's' 'xs' Text size of the items, applied as a pds-copy-* class on the list. Items inherit it.

Extends ComponentPropsWithoutRef<'ol'>. Exported type: EventLogSize.

EventLogItem

Prop Type Default Purpose
children ReactNode none Content under the item, always visible, lined up with the label when the item has an icon.
className string none Additional class names.
detail ReactNode none Expandable content. An item with detail becomes a native details/summary toggle.
isAgentic boolean false The agent's own item: the status icon takes the agent color (errors stay critical).
isQuiet boolean false Quiet (secondary) text color for secondary rows.
iconName IconProps['iconName'] none Replaces the status icon. The active spinner still shows; status color and hidden text still follow status.
label ReactNode required What happened or is happening.
labelStrings Record<EventLogItemStatus, string> In progress, Done, Failed, Pending Translatable screen-reader text for each status (keys active, done, error, pending).
secondaryText ReactNode none Quiet supporting text after the label (always pds-copy-xs).
size 'xs' | 's' none (inherits) Text size, applied as a pds-copy-* class on the item. Unset inherits, for example from an EventLog's size.
status 'active' | 'done' | 'error' | 'pending' none Where the item is at. Without it (and without iconName) there is no icon.
time string none When it happened, formatted by the consumer. Shown at the end of the row (always pds-copy-xs).
timeDateTime string none Machine-readable value for the time element.

Extends ComponentPropsWithoutRef<'div'>. Exported types: EventLogItemSize, EventLogItemStatus.

Note: in EventLogItem.tsx the interface and destructuring put iconName after isQuiet; alphabetical order puts it before isAgentic. Fix it in the port (the table above follows the file as it is, except for this note). The old handoff table claimed alphabetical order and was wrong on this one prop.

Default icons by status (from the code): active is a Spinner (size='s', colored by --event-log-item-status-color), done is check, error is diamondExclamation, pending is circle.

Variants and states: with and without rail; the four statuses; isAgentic on and off; with and without time, secondary text, detail and content; items with a custom icon; isQuiet; sizes xs and s.

Story-only (L9, the engineer drops or rewrites these): the Progression story in EventLog.stories.tsx (a Play and Restart demo with ProgressionDemo, useEffect timers, a Button and SlotPlaceholder from proposals/_story-helpers/); SlotPlaceholder in the Slot and Default stories of EventLogItem.stories.tsx; the sample text in every story. None of it is component API.

Tokens used

From the CSS as it is now (event-log.css, event-log-item.css):

  • --pds-animation-transition-rotation
  • --pds-border-radius-default
  • --pds-border-width-default
  • --pds-border-width-outline
  • --pds-color-border-separator
  • --pds-color-foreground-default
  • --pds-color-foreground-default-secondary
  • --pds-color-interactive-focus
  • --pds-color-status-critical-foreground
  • --pds-color-status-discovery-foreground
  • --pds-color-status-success-foreground
  • --pds-spacing-2xs
  • --pds-spacing-5xs
  • --pds-spacing-l
  • --pds-spacing-s
  • --pds-spacing-xs
  • --pds-typography-ff-code

Removed from the old list because the CSS no longer uses them: --pds-typography-ff-default, --pds-typography-lh-m, --pds-typography-size-xs (text size now comes from the pds-copy-* classes).

No raw values. Custom variables (see custom.md): --event-log-gap, --event-log-item-status-color, --event-log-rail-color. Text size classes used: pds-copy-xs, pds-copy-s.

Impact

From impact.md: nothing reaches existing PDS components; everything is scoped to pds-event-log and pds-event-log-item. Proposals that build on this one: Chain of Thought (it renders EventLog and its rows are EventLogItem) and Agent Inbox (it uses the classes). Event log with agent and Chat with an agent compose it (docs/PORT-ORDER.md). The old handoff named only Chain of Thought. The rename's classes (pds-agent-step to pds-event-log-item, --agent-step-* to --event-log-item-*) reached Chain of Thought, which was updated. Port Event Log and EventLogItem before those.

Reused vs net-new

  • Reused: Icon (local wrapper in proposals/Icon/, which adds only icons this proposal does not use; every icon name used here is already in the package, see Target-version check), Spinner (local proposal, for the active status); in stories, the package's Button, CodeBlock, Tag, FlexContainer.
  • Net-new: EventLog and EventLogItem (classes pds-event-log* and pds-event-log-item*, three custom variables, no raw values). See custom.md.

Accessibility

What the code does (read from the files; not tested with a screen reader):

  • EventLog is an ol; each child is an li, so a screen reader announces the number of entries. A divider child keeps its own separator role.
  • The rail is a CSS pseudo-element, decorative, not announced.
  • An item's status is visually-hidden text (labelStrings, translatable) next to the icon. For active, the Spinner carries labelStrings.active as its label instead. The status icon itself: whether the local Icon wrapper hides it from assistive tech is not verified.
  • time renders a time element; pass timeDateTime for a machine-readable value.
  • An item with detail is a native details/summary: Enter and Space toggle it, and the summary row takes a visible focus ring (--pds-color-interactive-focus, --pds-border-width-outline). With a time, the whole row is the click target. The chevron (angleDown, flips 180 degrees when open) is the same disclosure icon as the Chain of Thought summary and the PDS Panel Row.
  • Not announced twice: the status text is announced once with the label. Pass label text that does not repeat the status ("Deployed", not "Done: deployed").
  • Translatable strings: labelStrings and the text the consumer passes (label, secondaryText, time). Nothing is hardcoded in the component except the English defaults of labelStrings.
  • Keyboard: only detail items are focusable. Items with only children have no tab stop.
  • a11y panel: not checked in a session. An earlier pass found no violations on the Event log with agent story in light; it has not been run on the other stories, nor in dark. Run it in both before the port.
  • Contrast of the status colors (secondary foreground, discovery, critical, success) in light and dark: not checked.

Decisions and open questions

Each carries a recommended answer (the designer decides).

  • Tone. Items take isAgentic one by one. Should an EventLogGroup tint a region between two dividers? Recommendation: no, not for this release; add it only if the same region keeps being rebuilt.
  • Live tail. ThinkingState is a plain child today. Should EventLogItem get an active look instead? Recommendation: keep ThinkingState as the live last entry (it already owns shimmer and timer); status='active' on an item is for a step that has its own row.
  • Time column on narrow widths. The time is flex-shrink: 0; a long label wraps. Recommendation: keep; confirm at narrow widths (not checked).
  • Collapsing old entries ("Show N earlier events") is not built. Recommendation: leave out; screens own it.
  • Nesting depth. One level (a Chain of Thought inside the log) is tested; deeper is not. Recommendation: document one level.
  • Custom icon on a done item replaces the check, so completion shows only by color and hidden text. Recommendation: keep as is; use status='done' without iconName when completion matters.
  • Content when an item finishes. The consumer decides whether to collapse it. Recommendation: keep it the consumer's call.
  • Divider styling. Closed: the dividers use the gradient tone='agentic' (purple removed 2026-10-21, see ../LabeledDivider/).
  • Not built: a larger, bolder item style, and a Chain of Thought header with a metadata line.
  • Which one to use (2026-10-22): the Usage pages open with a TL;DR guide (Chain of Thought, Event Log or Timeline). Timeline now ships in the package (src/components/lists/Timeline/, steps with a heading and a paragraph each); keep the guide, and have the engineer check its wording against the shipped Timeline page.

The convention-breaking choices are under "Expect to change".

Extension or new component

New components, not an extension. Checked against the package at beta.21:

  • Timeline and TimelineItem (shipped, src/components/lists/Timeline/): an ol of cards, each with a title, subtitle and paragraph, one line running down the list. An Event Log row is one line with a status icon, a time and optional detail, with no heading or card, so extending TimelineItem would add a second layout to it. The Usage pages say not to mix the two in one list.
  • StepList (lists/StepList, numbered steps array) and VerticalStepper (steppers/, an interactive wizard): neither has status icons, time or a rail.
  • StatusIndicator (status/) is one dot, not a log row.

Reuse still holds inside: Event Log items are plain div rows, the list is an ol, and the Chain of Thought body is an EventLog. The agent flavor (isAgentic) is an addition to EventLogItem behind a flag, with the neutral version and its stories untouched (L1).

Footprint

From the CSS (not measured, not checked by eye):

  • The rail draws outside the entry box. It is an ::after on each joined entry (.pds-event-log__entry--joined), positioned from top: calc(1lh / 2 + 0.5em + 5xs) to bottom: calc((1em - 1lh) / 2 + 5xs). When the line height is larger than 1em, the bottom offset is negative-leaning, so the line reaches into the next entry to meet the next icon. A parent that clips (overflow: hidden) at the list edge cuts nothing at the sides (it sits at inset-inline-start: calc(0.5em - 1px/2), inside the list), but the rail's position depends on the entry's padding and the text metrics.
  • The rail assumes an icon. It sits at 0.5em from the start, the center of a 1em icon. A joined item with no status and no iconName has no icon there, so the line would run under its label. Not checked; the stories give every joined item an icon.
  • It assumes the icon is 1em and centered on the first line. A different icon size, a label that wraps with a taller first line, or size set differently on an item than on the list moves the line off the icon.
  • Gap is padding, not a flex gap. Each entry carries padding-block-end: var(--event-log-gap) (default --pds-spacing-s) so the rail can cross it. Overriding --event-log-gap changes both the spacing and the rail length. The last entry has none.
  • Joined detection is by element type. EventLog marks an entry joined when the child and the next one are EventLogItem elements (node.type === EventLogItem). A wrapped, memoised or re-exported item is not detected, and loses its rail silently.
  • EventLogItem is a div (block), full width of its parent. The expandable summary is inline-flex (only as wide as its content) unless the item has a time, when it is flex and spans the row.
  • The Chain of Thought and Thinking State children have no --joined class, so the rail stops at them by design.

Dark mode and per-size values

All colors come from semantic tokens, with no per-theme override in either CSS file. Whether each token is tuned for dark is the package's; this proposal did not check or adjust it, and dark mode was not looked at in a session.

Part size='xs' (default) size='s' Light and dark
Label text size pds-copy-xs pds-copy-s no per-theme override
Status icon and chevron box 1em (follows the text size) 1em (follows the text size) no per-theme override
Active spinner Spinner size='s' (fixed, not tied to size) same arc color from --event-log-item-status-color
Secondary text and time pds-copy-xs pds-copy-xs (does not grow) --pds-color-foreground-default-secondary
Gap between entries --pds-spacing-s same single size
Row gap (icon, label, text) --pds-spacing-xs same single size
Content indent (when icon) calc(1em + --pds-spacing-xs) same formula single size
Detail indent and top margin --pds-spacing-l and --pds-spacing-2xs same single size
Rail width --pds-border-width-default same --event-log-rail-color = --pds-color-border-separator
Rail offsets em, lh and --pds-spacing-5xs (see Footprint) same single size
Status color: neutral --pds-color-foreground-default-secondary same token
Status color: isAgentic --pds-color-status-discovery-foreground same token
Status color: error --pds-color-status-critical-foreground same token (wins over isAgentic: --error comes later in the CSS)
Pending text and icon --pds-color-foreground-default-secondary same token
Quiet text --pds-color-foreground-default-secondary same token
Diff counts (__added, __removed) success and critical foreground same tokens
Focus ring (summary) --pds-border-width-outline solid --pds-color-interactive-focus same token

Open: the Spinner's fixed s size and the 1em status box both set a width and height; which one wins depends on CSS order and was not verified. Check the active item at xs and s before the port.

Expect to change

Each choice that breaks a toolkit convention, with a recommended answer. The designer has not decided these.

  1. isAgentic name (L1, L2). Shipped components use isAgent with a top-level agentLabel (AvatarLabel, IdentityBlock); isAgentic is the unshipped Button convention. Recommendation: isAgent, to match what shipped. Leave the agent color as the only effect. No agentLabel is needed here (the status text already says what happened); do not add one.
  2. labelStrings is a full Record (L2, L3). Passing one translated string means passing all four. The default object is a module constant, so it is not recreated per render. VerticalStepper also takes a full object (labelStrings with step, completed, hasError), so this follows precedent. Recommendation: accept Partial<Record<EventLogItemStatus, string>> merged over the defaults. It is a top-level translatable prop, which is right (L3).
  3. Child sniffing for the rail (L2). EventLog decides --joined with node.type === EventLogItem. Recommendation: keep it and document "a wrapped item loses its rail", or have the engineer replace it with a CSS rule on adjacent entries; either is fine.
  4. size on both components (L2, L11). Event Log defaults to xs and applies pds-copy-xs even when unset; the item's size has no default and wins over the list's. Two places to set one thing. Recommendation: keep both (items are used standalone), state the precedence in TSDoc, and keep one default (xs) on the list.
  5. isQuiet and iconName placement (L2). iconName is out of alphabetical order. Recommendation: reorder.
  6. time is a pre-formatted string with a separate timeDateTime (L11). Content of its own kind, not a position value, so the shape is right. Recommendation: keep.
  7. No knobs with one right value found (L2). hasRail and isQuiet both change the look and default off. Recommendation: keep.
  8. ReactNode label and secondaryText. Consumers pass <strong> and <code> inside them. Recommendation: keep, and document that code goes in <code>.
  9. Types exported from the component file (EventLogSize, EventLogItemSize, EventLogItemStatus). Recommendation: reuse one shared text-size type if the toolkit has one; the engineer picks.

Target-version check

Checked 2026-11-20 against .pds-reference/src at v2.0.0-beta.21 (CHANGELOG.mdx has no entry for Event Log, Event Log Item, isAgentic or a rail).

Item Exists at beta.21?
EventLog, EventLogItem, classes pds-event-log*, pds-event-log-item* no (no files or matches)
isAgentic prop anywhere no. isAgent exists on AvatarLabel (and IdentityBlock)
Icons check, circle, diamondExclamation, angleDown, codeBranch, circleInfo, zappy yes, all in icon-registry.ts. None is new
Spinner with color (any CSS color or var()), label, size='s' yes in the package. The Spinner proposal adds color='agentic' and hasAvatar; EventLogItem uses neither, so the port does not need the Spinner proposal for the active status. The old note said it did
Timeline, TimelineItem (lists) yes, shipped; see Extension or new component
ThinkingState (a story child) yes, shipped
Tag, CodeBlock, FlexContainer, Button (story only) yes
pds-copy-xs, pds-copy-s classes yes (utilities/typography/typography-styles.css)
lh CSS unit used in the package already (Table, ComparisonList, Timeline CSS)
Browser support policy for lh not verified (no browserslist entry found in the reference package.json)
visually-hidden class not verified in the reference

Port notes

  • New components, likely src/components/lists/ or its own event-log folder holding both (the engineer's call). Use npm run generate:component for each, then copy the files over.
  • Swap the local Icon wrapper and mergeClasses for the real ones. For the active status, use the package Spinner with color, label and size='s'; no Spinner port is needed for this.
  • lh is already used by the package CSS, so it is probably within support; not verified against a stated browser policy.
  • Port Event Log and EventLogItem before Chain of Thought and Agent Inbox, which depend on them.
  • AgentStep never shipped, so there is nothing to migrate in pds-toolkit-react.
  • Fix on the way: iconName order (Expect to change 5); drop the story-only pieces listed under API.
  • Docs: the Usage and Accessibility sections are written in EventLog.mdx and EventLogItem.mdx; the engineer should not have to write them.

Preview

npm run storybook, then Component Proposals/Event Log/Event Log and Component Proposals/Event Log/Event Log Item. The composition is under Recipes/Event log with agent.

Figma: https://www.figma.com/design/AMGWJbraJoi2PKWnxo29Ah/PDS-Proposals?node-id=306-43