Expand description
Purpose: Render token telemetry as package-backed terminal dashboards.
StructsΒ§
- Atlas
Layout π - Deterministic centered layout for the small resolved-relation projection.
- Atlas
Node πPlacement - One force-settled node placement with graph-derived depth and cluster cues.
- Atlas
Preview πEdge - One real resolved relation retained by the bounded atlas preview.
- Cell
Ansi πStyle - Minimal style projection used by the ANSI serializer.
- Modeled
Source πGroup - Real modeled source bucket aggregated for display.
- Savings
Source πRow - One visible aggregate row for savings-source telemetry.
- Theme
Palette π - Semantic color palette used when serializing Ratatui cells to ANSI.
- Token
Atlas πPreview - Bounded, non-interactive projection of resolved relations from the active project database.
- Token
Mix π - Signed and absolute token operands shown in the composition panel.
EnumsΒ§
- Token
Dashboard πTheme - Human token dashboard color mode.
ConstantsΒ§
- ACTIVE_
TOKEN_ πTHEME - Active token dashboard theme for the current render pass.
- ATLAS_
CANVAS_ πX_ BOUND - Horizontal Canvas bound retaining a margin inside the atlas panel.
- ATLAS_
CANVAS_ πY_ BOUND - Vertical Canvas bound retaining a margin above the atlas footer.
- ATLAS_
DASHBOARD_ πMIN_ WIDTH - Width at which the human dashboard can show the atlas without crowding impact data.
- ATLAS_
LAYOUT_ πIDEAL_ DISTANCE - Ideal graph-space edge length for the bounded force layout.
- ATLAS_
LAYOUT_ πINITIAL_ TEMPERATURE - Maximum per-step node movement before deterministic cooling.
- ATLAS_
LAYOUT_ πITERATIONS - Fixed force steps keep the bounded static preview deterministic and fast.
- ATLAS_
NODE_ πHALO_ DEGREE - Degree at which a node receives a small depth halo instead of a single point.
- ATLAS_
PREVIEW_ πMAX_ EDGES - Maximum real resolved links retained by the decorative atlas preview.
- ATLAS_
PREVIEW_ πMAX_ NODES - Maximum real resolved nodes retained by the decorative atlas preview.
- ATLAS_
PREVIEW_ πMAX_ NODE_ DEGREE - Maximum links one visual hub may consume in the decorative preview.
- DASHBOARD_
HEIGHT π - Fixed terminal height for the token overview dashboard snapshot.
- DASHBOARD_
MAX_ πWIDTH - Maximum human dashboard width.
- LIGHT_
THEME π - Light terminal palette preserving the same semantic color roles.
- THEME_
BAR_ πEMPTY - Token dashboard inactive bar cells.
- THEME_
BG π - Reserved terminal-canvas color; overview frames leave the shell background visible.
- THEME_
BLUE π - Counterfactual/original-baseline blue.
- THEME_
BORDER π - Token dashboard subtle warm panel border.
- THEME_
GREEN π - Net saved/success green.
- THEME_
INK_ πWHITE - Token dashboard identity ivory.
- THEME_
MUTED π - Token dashboard muted label text.
- THEME_
PANEL π - Token dashboard panel background.
- THEME_
PURPLE π - Repository-graph test and route accent.
- THEME_
RED π - Token dashboard loss red.
- THEME_
TEXT π - Token dashboard primary warm text.
- THEME_
YELLOW π - Modeled/search/estimate yellow.
- TOKEN_
IMPACT_ πCOLUMN_ WIDTH - Stable width reserved for the token-impact column in the wide dashboard.
- TREND_
DASHBOARD_ πHEIGHT - Fixed terminal height for the token trend dashboard snapshot.
FunctionsΒ§
- active_
token_ πtheme - Return the active token dashboard theme.
- allocate_
signed_ πtotal - Allocate a signed display total across real source groups and preserve the exact sum.
- atlas_
cluster_ πcolor - Map graph-derived first-hop branches to the stable dashboard accent palette.
- atlas_
layout π - Settle one connected graph with the reusable force engine and center its strongest hub.
- block_
bar π - Return a segmented bar matching the reference dashboard.
- body_
style π - Body text style.
- buffer_
to_ πansi_ string - Convert a Ratatui buffer into ANSI-styled terminal text.
- buffer_
to_ πstring - Convert a Ratatui buffer into trimmed terminal text.
- center_
symbol π - Return a centered operator paragraph.
- color_
to_ πansi - Convert one Ratatui color into foreground/background ANSI code.
- composition_
line π - Return one composition row with a compact bar.
- current_
clock_ πlabel - Return a compact clock label for the footer status row.
- dashboard_
width π - Return the preferred dashboard width.
- file_
handling_ πtoken_ mix - Return the token operands that back the composition panel.
- grouped_
count π - Format an unsigned count with thousands separators.
- header_
style π - Header style used for panel titles.
- hero_
state_ πmarker - Return the semantic marker used beside the saved-token headline.
- hero_
value_ πstyle - Large positive/negative hero value style.
- identity_
style π - Identity label style.
- identity_
title_ πstyle ProjectAtlastitle identity style.- impact_
bar_ πline - Return one labeled, exact ratio and its proportional block bar.
- is_
observed_ πsource_ bucket - Whether a bucket represents observed
ProjectAtlasfile handling. - label π
- Styled field label span.
- modeled_
group_ πindex - Pick the reference-style source row for one modeled bucket.
- modeled_
source_ πgroups - Return modeled source rows backed by actual telemetry buckets.
- muted_
bold_ πstyle - Muted bold label style.
- muted_
style π - Muted text style.
- observed_
source_ πsteps - Return observed source steps from real observed buckets, with legacy fallback.
- panel π
- Return a screenshot-matched dashboard panel.
- percentage_
label π - Format one part of a whole as a nearest integer percentage.
- percentage_
one_ πdecimal - Format a percentage with one decimal place.
- rate_
label π - Format an optional savings rate.
- ratio π
- Return a stable ratio for Ratatui gauges.
- reconciled_
without_ πprojectatlas - Return the screenshot heroβs reconciled conservative baseline operand.
- reference_
title π - Return the reference-like spaced title treatment used for dominant section labels.
- remap_
to_ πlight_ theme - Convert one dark semantic role color into its light-theme counterpart.
- render_
atlas_ πmap - Draw the bounded live repository constellation in the wide dashboard column.
- render_
atlas_ πmessage - Draw an explicit centered atlas state without substituting decorative data.
- render_
avoided_ πnavigation_ card - Draw the reference-style avoided navigation-work strip.
- render_
calibration_ πnotes - Draw calibration notes without duplicating headline totals.
- render_
composition_ πand_ signal - Draw the side-by-side composition and signal cards.
- render_
dashboard_ πto_ ansi_ string - Render one Ratatui frame into a deterministic ANSI terminal buffer.
- render_
dashboard_ πto_ string - Render one Ratatui frame into a deterministic plain string buffer.
- render_
divider π - Render a horizontal divider in a panel.
- render_
file_ πread_ impact_ row - Draw the source-reconciled file-read total and its observed/modeled split.
- render_
file_ πread_ total - Draw the left file-read total with the reference document-icon hierarchy.
- render_
hero_ πvalue - Draw the saved-token headline as readable terminal text.
- render_
impact_ πmetric - Draw one file-read component with its exact share of the reconciled total.
- render_
metric_ πcolumn - Draw one metric operand in the hero equation.
- render_
overview_ πframe - Draw the full overview dashboard frame.
- render_
overview_ πframe_ with_ atlas - Draw the overview and, when requested and wide enough, its static live atlas.
- render_
overview_ πmain - Draw the proven one-screen savings overview.
- render_
savings_ πbreakdown_ table - Draw the screenshot-style source table.
- render_
savings_ πcomposition - Draw observed-vs-modeled token composition.
- render_
signal_ πcard - Draw signal metadata from the reference dashboard.
- render_
status_ πbar - Draw the compact footer/status row from the reference dashboard.
- render_
token_ πdashboard_ plain_ with_ theme - Render the token overview as a plain terminal chart for agent payloads.
- render_
token_ πdashboard_ with_ atlas - Render the human token dashboard with its optional bounded live atlas.
- render_
token_ πheader - Draw the title band.
- render_
token_ πhero - Draw the dominant saved-token hero panel.
- render_
token_ πtrend_ dashboard_ plain_ with_ theme - Render token trends as a plain terminal chart for agent payloads.
- render_
token_ πtrend_ dashboard_ with_ theme - Render token trends as a human terminal dashboard with the selected theme.
- render_
trend_ πframe - Draw the full trend dashboard frame.
- render_
trend_ πtable - Draw period rows for the trend dashboard.
- render_
vertical_ πseparator - Render a vertical separator in a panel.
- render_
window_ πtitle_ bar - Draw the reference-style app title bar and window controls.
- resolve_
dashboard_ πwidth - Resolve an explicit dashboard width before using the detected terminal width.
- savings_
source_ πrows_ for_ width - Aggregate visible accounting with screenshot-aligned labels.
- section_
title_ πstyle - Section title style used for dashboard chrome.
- settle_
atlas_ πlayout - Settle the tiny deterministic preview with bounded Fruchterman-Reingold steps.
- signed_
color π - Return the color for a signed value.
- signed_
count π - Format a signed count with thousands separators.
- signed_
trend_ πcolor - Return a trend color that signals all-loss or mixed-sign series.
- signed_
trend_ πpoints - Convert trend periods into signed chart coordinates.
- signed_
y_ πbounds - Return y-axis bounds that preserve the sign of trend values and include zero.
- split_
signed_ πby_ ratio - Split a signed value by a simple integer ratio.
- themed_
color π - Remap the dark reference palette to the selected output palette.
- token_
atlas_ πnetwork_ relation - Return whether a relation belongs in the cross-entity atlas network.
- token_
dashboard_ πwants_ atlas - Return whether the current terminal is wide enough for the optional atlas read.
- token_
title_ πstyle - Token Impact title style.
- usize_
to_ πisize_ saturating - Convert a
usizetoisizewithout panicking on unusually large values. - value π
- Styled unsigned value span.
- with_
token_ πtheme - Run one render closure with the selected token dashboard theme.