Skip to content
Back

Root Cause TreePro

Why a run failed, drawn as a fault tree: guesses under OR and AND gates are checked one at a time and ruled out or confirmed, the confirmed route to the failure is highlighted, and any node opens its verdict and evidence.

oxyn add root-cause-tree

Root cause

Investigating6 hypotheses · 0 ruled out
Checkout test failedFailed · 4 of 12

4 of 12 basket totals are one cent off.

checkout.test.ts
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

  • Show how an agent works out why a run failed: the failure on top, candidate causes below joined by OR / AND gates, each checked in turn and ruled out or confirmed, with the verdict and evidence for whichever node you pick.

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

Root Cause Tree 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 root-cause-tree

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 agent works through its guesses one by one; when both halves of the AND branch hold, the route up to the failure turns violet and the other branches fade. Then it starts over.

Root cause

Investigating6 hypotheses · 0 ruled out
Checkout test failedFailed · 4 of 12

4 of 12 basket totals are one cent off.

checkout.test.ts
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

Checking

Early on: the first hypothesis spins as Checking, the rest are Not checked and the header says Investigating.

Root cause

Investigating6 hypotheses · 0 ruled out
Payment API errorsChecking

Checking this now…

payments.ts
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

Ruled out

A ruled-out guess picked: its verdict and the tool call that settled it.

Root cause

Investigating6 hypotheses · 2 ruled out
Flaky networkRuled out · 2:30

The same 4 baskets fail on every rerun, so it is not timing.

ci.yml
Tool callci.rerun ×3
run 1: 4 failed
run 2: 4 failed
run 3: 4 failed
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

Found

A root cause picked: the diff that caused it, with Retry from here and Fix it.

Root cause

6 hypotheses · 2 ruled out
Rounding moved earlierRoot cause · 3:05

Rounding now happens before tax, so 4 of the 12 baskets come out one cent low.

discount.ts
Diffsrc/discount.ts
- const net = round(subtotal * (1 - rate))
+ const net = round(subtotal) * (1 - rate)
  return net + tax(net)
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

Pending

A branch that was never needed: Not checked, dimmed off the found route.

Root cause

6 hypotheses · 2 ruled out
Stale price cacheNot checked

Not checked – the cause was found elsewhere or it is still queued.

prices.ts
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

Failure

The failure itself picked: Cause found, and what went wrong in one line.

Root cause

6 hypotheses · 2 ruled out
Checkout test failedCause found

4 of 12 basket totals are one cent off.

checkout.test.ts
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

Under 600 px the tree becomes an indented outline with the gates inline.

Root cause

6 hypotheses · 2 ruled out
Rounding moved earlierRoot cause · 3:05

Rounding now happens before tax, so 4 of the 12 baskets come out one cent low.

discount.ts
Diffsrc/discount.ts
- const net = round(subtotal * (1 - rate))
+ const net = round(subtotal) * (1 - rate)
  return net + tax(net)
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: one framed card with a header band and squarer nodes.

Root cause

6 hypotheses · 2 ruled out
Rounding moved earlierRoot cause · 3:05

Rounding now happens before tax, so 4 of the 12 baskets come out one cent low.

discount.ts
Diffsrc/discount.ts
- const net = round(subtotal * (1 - rate))
+ const net = round(subtotal) * (1 - rate)
  return net + tax(net)
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

RootCauseTree

PropTypeDefaultDescription
failureOption<RcNode>Default::default()The failure with its hypotheses (the demo's when `None`).
atOption<u32>Default::default()Run seconds; `None` plays the demo (looping).
selectedOption<String>Default::default()The node whose evidence shows from the start (the newest checked one when `None`).
titleString"Root cause"Heading.
nowrequiredClockMs—The clock (drives the demo).
styleStringDefault::default()`clean`, `classic`, or empty to follow `data-cstyle`.
on_selectEventHandler<String>—A node was picked (id).
on_retryEventHandler<String>—"Retry from here" on a root cause (its id).
on_fixEventHandler<String>—"Fix it" on a root cause (its id).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabInto the tree, then the evidence buttons
←or→or↑or↓Previous or next node, depth first
HomeorEndThe failure, or the last hypothesis

Accessibility

  • The tree is role=tree; every node is a treeitem button with its level, selection and status in its name.
  • Status is always in words (Ruled out, Confirmed, Root cause), never colour alone; the counts are a status region.
  • Reduced motion stops the spinner, the fades and the scale-in.

Responsive behaviour

  • Wide: a top-down tree, cards 124 px, gates between levels and elbows joining siblings.
  • Under 600 px: an indented outline, full-width cards, the evidence below.
Edge cases (spec)

Wide: a top-down tree centred in the width (scrolls sideways if a very wide tree does not fit). Under 600 px (container query) it becomes an indented outline: full-width cards, gate chips inline, left rails for the connectors.

Notes for AI

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