Skip to content

Context tidePro

An Oxyn original: a tall glass whose water is the used share, with marks at 75 % and at the compaction line; turns raise it and Compact drains it.

oxyn add context-tide
75
92
Context83%166.4K of 200K tokens≈ 2 turns before it compacts

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

  • A calm, glanceable fill gauge for a sidebar: how high the water is and how many turns are left before it compacts.

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.
  • What fills the window as a list of kinds with their share: use Context breakdown instead.
  • An Oxyn original: use Context stack instead.

Installation

Context tide 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-tide

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

Default

Water at 83 %, amber above the 75 mark; send turns to raise it, and at the red line it drains on its own.

75
92
Context83%166.4K of 200K tokens≈ 2 turns before it compacts

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

Quiet

Grey water all the way up: no amber or red.

75
92
Context83%166.4K of 200K tokens≈ 2 turns before it compacts

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

Big turns

Twelve-thousand-token turns: the next one compacts.

75
92
Context83%166.4K of 200K tokens≈ 1 turn before it compacts

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

ContextTide

PropTypeDefaultDescription
partsOption<Vec<CtxPart>>Default::default()The parts (the demo window when `None`).
limitu32200_000Window size in tokens.
autou3292Auto-compact threshold in percent.
per_turnu326_000Tokens one turn adds.
tintbooltrueAmber and red water as it fills.
on_changeEventHandler<u32>—The used tokens changed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabSend a turn, Compact, Reset

Accessibility

  • The glass is a meter (aria-valuenow is the percent, the value text the tokens).
  • Turns left before compaction are written next to it; changes are said in a status line.

Responsive behaviour

  • 340 px card; glass and text side by side down to 300 px.
Edge cases (spec)

340 px card; glass and text side by side.

Notes for AI

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