Run Controls
Stop, steer and queue a running agent – the answer streams with a caret, a steer lands mid-sentence as a pill, a queued message runs next, and a stopped run resumes from its word.
oxyn add run-controls- Add an upgrade note for self-hosted teamsNext
rsx! {
AgentRunPanel {
agent: "Release writer".into(),
turns: run.turns(),
queue: run.queue(),
now: clock.now(),
on_action: move |(what, text)| dispatch(what, text),
}
}Rendered from Rust at build time · goes live when visible
When to use
- Stop, steer and queue a running agent from one card: the run above, the queue band, the composer Below.
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
Run Controls is free and MIT. The oxyn CLI copies its code, and the components it needs, into src/oxyn/ of your Dioxus or GPUI project, so it is yours to change.
cargo install --git https://github.com/ismailqureshi72/Oxyn oxyn-cli
oxyn init
oxyn add run-controlsuse crate::oxyn::{AgentRunPanel, STATUS_INDICATOR_CSS};Rather depend on the crate? cargo add oxyn-dioxus oxyn-core --git https://github.com/ismailqureshi72/Oxyn, then use oxyn_dioxus::{AgentRunPanel, STATUS_INDICATOR_CSS};
Usage
rsx! {
AgentRunPanel {
agent: "Release writer".into(),
turns: run.turns(),
queue: run.queue(),
now: clock.now(),
on_action: move |(what, text)| dispatch(what, text),
}
}Examples
Running
Streaming: a steer lands mid-sentence as a blue pill, the queued message waits as Next and runs when the turn is done.
- Add an upgrade note for self-hosted teamsNext
Code
rsx! {
AgentRunPanel {
agent: "Release writer".into(),
turns: run.turns(),
queue: run.queue(),
now: clock.now(),
on_action: move |(what, text)| dispatch(what, text),
}
}Stopped
Stopped at a word: Resume, Retry, Dismiss.
Release 2.4 – faster syncs and a calmer inbox.
Sync – large workspaces now load about twice as fast, and the first sync after an update no longer blocks
Code
rsx! {
AgentRunPanel {
agent: "Release writer".into(),
turns: run.turns(),
queue: run.queue(),
now: clock.now(),
on_action: move |(what, text)| dispatch(what, text),
}
}Done
Done: the time it took and Retry.
Release 2.4 – faster syncs and a calmer inbox.
Sync – large workspaces now load about twice as fast, and the first sync after an update no longer blocks the editor.
Keep it to three sections Three sections it is – the small fixes fold into one line.
Inbox – mentions and replies are grouped by thread, and muted threads stay muted on every device.
Fixes – exports keep image captions, the date picker respects the week start, and shortcuts work again on non-US keyboards.
Code
rsx! {
AgentRunPanel {
agent: "Release writer".into(),
turns: run.turns(),
queue: run.queue(),
now: clock.now(),
on_action: move |(what, text)| dispatch(what, text),
}
}Permissions
What the agent may do: Ask first, Auto-edit, Full access in red.
Ask Release writer anything – steer it or stop it while it works.
Code
rsx! {
AgentRunPanel {
agent: "Release writer".into(),
turns: run.turns(),
queue: run.queue(),
now: clock.now(),
on_action: move |(what, text)| dispatch(what, text),
}
}Chat mode
Chat mode: the permissions are disabled – chat only answers.
Ask Release writer anything – steer it or stop it while it works.
Code
rsx! {
AgentRunPanel {
agent: "Release writer".into(),
turns: run.turns(),
queue: run.queue(),
mode: "chat".into(),
now: clock.now(),
on_action: move |(what, text)| dispatch(what, text),
}
}Classic
Classic style: the run as a white panel on a grey tray, the queue on the tray.
- Add an upgrade note for self-hosted teamsNext
Code
rsx! {
AgentRunPanel {
agent: "Release writer".into(),
turns: run.turns(),
queue: run.queue(),
now: clock.now(),
on_action: move |(what, text)| dispatch(what, text),
}
}Oxyn run controls
Extended: the run composer with a send menu (Send now, Steer, Queue) and an error state.
Code
rsx! {
RunControls {
agent: "Builder",
prompt: run.prompt.clone(),
answer: run.answer.clone(),
status: "running",
now: clock.now(),
on_action: move |(what, text)| dispatch(what, text),
}
}API reference
AgentRunPanel
| Prop | Type | Default | Description |
|---|---|---|---|
agent | String | "Release writer" | Agent name in the header. |
turnsrequired | Vec<RunTurn> | — | Turns: the first runs on its own; the rest are the replies to queued or sent messages, in order. Text: blank lines are paragraphs, `[[steer:…]]` a steer pill. |
queue | Vec<String> | Default::default() | Messages waiting in the queue at the start. |
autoplay | bool | true | Start running (`false`: idle with the empty state). |
stopped_at | Option<usize> | Default::default() | Stop the first turn at this word at the start. |
elapsed | u64 | Default::default() | How far into the first turn it starts, ms (a large value starts it done). |
mode | String | "act" | `act` or `chat`. |
permission | String | "ask" | `ask`, `auto` or `full`. |
menu_open | bool | Default::default() | Open the permissions menu at the start. |
context | f32 | 38.0 | Context in use before the run, percent. |
style | String | Default::default() | `clean`, `classic`, or empty to follow `data-cstyle`. |
nowrequired | ClockMs | — | Shared clock. |
on_action | EventHandler<(String, String)> | — | Actions: (`send` | `steer` | `queue` | `stop` | `resume` | `retry` | `dismiss` | `remove`, text). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Enter | Send when idle; steer while running |
| ⌥ Enter | Queue |
| ShiftEnter | New line |
| Esc | Stop a running stream (or close the menu) |
Accessibility
- The run is a polite log, busy while streaming; a status region reads "Release writer: Writing · steered, 1 queued".
- Mode is a radiogroup; the permissions button is aria-disabled in Chat mode with the reason in its title; the menu is a listbox.
- Reduced motion stops the caret blink and the pill and roll animations.
Motion & interaction
Timing
- Thinking 900 ms; one word per 55 ms; context grows 0.12 % per word.
- Turns and queue rows fade up 3 px over 240 ms; the steer pill pops (scale .8 → 1, 260 ms); status words blur in.
- Caret blinks 1 s steps. Reduced motion: no blink, no pops.
Responsive behaviour
- Fills its container up to 520 px; under 440 px the composer's controls wrap and the answer drops its indent.
Edge cases (spec)
Up to 520 px; under 440 px the composer's controls wrap and the answer drops its indent.
Notes for AI
- Import
AgentRunPanelfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
AgentRunPanelElinoxyn_gpui. - Props to set first:
turns,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.