Skip to content
Back

Tool stackPro

A turn's tool calls grouped the way a transcript reads them: runs of reads fold into one line, parallel calls show live, and a finished turn folds into "Worked for 31s".

oxyn add tool-stack

I'll check how the refresh path takes the lock.

1 more
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • Between the user's message and the answer, an agent reads files, searches, edits, runs commands, calls MCP servers and updates its plan.
  • Family F is how that work is shown: one row or card per tool call, file-edit chips with +12 −3 counts, live terminal output, and the todo list / plan the agent is following.
  • The user is trying to answer four questions without reading everything: 1.
  • What is it doing right now? (the live row, its verb and elapsed time) 2.

When not to use

  • How long the agent has worked, without the time it spent waiting for you: use Elapsed timer instead.
  • Grey shapes the size of what they stand in for, one sheen sweeping across all of them in step (or a staggered pulse), shown only after a short delay, then a crossfade into the content: use Skeleton instead.
  • How much the agent may do without asking: use Permission selector instead.

Installation

Tool stack is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add tool-stack

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Transcript

Grouped with a prose break.

I'll check how the refresh path takes the lock.

1 more
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Parallel

Three calls in flight.

I'll check how the refresh path takes the lock.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Worked for

Folded after the turn.

I'll check how the refresh path takes the lock.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Terminal

Terminal transcript.

•Read 3 files, searched 1 pattern · 3.4s
└ Read auth.rs
└ Read session.rs
└ Searched “refresh_token”
└ Read store.rs
•Ran cargo test … · 6.4s
└ 14 passed
•Searched the web 1 time, fetched 1 page · 1 failed · 11s
└ Searched the web “tokio mutex across await”
└ Fetched docs.rs
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

ToolStack

PropTypeDefaultDescription
callsrequiredVec<ToolCall>—The turn's calls.
entriesVec<Entry>Default::default()Transcript order with breaks; empty means all calls in order, no breaks.
nowrequiredClockMs—Shared clock.
variantString"transcript"`transcript`, `worked-for` or `terminal`.
densityString"normal"`hidden`, `compact`, `normal` or `verbose`.
turn_doneOption<Duration>Default::default()The turn ended after this much work (folds `worked-for`).
rowString"row"Row variant (`row`, `card`, `minimal`; `terminal` follows the stack).
on_actionEventHandler<(String, RowAction)>—Retry / Stop / Connect.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterorSpaceOpen or close a group
←or→Close / open a group row (tree semantics)

Accessibility

  • Group rows use tree semantics (treeitem, ← / →); each call row is a button with aria-expanded.
From the spec
  • Structure. The tool stack is a list (role="list") of rows; a group is a list item containing a button (aria-expanded, aria-controls) and a nested list. Each row's accessible name is "<past or present verb> <target>, <state>, <duration>", e.g. "Read auth.rs, succeeded, 0.8 seconds".
  • Live announcements. Tool rows never own a live region (loaders.md §8). The composer's single polite region announces: a failed call once per call ("Command failed: cargo test, exit 101"), approvals assertively (owned by family G), stalls at stall_hard only. Verb changes are debounced to once per 10 s; pinned tool verbs are announced only if they last ≥ 2 s (status-text.md §11).
  • aria-busy sits on the running row's detail pane, not on the loader; removed on any terminal state.
  • Meaning never by colour alone. Every state has a glyph (○ ✓ ✕ ■ ⊘ ⏸ key) and a word; diff counts carry +/− signs; the theme can swap diff green for blue (Claude Code's daltonized themes, note 08 §1.3) through tokens.
  • Contrast. Row text ≥ 4.5:1; glyphs and loaders ≥ 3:1; dimmed (settled) rows stay ≥ 4.5:1 for the target text.
  • Keyboard. ↑/↓ moves between rows when the stack has focus; Enter / Space expand; E expand or collapse all in the turn; R retry; C copy; Esc stops a running shell; Home / End jump to the first / last row of the turn. Focus never moves on its own when rows arrive.
  • Reduced motion. §5.2; state is always carried by glyph and text.

Motion & interaction

5.1 Micro-interactions

  • Row enter. Height opens on spring.snap (critically damped, nothing bounces) and the row fades In with y +4 → 0; A agent run card opens new steps this way (note 12). Rows that arrive in a burst stagger 40 ms, cap 6, then appear together.
  • Verb tense roll. Present → past on completion uses dur.tense.roll (240 ms); the target text stays put while the verb part rolls (status-text.md §5.4). Arc crossfades ~100 ms out / 160 ms in with a 2 px shift (note 12); our 240 ms total is in the same range.
  • Loader → glyph morph. The row loader finishes its beat (≤ 200 ms), then morphs to ✓ / ✕ / ■ / ⊘ in 160 ms spring.snap; ✓ draws its stroke once (240 ms). Same as loaders.md §4.
  • Merge into group. When a second same-class call arrives: the existing row's label crossfades into the group label, the new call does not add a row (it lands in the hidden list), and the header count rolls 1 → 2 (dur.digit.roll). No height change.
  • Expand / collapse. Height on spring.snap 220 ms, content opacity 150 ms ease.out starting 40 ms in (Cline uses a 250 ms max-height + 150 ms opacity expand, note 08 §1.7); collapse fades the content first (100 ms) then closes the height (180 ms ease.in). Chevron rotates 90° in 160 ms.
  • Failure. ✕ morph + a 2-cycle 3 px nudge of the glyph only (loaders.md), error line slides in under the row; text never shakes.
  • Numbers roll, words swap (status-text.md §7): counts in group headers, +N −N, elapsed.
  • Hover. Row background tint 80 ms; after 400 ms a tooltip with full target, raw tool name, server, start time, exact duration, attempt.

5.2 Family-F motion tokens (proposed; added to oxyn-core motion presets)

TokenValueUsed for
dur.row.enter200 ms height (spring.snap) + 160 ms fade, y +4 → 0new rows, new plan items, new files in a rollup
dur.row.morph160 ms spring.snaploader → ✓ / ✕ / ■ / ⊘
dur.check.draw240 ms ease.out✓ stroke draw
dur.expand / dur.collapse220 ms spring.snap (+150 ms content fade, 40 ms delay) / 100 ms fade + 180 ms ease.indetail panes, groups, terminal blocks
delay.row_guard150 msa call that resolves inside this never shows a running state
delay.auto_collapse1200 mssystem-opened blocks collapse after success
stagger.row40 ms, cap 6bursts of rows
dur.highlight.fade1600 ms ease.out"changed by agent" tint on plan items, new rollup files
dur.count.roll= dur.digit.roll (280 ms)group counts, +N −N, "3/7"
Error nudge300 ms, 2 × 3 pxfailed glyph
Reduced motionrows appear with an 80 ms fade, no height spring (instant height); tense change → 80 ms crossfade; counts swap without rolling; ✓ appears without stroke draw; no shimmer on args or active items; highlight tint is a static 2 px left bar for 4 s instead of a fade—

5.3 Timing table (family defaults)

TransitionDurationDelayEasing / springStaggerFrame rate
Row enter200 ms height + 160 ms fade0spring.snap / ease.out40 ms cap 660 Hz
Args shimmer (StreamingInput)1400 ms sweep / 800 ms rest600 msease.coast—30 Hz
Approved flash → Running400 ms hold0ease.out—60 Hz
Verb tense roll240 msafter loader beatease.out—60 Hz
Loader → glyph morph160 ms + 240 ms stroke≤ 200 ms (beat)spring.snap—60 Hz
Success tone hold → fg600 ms hold, 240 ms fade—ease.in—30 Hz
Expand / collapse220 ms / 280 ms total0spring.snap / ease.in—60 Hz
Auto-collapse after success—1200 msas collapse——
Group count roll280 ms0ease.out30 ms right → left30 Hz
Stall tone ramp (per call)2000 mstool_stall 120 slinear in OKLab—30 Hz
Turn fold to Worked for …280 ms (rows collapse into one)after the status line's tense rollease.in-out20 ms per row, cap 660 Hz
Error nudge300 msafter morphlinear—60 Hz
Reduced motion80 ms opacity crossfades; instant heights; no shimmer, no rolls, no stroke draw—linearnone1 Hz idle

5.4 Busy signal and frame budget

  • Each running row is its own BusyRegion::ToolRow(id); a collapsed group is one region (its header animates, children are still). At most 8 rows animate at once (the lists rule in loaders.md §2.3); rows nearest the viewport centre win; the rest show the still "working" frame.
  • Rows repaint only for their loader lease and the 1 Hz timer; a settled transcript repaints nothing.
  • Off-screen rows pause (loaders.md §2.1) and resume at the clock's phase.

Responsive behaviour

  • Groups keep long turns short; density trades detail for space.
Edge cases (spec)
  • Very fast agents. Calls resolving inside delay.row_guard (150 ms) render final; a burst of 40 reads in 300 ms produces one group header whose count rolls once to the final number (rolls are coalesced: a new target mid-roll continues from the current position, elapsed-timer.md §5).
  • Very slow tools (minutes to hours). Timer switches to Units format; the per-call stall overlay starts at tool_stall; after 10 min the row loader drops to loop.calm (loaders.md §7).
  • Hundreds of calls in a turn. Rows are virtualised beyond 200 in the transcript (proposed); group caps (§3.1.7); only 8 loaders animate.
  • Out-of-order events. A result for an unknown call id creates the row in its final state; a late TOOL_CALL_ARGS after a result is ignored for display (kept in the trace).
  • Missing durations. Providers that send no start event: duration shows "—", never "0s".
  • Long targets. Middle-truncate paths (src/…/auth.rs), keep the basename; queries end-truncate at 32 chars; full text in the tooltip and accessible name.
  • RTL. Rows mirror (icon at inline-start, duration at inline-end); paths, commands, code and +12 −3 sit in LTR bidi isolates; chevrons point inline-end when collapsed.
  • Tiny sizes (16–20 px rows). Icon only, no target, terse verb pack, duration hidden until hover; groups show the count badge only.
  • Dense IDE panels. tool-call/minimal + Compact density; 24 px rows; hit area still ≥ 24 px.
  • Touch. 44 px rows; expand on tap anywhere in the row; Retry / Stop as 44 px trailing buttons; hover tooltips become a long-press sheet.
  • Slow networks / reconnects. When the stream drops, running rows keep their last state and the stall overlay applies; on reconnect the adapter replays the RunLog snapshot and rows reconcile by id without re-entering (no enter animation for rows that already existed).
  • Sensitive values. Arguments and output pass through a redaction hook (Redactor) before render; masked values show as •••• with a "hidden" tag (Codex masks MCP secrets, note 08 §8).
  • Restored threads. Reopening an old thread renders every call settled with no animation.

Notes for AI

  • Import ToolStack from oxyn_dioxus and include RUN_CSS plus the token stylesheet once.
  • A GPUI version exists: ToolStackEl in oxyn_gpui.
  • Props to set first: calls, now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI