AI insight cardPro
A metric tile that can tell you why it moved: ask it and a short write-up appears word by word, the main causes line up with signed bars, numbered pins drop onto the trend line as each cause is mentioned, and suggested next questions swap the answer in place.
oxyn add ai-insight-cardWeekly active teams · Last 12 weeks
1,284+16.5%vs 1,102 the 12 weeks before
- This period
- 12 weeks before
Active teams
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 KPI card that explains its own change: why it moved, which drivers mattered and the next question to ask.
When not to use
- Sit in on a crew of agents mid-run: use Live Session instead.
- One overview for a whole fleet: use Fleet overview instead.
- The fleet overview laid out against time: use Fleet timeline instead.
Installation
AI insight card 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 ai-insight-cardUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Explain
Explains on open.
Weekly active teams · Last 12 weeks
1,284+16.5%vs 1,102 the 12 weeks before
- This period
- 12 weeks before
Active teams
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Idle
Waiting for Explain, no previous line (Oxyn extra).
Weekly active teams · Last 12 weeks
1,284+16.5%vs 1,102 the 12 weeks before
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Error
The first answer fails, with Retry (Oxyn extra).
Weekly active teams · Last 12 weeks
1,284+16.5%vs 1,102 the 12 weeks before
- This period
- 12 weeks before
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
AiInsightCard
| Prop | Type | Default | Description |
|---|---|---|---|
nowrequired | ClockMs | — | Host clock. |
auto_play | bool | true | Start explaining at once. |
fail | bool | Default::default() | The first answer fails (error scenario). |
previous | bool | true | Show the previous period's line. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | The ask button, the trend line, then the suggested questions |
| ←or→orHomeorEnd | On the trend line, hear week by week |
| Esc | Hide the week readout |
Accessibility
- The ask button reports whether the write-up is shown; start, stop and failure are read out.
- Changes show + or − with the colour; causes not yet reached are skipped by screen readers.
- Suggested questions are toggle buttons, inactive while text is still arriving.
From the spec
Explain has aria-expanded and aria-controls; the chart is a focusable group read point by point with the arrow keys; deltas carry a sign as well as colour; unread drivers are hidden from assistive technology; follow-ups use aria-pressed. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.
Motion & interaction
Words stream in; when the answer reaches a driver its numbered marker lights up on the sparkline and its bar grows; follow-up chips swap the answer in place.
Timing
Everything on screen is derived from the host clock now (no timers in the block), so playback, tests and the GPUI view agree.
| Transition | Duration | Easing |
|---|---|---|
| Stream | 2 words per 34 ms tick | linear |
| Driver bar | 400 ms | ease-out |
Reduced motion: shimmer, pulses and slides stop; every state keeps its words and icons.
Responsive behaviour
- Up to 600 px; below 460 px the legend hides and the bars shorten.
Edge cases (spec)
Up to 600 px; below 460 px the legend hides and driver bars shorten; the chart redraws at the card width. Layout follows the block's own width (container queries), never the viewport. Checked at 1440, 768 and 390 px in light and dark with no text overlap. Chrome is monochrome grey; colour is semantic only (success, warning, danger, info) plus data series and the official coloured brand and model marks.
Notes for AI
- Import
AiInsightCardfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
BlocksViewinoxyn_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.