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-stackI'll check how the refresh path takes the lock.
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.
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.
oxyn add tool-stackUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Transcript
Grouped with a prose break.
I'll check how the refresh path takes the lock.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Parallel
Three calls in flight.
I'll check how the refresh path takes the lock.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Worked for
Folded after the turn.
I'll check how the refresh path takes the lock.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Terminal
Terminal transcript.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
ToolStack
| Prop | Type | Default | Description |
|---|---|---|---|
callsrequired | Vec<ToolCall> | — | The turn's calls. |
entries | Vec<Entry> | Default::default() | Transcript order with breaks; empty means all calls in order, no breaks. |
nowrequired | ClockMs | — | Shared clock. |
variant | String | "transcript" | `transcript`, `worked-for` or `terminal`. |
density | String | "normal" | `hidden`, `compact`, `normal` or `verbose`. |
turn_done | Option<Duration> | Default::default() | The turn ended after this much work (folds `worked-for`). |
row | String | "row" | Row variant (`row`, `card`, `minimal`; `terminal` follows the stack). |
on_action | EventHandler<(String, RowAction)> | — | Retry / Stop / Connect. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| EnterorSpace | Open 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_hardonly. 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-busysits 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;
Eexpand 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.snap220 ms, content opacity 150 msease.outstarting 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 msease.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)
| Token | Value | Used for |
|---|---|---|
dur.row.enter | 200 ms height (spring.snap) + 160 ms fade, y +4 → 0 | new rows, new plan items, new files in a rollup |
dur.row.morph | 160 ms spring.snap | loader → ✓ / ✕ / ■ / ⊘ |
dur.check.draw | 240 ms ease.out | ✓ stroke draw |
dur.expand / dur.collapse | 220 ms spring.snap (+150 ms content fade, 40 ms delay) / 100 ms fade + 180 ms ease.in | detail panes, groups, terminal blocks |
delay.row_guard | 150 ms | a call that resolves inside this never shows a running state |
delay.auto_collapse | 1200 ms | system-opened blocks collapse after success |
stagger.row | 40 ms, cap 6 | bursts of rows |
dur.highlight.fade | 1600 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 nudge | 300 ms, 2 × 3 px | failed glyph |
| Reduced motion | rows 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)
| Transition | Duration | Delay | Easing / spring | Stagger | Frame rate |
|---|---|---|---|---|---|
| Row enter | 200 ms height + 160 ms fade | 0 | spring.snap / ease.out | 40 ms cap 6 | 60 Hz |
| Args shimmer (StreamingInput) | 1400 ms sweep / 800 ms rest | 600 ms | ease.coast | — | 30 Hz |
| Approved flash → Running | 400 ms hold | 0 | ease.out | — | 60 Hz |
| Verb tense roll | 240 ms | after loader beat | ease.out | — | 60 Hz |
| Loader → glyph morph | 160 ms + 240 ms stroke | ≤ 200 ms (beat) | spring.snap | — | 60 Hz |
Success tone hold → fg | 600 ms hold, 240 ms fade | — | ease.in | — | 30 Hz |
| Expand / collapse | 220 ms / 280 ms total | 0 | spring.snap / ease.in | — | 60 Hz |
| Auto-collapse after success | — | 1200 ms | as collapse | — | — |
| Group count roll | 280 ms | 0 | ease.out | 30 ms right → left | 30 Hz |
| Stall tone ramp (per call) | 2000 ms | tool_stall 120 s | linear in OKLab | — | 30 Hz |
Turn fold to Worked for … | 280 ms (rows collapse into one) | after the status line's tense roll | ease.in-out | 20 ms per row, cap 6 | 60 Hz |
| Error nudge | 300 ms | after morph | linear | — | 60 Hz |
| Reduced motion | 80 ms opacity crossfades; instant heights; no shimmer, no rolls, no stroke draw | — | linear | none | 1 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 toloop.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_ARGSafter 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 −3sit in LTR bidi isolates; chevrons point inline-end when collapsed. - Tiny sizes (16–20 px rows). Icon only, no target,
terseverb 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
RunLogsnapshot 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
ToolStackfromoxyn_dioxusand includeRUN_CSSplus the token stylesheet once. - A GPUI version exists:
ToolStackElinoxyn_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.