Expand description
Terminal rendering — colored, boxed, chart-y read-outs (host-side DX).
This is the “nice read-out on the terminal” layer. It consumes the plain
data types from crate::report / crate::harness and renders them
with color (via the console crate, which auto-detects a tty and honours
NO_COLOR), unicode frames, grade badges, sparklines, and bar charts. The
data modules stay free of presentation concerns; all of that lives here.
Every renderer takes an explicit color: bool so output is deterministic
and testable (pass false for plain text). colors_on is the sensible
default a CLI computes once.
Functions§
- bar
- A horizontal bar for
frac∈ [0,1] of the given character width. - boxed
- Frame
bodylines in a rounded unicode box undertitle. Padding usesconsole::measure_text_widthso embedded ANSI color codes don’t skew the alignment. - colors_
on - Whether color should be used by default on this host (tty + not
NO_COLOR). - grade_
badge - A one-token grade badge, e.g.
ECS-L/— below floor, colored by tier. - grade_
short - A compact, fixed-width-friendly grade label (
ECS-L/—) colored by tier — for table cells where— below floorwould break the column. - render_
corpus_ summary - Render the corpus roll-up line block.
- render_
leaderboard - Render a ranked leaderboard table (grade-first ordering already applied by
the caller via
crate::report::leaderboarddata, but this colors it). - render_
report - Render one report as a colored, boxed read-out with a per-band R sparkline.
- sparkline
- A unicode sparkline of
valsmapped onto their own min–max range.