Skip to content
Back

Context breakdownPro

What fills the window as a list of kinds with their share; open one to see its files, tools or turns and unload what you do not need.

oxyn add context-breakdown
Context166.4K of 200K tokens
83%
    • billing/invoice.rs14.6K
    • api/routes.ts11.2K
    • README.md6.9K
    • schema.sql5.5K

About 2 turns before it compacts at 92 %.

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

  • Answer "what exactly is in there" and let the user unload a file or tool to give room back.

When not to use

  • The context window as one stacked bar or a field of dots, with a legend that lights each kind and a Compact / Undo button: use Context bar instead.
  • An Oxyn original: use Context stack instead.
  • An Oxyn original: use Context tide instead.

Installation

Context breakdown 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 context-breakdown

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

Files open

Files opened: each file with its tokens and an Unload button that gives the room back.

Context166.4K of 200K tokens
83%
    • billing/invoice.rs14.6K
    • api/routes.ts11.2K
    • README.md6.9K
    • schema.sql5.5K

About 2 turns before it compacts at 92 %.

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

Load order

Kinds in the order they load – system first, chat last – instead of by size.

Context166.4K of 200K tokens
83%

About 2 turns before it compacts at 92 %.

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

Read only

No Unload buttons: a breakdown to read, monochrome.

Context166.4K of 200K tokens
83%
    • Turns 1–1241.2K
    • Turns 13–2433.8K
    • Turns 25–3121.4K

About 2 turns before it compacts at 92 %.

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

ContextBreakdown

PropTypeDefaultDescription
partsOption<Vec<CtxPart>>Default::default()The parts (the demo window when `None`).
limitu32200_000Window size in tokens.
autou3292Auto-compact threshold in percent.
default_openOption<usize>Default::default()Starts with this kind open.
default_sortString"size"`size` (largest first) or `load` (load order).
droppablebooltrueFiles and tools get an Unload button.
monoboolDefault::default()Greys instead of kind colours.
on_dropEventHandler<(usize, usize)>—An item was unloaded: (part index, item index) in the parts as given.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabOrder switch, each kind, then its Unload buttons
EnterorSpace on a kindOpens or closes it

Accessibility

  • Each kind is a button with aria-expanded; its items are a list under it.
  • The fill pill is text (83%) and turns amber when high and red at the compaction line – the colour is extra.
  • Unloading says what was freed in a status line.

Responsive behaviour

  • 360 px card; the share bar flexes and names never wrap.
Edge cases (spec)

360 px card; the share bar flexes, names never wrap.

Notes for AI

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