Activity pillPro
A compact pill for an app bar or side rail counting background agent work – how much is running, how much waits on you – that opens to each task's ring, current step, Pause / Resume and Open.
oxyn add activity-pill- 1/4
- 2/3Needs you
- 2/5
- 1/3
- 0/4
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
- A quiet live status of background agent tasks for an app bar or sidebar: one pill with the counts that matter, opening to the tasks with their progress, step, Pause / Resume and Open.
When not to use
- An agent asks before it acts: use Approval Card instead.
- Several open requests in one card: use Approval pager instead.
- An agent's question in its own card above the composer: use Decision Card instead.
Installation
Activity pill 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 activity-pillUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Open
Open over an app bar: rings fill as tasks move through their steps; Pause, Resume and Open work, and the pill's counts follow.
- 1/4
- 2/3Needs you
- 2/5
- 1/3
- 0/4
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Closed
Closed: just the quiet pill – only the groups that aren't zero.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Paused
Everything that was running paused: grey frozen rings, Resume buttons, the pill down to what needs you.
- 1/4
- 2/3Needs you
- 2/5
- 1/3
- 0/4
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Done
All finished: full rings with a check, the pill says so.
- 4/4
- 3/3
- 5/5
- 3/3
- 4/4
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Sidebar
In a sidebar, opening to the right.
- 1/4
- 2/3Needs you
- 2/5
- 1/3
- 0/4
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Words
Your own words for the heading.
- 1/4
- 2/3Needs you
- 2/5
- 1/3
- 0/4
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Classic
Classic style: a squarer pill, a header band and footer band in the popover.
- 1/4
- 2/3Needs you
- 2/5
- 1/3
- 0/4
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
ActivityPill
| Prop | Type | Default | Description |
|---|---|---|---|
tasks | Option<Vec<RnTask>> | Default::default() | The tasks (the demo's when `None`). |
default_open | bool | Default::default() | Popover open from the start. |
placement | String | "below-end" | Where the popover opens: `below-end` (header, the default), `below-start`, or `right` (a sidebar). |
step_ms | u64 | 2600 | One step per this many ms while running (0 freezes). |
title | String | "Background tasks" | Popover heading. |
open_all | bool | true | Show the "Open tasks" footer. |
nowrequired | ClockMs | — | The clock. |
style | String | Default::default() | `clean`, `classic`, or empty to follow `data-cstyle`. |
on_open | EventHandler<String> | — | A task opened (id). |
on_pause | EventHandler<(String, bool)> | — | A task paused (`true`) or resumed (`false`). |
on_open_all | EventHandler<()> | — | "Open tasks" pressed. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| EnterorSpace | Opens or closes the list from the pill |
| Tab | Each task, its Pause / Resume or Open, then Open tasks |
| Escape | Closes the list |
Accessibility
- The pill is a popup button (aria-expanded) whose name carries the counts; the list is a labelled dialog.
- Each row's main button names the task and its step; Pause and Resume are named per task.
- Finishing tasks are read out politely; reduced motion stops the ring sweep.
Responsive behaviour
- The pill is inline and fits any header; the 284 px list opens below and aligned to the pill's end, or to the right in a sidebar.
Edge cases (spec)
The pill shrinks to its counts; the popover stays inside its container width (max-width 100 % of the viewport less 16 px).
Notes for AI
- Import
ActivityPillfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
ActivityPillElinoxyn_gpui. - Props to set first:
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.