Tool Activity
Shows the tools an agent called while it worked: what ran, what is waiting, and what needs attention. ActivityPanel frames a live run above its result.
Installation
pnpm dlx shadcn@latest add https://sprout.tulipfarm.ai/r/tool-activity.jsonCopies Tool Activity and the components it uses (Button, Collapsible, Spinner, Status, and Web Source) into your app, installs the packages, and adds the styles. Then import it from @/components/ui/tool-activity. Needs Tailwind CSS 4 and a components.json from shadcn init.
Install the following dependencies:
pnpm add clsx tailwind-merge @hugeicons/core-free-icons @hugeicons/reactAdd Sprout base once per app: the
cn()helper and the design tokens.lib/sprout/classes.ts- Design tokens, for your global CSS
Add the components it uses: Button, Collapsible, Spinner, Status, and Web Source.
Copy and paste the following code into your project.
'use client'; import { useEffect, useLayoutEffect, useRef, useState, type ReactNode } from 'react'; import { ChevronDownIcon } from '@/lib/sprout/icons/chevron-down-icon'; import { CommandIcon } from '@/lib/sprout/icons/command-icon'; import { cn } from '@/lib/sprout/classes'; import { Button } from '@/components/ui/button'; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible'; import { Spinner } from '@/components/ui/spinner'; import { Status, type StatusState } from '@/components/ui/status'; import { WebSource, type WebSourceIcon } from '@/components/ui/web-source'; export const toolActivityStatusNames = [ 'queued', 'running', 'waiting', 'completed', 'blocked', 'failed', 'cancelled', 'unknown', ] as const; export const toolActivityVariantNames = ['collapsible', 'stepper', 'transcript'] as const; export type ToolActivityStatus = (typeof toolActivityStatusNames)[number]; export type ToolActivityVariant = (typeof toolActivityVariantNames)[number]; export interface ToolActivitySource { url: string; title: string; } export interface ToolActivityItem { id: string; label: string; status: ToolActivityStatus; visual: ReactNode; detail?: string | undefined; details?: ReactNode; action?: ReactNode; urls?: readonly string[] | undefined; failedUrls?: readonly string[] | undefined; query?: string | undefined; sources?: readonly ToolActivitySource[] | undefined; } export type ToolActivitySourceIcon = WebSourceIcon; const statusText: Record<ToolActivityStatus, string> = { queued: 'Pending', running: 'In progress', waiting: 'Waiting', completed: 'Completed', blocked: 'Access denied', failed: 'Failed', cancelled: 'Cancelled', unknown: 'Outcome unknown', }; const visibleSourceCount = 4; export interface ActivityPanelProps { working: boolean; activityLabel?: string | null | undefined; hasResult?: boolean | undefined; collapseWhenDone?: boolean | undefined; className?: string | undefined; children: ReactNode; } export function ActivityPanel({ working, activityLabel, hasResult = false, collapseWhenDone = false, className, children, }: ActivityPanelProps) { const [scrolled, setScrolled] = useState(false); const [open, setOpen] = useState(true); const settled = useRef(false); useEffect(() => { if (working) { if (settled.current) setOpen(true); settled.current = false; } else if (!settled.current && collapseWhenDone) { settled.current = true; setOpen(false); } }, [working, collapseWhenDone]); return ( <Collapsible open={open} onOpenChange={setOpen} data-slot="activity-panel" data-has-result={hasResult || undefined} role="region" aria-label="Chat activity" className={cn('sprout-activity-panel', className)} > <CollapsibleTrigger aria-label={working ? `Working…${activityLabel ? ` ${activityLabel}` : ''}` : 'Worked'} className="sprout-activity-panel-trigger" > {working && <Spinner variant="thinking" aria-hidden="true" />} <span className="sprout-activity-panel-status">{working ? 'Working…' : 'Worked'}</span> {working && activityLabel && <span className="sprout-activity-panel-label">{activityLabel}</span>} <ChevronDownIcon size="sm" aria-hidden="true" data-slot="collapsible-indicator" /> </CollapsibleTrigger> <span role="status" className="sprout-tool-activity-sr-only"> {working ? 'Working…' : 'Worked'} </span> <CollapsibleContent keepMounted className="sprout-activity-panel-content"> <div className="sprout-activity-panel-frame" data-scrolled={scrolled || undefined}> <div data-slot="activity-viewport" role="region" aria-label="Activity timeline" tabIndex={0} className="sprout-activity-panel-viewport" onScroll={event => setScrolled(event.currentTarget.scrollTop > 0)} > {children} </div> </div> </CollapsibleContent> </Collapsible> ); } function ToolSources({ item, sourceIcon }: { item: ToolActivityItem; sourceIcon: ToolActivitySourceIcon | undefined }) { const [expanded, setExpanded] = useState(false); const urls = [...new Set([...(item.urls ?? []), ...(item.failedUrls ?? [])])]; if (!urls.length) return null; const titles = new Map(item.sources?.map(source => [source.url, source.title.trim()])); const visible = expanded ? urls : urls.slice(0, visibleSourceCount); return ( <div data-slot="tool-sources" className="sprout-tool-activity-sources"> <ul aria-label="Web sources" className="sprout-tool-activity-source-list"> {visible.map(url => ( <li key={url} className="sprout-tool-activity-source"> <WebSource url={url} title={titles.get(url)} failed={item.failedUrls?.includes(url) ?? false} icon={sourceIcon} size="sm" /> </li> ))} </ul> {urls.length > visibleSourceCount && ( <Button variant="ghost" size="sm" aria-expanded={expanded} onClick={() => setExpanded(value => !value)} className="sprout-tool-activity-more" > {expanded ? 'Show fewer sources' : `${urls.length - visibleSourceCount} more`} </Button> )} </div> ); } const statusStates = { queued: 'pending', running: 'running', waiting: 'paused', completed: 'success', blocked: 'error', failed: 'error', cancelled: 'stopped', unknown: 'warning', } as const satisfies Record<ToolActivityStatus, StatusState>; export interface ToolActivityProps { items: ToolActivityItem[]; active?: boolean | undefined; label?: string | undefined; activityLabel?: string | null | undefined; onToggle?: (() => void) | undefined; variant?: ToolActivityVariant | undefined; onLoadOlder?: (() => void) | undefined; onRetryOlder?: (() => void) | undefined; hasOlder?: boolean | undefined; loadingOlder?: boolean | undefined; olderError?: boolean | undefined; sourceIcon?: ToolActivitySourceIcon | undefined; className?: string | undefined; } export function ToolActivity({ items, active = false, label = 'Tool activity', activityLabel, onToggle, variant = 'collapsible', onLoadOlder, onRetryOlder, hasOlder = false, loadingOlder = false, olderError = false, sourceIcon, className, }: ToolActivityProps) { const visible = variant === 'stepper' ? items.slice().reverse() : items; const list = useRef<HTMLOListElement>(null); const olderSentinel = useRef<HTMLLIElement>(null); const latestId = variant === 'stepper' ? visible.at(-1)?.id : undefined; useLayoutEffect(() => { if (!latestId) return; const activity = list.current?.closest<HTMLElement>('[data-slot="activity-viewport"]'); if (activity) activity.scrollTop = activity.scrollHeight; }, [latestId]); useEffect(() => { if (variant !== 'stepper' || !hasOlder || loadingOlder || olderError || !onLoadOlder) return; const target = olderSentinel.current; if (!target) return; let mutationObserver: MutationObserver | undefined; let stopObserving: (() => void) | undefined; const attach = () => { const root = list.current?.closest<HTMLElement>('[data-slot="activity-viewport"]'); if (!root) return false; if (typeof IntersectionObserver === 'undefined') { const checkTop = () => { if (root.scrollTop <= 40) onLoadOlder(); }; root.addEventListener('scroll', checkTop, { passive: true }); stopObserving = () => root.removeEventListener('scroll', checkTop); } else { const observer = new IntersectionObserver( entries => { if (entries.some(entry => entry.isIntersecting)) { observer.disconnect(); onLoadOlder(); } }, { root, rootMargin: '40px 0px 0px' }, ); observer.observe(target); stopObserving = () => observer.disconnect(); } mutationObserver?.disconnect(); return true; }; if (!attach()) { mutationObserver = new MutationObserver(() => { attach(); }); mutationObserver.observe(document.body, { childList: true, subtree: true, }); } return () => { mutationObserver?.disconnect(); stopObserving?.(); }; }, [variant, hasOlder, loadingOlder, olderError, onLoadOlder, items.length]); const running = items.some(item => item.status === 'running'); const working = active || running; const pending = working || items.some(item => item.status === 'queued' || item.status === 'waiting' || item.status === 'unknown'); const [expansion, setExpansion] = useState({ pending, open: variant === 'transcript' ? false : pending, }); if (variant !== 'transcript' && expansion.pending !== pending) setExpansion({ pending, open: pending }); const open = variant === 'transcript' || expansion.pending === pending ? expansion.open : pending; if (items.length === 0) return active && variant === 'transcript' ? ( <div data-slot="reply-progress" role="status" className={cn('sprout-tool-activity-progress', className)}> <Spinner variant="thinking" aria-hidden="true" /> {activityLabel || 'Thinking…'} </div> ) : null; const problems = items.filter( item => item.status === 'blocked' || item.status === 'failed' || item.status === 'unknown', ).length; const count = `${items.length} ${items.length === 1 ? 'tool' : 'tools'}`; const attention = items.some(item => item.status === 'unknown') ? 'Outcome unconfirmed' : items.some(item => item.status === 'failed') ? 'Some work failed' : items.some(item => item.status === 'blocked') ? 'Access denied' : items.some(item => item.status === 'waiting') ? 'Waiting for input' : !working && items.some(item => item.status === 'cancelled') ? 'Work cancelled' : null; const title = variant === 'transcript' ? `${ working ? `Working… ${activityLabel || items.find(item => item.status === 'running')?.label || ''}`.trim() : pending ? 'Work pending' : `Tool activity · ${count}` }${attention ? ` · ${attention}` : ''}` : `${working ? `Using ${count}` : pending ? `${count} waiting` : `Used ${count}`}${ problems ? ` · ${problems} need${problems === 1 ? 's' : ''} attention` : '' }`; return ( <Collapsible data-slot="tool-activity" data-variant={variant} open={variant === 'stepper' || open} onOpenChange={next => { onToggle?.(); setExpansion({ pending, open: next }); }} className={cn('sprout-tool-activity', className)} > {variant !== 'stepper' && ( <> <CollapsibleTrigger aria-label={title} className="sprout-tool-activity-trigger"> {working ? <Spinner variant="thinking" aria-hidden="true" /> : <CommandIcon size="sm" aria-hidden="true" />} <span className="sprout-tool-activity-title">{title}</span> <ChevronDownIcon size="sm" aria-hidden="true" data-slot="collapsible-indicator" /> </CollapsibleTrigger> <span role="status" className="sprout-tool-activity-sr-only"> {title} </span> </> )} <CollapsibleContent> {variant === 'stepper' && loadingOlder && ( <div role="status" className="sprout-tool-activity-older"> <Spinner aria-hidden="true" /> Loading earlier activity… </div> )} {variant === 'stepper' && olderError && ( <div role="alert" className="sprout-tool-activity-older" data-tone="danger"> <span>Earlier activity didn’t load.</span> <Button variant="link" size="sm" disabled={!onRetryOlder} onClick={onRetryOlder}> Retry loading </Button> </div> )} <ol ref={list} aria-label={label} className="sprout-tool-activity-list"> {variant === 'stepper' && hasOlder && ( <li ref={olderSentinel} aria-hidden="true" className="sprout-tool-activity-sentinel" /> )} {visible.map((item, index) => ( <li key={item.id} data-tool-id={item.id} data-status={item.status} className="sprout-tool-activity-row"> {index < visible.length - 1 && ( <span data-slot="timeline-connector" aria-hidden="true" className="sprout-tool-activity-connector" /> )} <div className="sprout-tool-activity-head"> <span data-slot="tool-status-mark" className="sprout-tool-activity-mark"> <Status state={statusStates[item.status]} tooltip={statusText[item.status]} aria-hidden="true" /> </span> <span aria-hidden="true" className="sprout-tool-activity-visual"> {item.visual} </span> <span data-slot="tool-row-label" className="sprout-tool-activity-label"> <span className="sprout-tool-activity-label-text">{item.label}</span> <span data-slot="tool-status-label" role={item.status === 'running' && variant !== 'transcript' ? 'status' : undefined} className="sprout-tool-activity-sr-only" > {statusText[item.status]} </span> </span> {item.action != null && item.action !== false && ( <span data-slot="tool-action" className="sprout-tool-activity-action"> {item.action} </span> )} </div> {item.query && ( <p data-slot="web-search-query" className="sprout-tool-activity-query"> {item.query} </p> )} {item.detail && ( <p data-slot="tool-detail" data-tone={item.status === 'failed' || item.status === 'blocked' ? 'danger' : undefined} className="sprout-tool-activity-detail" > {item.detail} </p> )} {item.details != null && item.details !== false && ( <div data-slot="tool-details" className="sprout-tool-activity-details"> {item.details} </div> )} <ToolSources item={item} sourceIcon={sourceIcon} /> </li> ))} </ol> </CollapsibleContent> </Collapsible> ); }And the files it imports:
lib/sprout/icons/chevron-down-icon.tsxlib/sprout/icons/command-icon.tsxlib/sprout/icons/create-icon.tsx
Add the styles to your global CSS, after
@import "tailwindcss".@layer components { .sprout-activity-panel { box-sizing: border-box; min-height: 0; max-height: 40%; font-family: var(--sprout-font); flex-direction: column; flex-shrink: 0; padding: 16px; display: flex; } .sprout-activity-panel[data-has-result] { border-bottom: 1px solid var(--sprout-line); } .sprout-activity-panel-trigger { max-width: 100%; min-height: 28px; color: var(--sprout-muted); font-size: var(--sprout-text-sm); flex-shrink: 0; align-self: flex-start; align-items: center; gap: 8px; font-weight: 500; line-height: 1.25rem; display: inline-flex; } @media (hover: hover) { .sprout-activity-panel-trigger:hover { color: var(--sprout-text); } .sprout-tool-activity-trigger:hover { background: var(--sprout-hover); color: var(--sprout-text); } } .sprout-activity-panel-status { flex-shrink: 0; } .sprout-activity-panel-label { min-width: 0; font-size: var(--sprout-text-xs); text-overflow: ellipsis; white-space: nowrap; font-weight: 400; overflow: hidden; } .sprout-activity-panel-content { flex-direction: column; min-height: 0; display: flex; overflow: hidden; } .sprout-activity-panel-frame { flex-direction: column; min-height: 0; display: flex; position: relative; } .sprout-activity-panel-frame:before { z-index: 1; content: ""; opacity: 0; pointer-events: none; background: linear-gradient(to bottom, color-mix(in srgb, var(--sprout-activity-panel-fade, var(--sprout-surface)) 94%, transparent), transparent); backdrop-filter: blur(3px); height: 20px; position: absolute; inset: 0 0 auto; } .sprout-activity-panel-frame[data-scrolled]:before { opacity: 1; } .sprout-activity-panel-viewport { overscroll-behavior: contain; border-radius: var(--sprout-radius-control); scrollbar-width: none; flex: auto; min-height: 0; padding-top: 8px; overflow-y: auto; } .sprout-activity-panel-viewport::-webkit-scrollbar { display: none; } .sprout-activity-panel-viewport:focus-visible { outline: var(--sprout-focus-width) solid var(--sprout-focus-ring); outline-offset: -1px; } .sprout-tool-activity { width: 100%; color: var(--sprout-text); font-family: var(--sprout-font); font-size: var(--sprout-text-sm); line-height: 1.25rem; } .sprout-tool-activity-trigger { max-width: 100%; min-height: 28px; color: var(--sprout-muted); text-align: start; align-items: center; gap: 8px; margin-inline-start: -6px; padding: 0 6px; display: inline-flex; } .sprout-tool-activity-trigger:focus-visible { outline-offset: 0; } .sprout-tool-activity-trigger > svg { flex-shrink: 0; } .sprout-tool-activity-title { overflow-wrap: anywhere; min-width: 0; font-weight: 500; } .sprout-tool-activity-progress, .sprout-tool-activity-older { color: var(--sprout-muted); font-family: var(--sprout-font); align-items: center; gap: 8px; display: flex; } .sprout-tool-activity-progress { font-size: var(--sprout-text-sm); line-height: 1.25rem; } .sprout-tool-activity-older { font-size: var(--sprout-text-xs); flex-wrap: wrap; padding: 8px 0; } .sprout-tool-activity-older[data-tone="danger"] { color: var(--sprout-danger); } .sprout-tool-activity-list { gap: 2px; margin: 4px 0 0; padding: 0; list-style: none; display: grid; position: relative; } .sprout-tool-activity-sentinel { height: 1px; } .sprout-tool-activity-row { min-width: 0; padding: 4px 0; position: relative; } .sprout-tool-activity-connector { background: color-mix(in srgb, var(--sprout-border) 45%, transparent); border-radius: 1px; width: 2px; position: absolute; top: 24px; bottom: -10px; left: 7px; } .sprout-tool-activity-head { align-items: flex-start; gap: 8px; padding-block: 2px; display: flex; } .sprout-tool-activity-mark, .sprout-tool-activity-visual { width: 16px; height: 20px; color: var(--sprout-muted); flex-shrink: 0; place-items: center; display: grid; position: relative; } .sprout-tool-activity-visual > svg { max-width: 16px; max-height: 16px; } .sprout-tool-activity-label { min-width: 0; color: var(--sprout-muted); overflow-wrap: anywhere; flex: 0 auto; } .sprout-tool-activity-action { flex-shrink: 0; margin-block: -2px; display: inline-flex; } .sprout-tool-activity-row[data-status="running"] .sprout-tool-activity-label-text { color: var(--sprout-text); } .sprout-tool-activity-query, .sprout-tool-activity-detail, .sprout-tool-activity-details, .sprout-tool-activity-sources { min-width: 0; margin: 0; margin-inline-start: 48px; } .sprout-tool-activity-query { color: var(--sprout-muted); font-size: var(--sprout-text-xs); overflow-wrap: anywhere; line-height: 1rem; } .sprout-tool-activity-query:before { content: "“"; } .sprout-tool-activity-query:after { content: "”"; } .sprout-tool-activity-detail { color: var(--sprout-muted); font-size: var(--sprout-text-xs); overflow-wrap: anywhere; line-height: 1rem; } .sprout-tool-activity-detail[data-tone="danger"] { color: var(--sprout-danger); } .sprout-tool-activity-details { padding-top: 4px; } .sprout-tool-activity-sources { margin-top: 4px; } .sprout-tool-activity-source-list { flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; } .sprout-tool-activity-source { min-width: 0; max-width: 100%; } .sprout-tool-activity-more { margin-top: 4px; } .sprout-tool-activity-sr-only { clip: rect(0 0 0 0); white-space: nowrap; border: 0; width: 1px; height: 1px; margin: -1px; padding: 0; position: absolute; overflow: hidden; } @media (pointer: coarse) { .sprout-tool-activity-trigger { min-height: 44px; } .sprout-tool-activity-source-list { row-gap: 16px; } } @media (prefers-reduced-motion: no-preference) { .sprout-activity-panel-trigger, .sprout-tool-activity-trigger { transition: color var(--sprout-motion-fast) var(--sprout-motion-ease), background-color var(--sprout-motion-fast) var(--sprout-motion-ease); } .sprout-activity-panel-frame:before { transition: opacity var(--sprout-motion-fast) ease-out; } .sprout-tool-activity-row { animation: sprout-tool-activity-in var(--sprout-motion-normal) ease-out both; } } @keyframes sprout-tool-activity-in { from { opacity: 0; transform: translateY(-2px); } } }Import it from
@/components/ui/tool-activity. Update the paths if your@/alias points elsewhere.
pnpm add @tulipfarm/sprout@import "tailwindcss";
@import "@tulipfarm/sprout/styles.css";The package keeps the source and ships fixes with each release. Import from @tulipfarm/sprout/tool-activity.
- Searched the supplier inboxCompleted
- Searched the webCompleted
UK inflation September 2026
- Read the inflation bulletinCompleted
- Reading the Q4 forecast tableIn progress
- Send the follow-up to NorthwindWaiting
Waiting for your approval before it sends.
- Update the investor pitchPending
- Read #financeAccess denied
Access denied. Ask an administrator to review your permissions.
- Update the Northwind recordFailed
The action failed. Retry, or check the app connection.
- Post the weekly updateCancelled
- Send follow-up emails to late suppliersOutcome unknown
The outcome is unconfirmed. Check the action status before requesting it again.
Usage
import { RefreshIcon } from "@tulipfarm/sprout/icons";
import { BrandIcon } from "@tulipfarm/sprout/brand-icon";
import { Button } from "@tulipfarm/sprout/button";
import { ToolActivity } from "@tulipfarm/sprout/tool-activity";
import { Tooltip, TooltipContent, TooltipTrigger } from "@tulipfarm/sprout/tooltip";
<ToolActivity
active={replyIsWorking}
items={[
{
id: "call_1",
label: "Searched the supplier inbox",
status: "completed",
visual: <BrandIcon brand="gmail" size="inline" />,
},
{
id: "call_2",
label: "Update the Northwind record",
status: "failed",
visual: <BrandIcon brand="hubspot" size="inline" />,
detail: "The action failed. Retry, or check the app connection.",
action: (
<Tooltip>
<TooltipTrigger
render={
<Button variant="ghost" size="icon-xs" aria-label="Retry update" onClick={retry}>
<RefreshIcon aria-hidden="true" />
</Button>
}
/>
<TooltipContent>Retry update</TooltipContent>
</Tooltip>
),
},
]}
/>status:"queued","running","waiting","completed","blocked","failed","cancelled", or"unknown". Each shows aStatusmark. Its name, such as “In progress” or “Outcome unknown”, shows in the mark’s tooltip and is read by screen readers.visual: a 14px icon or an inlineBrandIconfor the tool or app.detail: one short line under the label. It turns red forfailedandblocked.action: one compact control on the label line, such as a retry icon button. Give it anaria-labeland a matching tooltip.details: extra content under the row, lined up with the label, such as a “Details” toggle.active: the reply is still working even when no step is running, so the trigger shows a spinner.
Variants
"collapsible": the default. It opens while work is pending and closes once it settles. The trigger reads “Using 3 tools”, “2 tools waiting”, or “Used 3 tools · 1 needs attention”."transcript": starts closed under a chat reply. It reads “Working… Searching the web”, “Work pending”, or “Tool activity · 3 tools · Access denied”."stepper": always open, with no trigger. Items arrive newest first and show oldest first; inside anActivityPanelit scrolls to the newest step.
One tool
Request running. Tool running.
- Post to #launch-updatesIn progress
A single call, as on an agent request receipt. Pick a status to see its mark and how the summary changes.
In a chat reply
Is UK services inflation still above 5%? Check our supplier terms too.
Services inflation was 5.1% in September, down from 5.3%. Northwind’s terms allow a price review above 5%.
Following the latest message
<ToolActivity
variant="transcript"
items={tools}
active={isLatestTurn}
activityLabel="Searching the web"
onToggle={() => pauseFollowLatest()}
/>
// A web search step
{
id: "call_7",
label: "Searched the web",
status: "completed",
visual: <Globe size={14} />,
query: "UK services inflation September 2026",
urls: ["https://www.ons.gov.uk/…", "https://www.bls.gov/…"],
failedUrls: ["https://www.ft.com/…"],
sources: [{ url: "https://www.ons.gov.uk/…", title: "Consumer price inflation, UK" }],
}Web steps show their search text and up to four source chips; a “2 more” button shows the rest. A page in failedUrlsgets a warning icon. Chips without a title show the address withouthttps://www.. Only http andhttps addresses become links, which open in a new tab.
Source chips are Web Source chips, so they show each site's favicon. PasssourceIcon to use another icon service; it returns an image address for a page, or nothing for the site's first letter.
With no items, an active transcript shows “Thinking…” or the activityLabel. Other variants render nothing.
Activity panel
Supplier update
The draft appears here when the run finishes.
import { ActivityPanel, ToolActivity } from "@tulipfarm/sprout/tool-activity";
<ActivityPanel working={running} activityLabel={currentStep} hasResult collapseWhenDone>
<ToolActivity
variant="stepper"
items={steps}
hasOlder={page.hasMore}
loadingOlder={page.loading}
olderError={page.failed}
onLoadOlder={page.loadMore}
onRetryOlder={page.loadMore}
/>
</ActivityPanel>- The panel takes at most 40% of its parent’s height and scrolls inside. A soft fade covers the top once it scrolls.
hasResultdraws a line under the panel.collapseWhenDonecloses it when work stops and reopens it when work restarts.- When
hasOlderis set, scrolling within 40px of the top callsonLoadOlderonce. WhileloadingOlderit says “Loading earlier activity…”; onolderErrorit shows “Retry loading”.
Recorded activity
Recorded activity
A finished run can sit behind a ResultCard. Its details show the stepper without a panel.
Empty
Transcript, active
Transcript, active, with a label
Collapsible or stepper, no items
Nothing renders.
Accessibility
The trigger is a button named by its summary, and a live status beside the button announces the summary when it changes. Steps are an ordered list named “Tool activity” (set label to rename it). Each step says its status, such as “Failed”; a running step’s status is announced outside the transcript. Source chips sit in a list named “Web sources”, and failed pages say “Page unavailable”.
ActivityPanel is a region named “Chat activity”. Its timeline is a focusable region named “Activity timeline”, so it scrolls by keyboard. Older-load errors are an alert.
Steps fade in over 180ms and the chevron turns in 120ms. With reduced motion, steps appear at once and running marks stop spinning. On touch screens the trigger grows to 44px and source chips take taps across a 44px band.
Theme tokens
Rows use --sprout-text and --sprout-muted. Marks are Status marks: running uses --sprout-info, completed--sprout-success, unknown --sprout-warning, and blocked and failed--sprout-danger. Chips use--sprout-secondary and --sprout-hover. Set--sprout-activity-panel-fade to the panel’s background when it is not --sprout-surface.