Skip to content
Back

Attempt racePro

One task tried several ways at once: every attempt races as a row with its model, approach and a live bar, finishes with a score, and the best one is marked and used – switch to another if you prefer.

oxyn add attempt-race

Best of 3

Steady the flaky payment test0 of 3 done$0.02
Opus 4.1 · Retry the request with backoffReading payment.spec.ts3%$0.006
GPT-5 · Stub the payment gatewayReading payment.spec.ts3%$0.007
Gemini 2.5 Pro · Wait for the network to settleReading payment.spec.ts3%$0.003
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

  • One task tried several ways at once.
  • Every attempt races as a row; when they finish, the highest score is marked Best and used, and you can switch to another attempt.

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

Attempt race 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 attempt-race

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

Live

The race plays and loops: bars grow with a shine, the step under each name changes, cost counts up; then scores land, the best is marked and used.

Best of 3

Steady the flaky payment test0 of 3 done$0.02
Opus 4.1 · Retry the request with backoffReading payment.spec.ts3%$0.006
GPT-5 · Stub the payment gatewayReading payment.spec.ts3%$0.007
Gemini 2.5 Pro · Wait for the network to settleReading payment.spec.ts3%$0.003
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

Start

Just started: every bar at a sliver, no scores, nothing to pick yet.

Best of 3

Steady the flaky payment test0 of 3 done$0.02
Opus 4.1 · Retry the request with backoffReading payment.spec.ts3%$0.006
GPT-5 · Stub the payment gatewayReading payment.spec.ts3%$0.007
Gemini 2.5 Pro · Wait for the network to settleReading payment.spec.ts3%$0.003
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

Running

Mid-race: one attempt has already failed where it stopped; the others are still going.

Best of 3

Steady the flaky payment test0 of 3 done$0.30
Opus 4.1 · Retry the request with backoffAdding the retry34%$0.10
GPT-5 · Stub the payment gatewayWriting the stub41%$0.13
Gemini 2.5 Pro · Wait for the network to settleAdding the waits31%$0.07
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

Done

Finished: the best score gets the Best tag, a green bar and a soft green wash; the failure stays dimmed.

Best of 3

Steady the flaky payment test3 of 3 done$0.76
Opus 4.1 · Retry the request with backoffPasses 19 of 20 runs · slower by 1.1s782m 31s · $0.29
GPT-5 · Stub the payment gateway20 of 20 runs pass · no extra timeBest942m 08s · $0.33
Gemini 2.5 Pro · Wait for the network to settleStill flaky – 4 of 20 runs failFailed1m 36s · $0.14
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

Own pick

Your own pick: the lower-scoring attempt is in use, the best keeps its tag and offers Use this one.

Best of 3

Steady the flaky payment test3 of 3 done$0.76
Opus 4.1 · Retry the request with backoffPasses 19 of 20 runs · slower by 1.1s782m 31s · $0.29
GPT-5 · Stub the payment gateway20 of 20 runs pass · no extra timeBest942m 08s · $0.33
Gemini 2.5 Pro · Wait for the network to settleStill flaky – 4 of 20 runs failFailed1m 36s · $0.14
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

Best of 5

Best of 5 with more models and approaches.

Best of 5

Steady the flaky payment test5 of 5 done$1.38
Opus 4.1 · Retry the request with backoffPasses 19 of 20 runs · slower by 1.1s782m 31s · $0.29
GPT-5 · Stub the payment gateway20 of 20 runs pass · no extra timeBest942m 08s · $0.33
Gemini 2.5 Pro · Wait for the network to settleStill flaky – 4 of 20 runs failFailed1m 36s · $0.14
Grok 4 · Mock the clock18 of 20 runs pass712m 31s · $0.29
Mistral Large · Pin the test data20 of 20 runs pass · touches 6 files862m 08s · $0.33
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

Narrow

Below 560 px each progress bar drops to its own line and the approach is hidden.

Best of 3

Steady the flaky payment test3 of 3 done$0.76
Opus 4.1 · Retry the request with backoffPasses 19 of 20 runs · slower by 1.1s782m 31s · $0.29
GPT-5 · Stub the payment gateway20 of 20 runs pass · no extra timeBest942m 08s · $0.33
Gemini 2.5 Pro · Wait for the network to settleStill flaky – 4 of 20 runs failFailed1m 36s · $0.14
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

Classic

Classic style: header band, rows joined in one framed list, a green edge on the one in use.

Best of 3

Steady the flaky payment test3 of 3 done$0.76
Opus 4.1 · Retry the request with backoffPasses 19 of 20 runs · slower by 1.1s782m 31s · $0.29
GPT-5 · Stub the payment gateway20 of 20 runs pass · no extra timeBest942m 08s · $0.33
Gemini 2.5 Pro · Wait for the network to settleStill flaky – 4 of 20 runs failFailed1m 36s · $0.14
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

AttemptRace

PropTypeDefaultDescription
attemptsOption<Vec<PaAttempt>>Default::default()Attempts as they stand (controlled). When `None` the demo race plays from `scripts`.
scriptsOption<Vec<PaScript>>Default::default()The scripted race for live demos (the built-in one when `None`).
liveboolDefault::default()Demo: loop the race; otherwise it shows the end.
taskString"Steady the flaky payment test"The task.
titleStringDefault::default()Heading; "Best of N" when empty.
pickedOption<String>Default::default()The attempt in use (controlled); the best one when `None`.
nowrequiredClockMs—The clock.
styleStringDefault::default()`clean`, `classic`, or empty to follow `data-cstyle`.
on_pickEventHandler<String>—An attempt was picked (its id).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabMoves between the finished attempts' Use buttons
EnterorSpaceUses the focused attempt

Accessibility

  • The rows form a radiogroup labelled by the heading; a finished attempt's Use control is a radio whose name gives the model and its score.
  • Bars are decorative; progress, failure and score are all in text.
  • Reduced motion drops the stagger, the shine and the glides.

Responsive behaviour

  • Wide: tile, name and approach, bar, score and the use button in one line.
  • Under 560 px the bar goes under the name, the approach and the task drop out.
Edge cases (spec)

Container query: under 560 px the bar drops under the name, the approach and the task hide, the score sits beside the name and Use moves to its own line.

Notes for AI

  • Import AttemptRace from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: AttemptRaceEl in oxyn_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.

Guides

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