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-tideThe 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 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.
oxyn add context-tideUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
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.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Quiet
Grey water all the way up: no amber or red.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Big turns
Twelve-thousand-token turns: the next one compacts.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
ContextTide
| Prop | Type | Default | Description |
|---|---|---|---|
parts | Option<Vec<CtxPart>> | Default::default() | The parts (the demo window when `None`). |
limit | u32 | 200_000 | Window size in tokens. |
auto | u32 | 92 | Auto-compact threshold in percent. |
per_turn | u32 | 6_000 | Tokens one turn adds. |
tint | bool | true | Amber and red water as it fills. |
on_change | EventHandler<u32> | — | The used tokens changed. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Send 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
ContextTidefromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
ContextTideElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.