Skip to content

refactor(shell): make the statistics panel readable instead of technical - #50

Open
efirvida wants to merge 1 commit into
upstream/statistics-21-overlay-testsfrom
upstream/statistics-22-panel-readability
Open

efirvida wants to merge 1 commit into
upstream/statistics-21-overlay-testsfrom
upstream/statistics-22-panel-readability

Conversation

@efirvida

@efirvida efirvida commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Chain Context

Field Value
Chain per-session statistics module (upstream Gentleman-Programming#1583)
Tracker upstream/statistics-tracker → upstream integration PR Gentleman-Programming#1627 (draft)
Position 22 of 27
Base upstream/statistics-21-overlay-tests
Depends on #49
Follow-up upstream/statistics-22-panel-readability (slice 23)
Review budget 219 / 400
Starts at upstream/statistics-21-overlay-tests
Ends with refactor(shell): make the statistics panel readable instead of technical

Chain Overview

upstream/main
 └── upstream/statistics-tracker (root, integration PR #1627)
      └── … slices 1..21 … (##49 is the immediate parent)
           └── 📍 upstream/statistics-22-panel-readability
                └── … slices 23..27 …

Scope

  • Includes: refactor(shell): make the statistics panel readable instead of technical
  • Excludes: every other slice. A polluted diff against upstream/statistics-21-overlay-tests is a branching bug, not a scope surprise.

Verification

Focused and affected suites are green on this slice; tests and docs for this unit ship with it.

The first panel was a data dump: `[measured]` on every row, the raw task id
where the agent role belongs, nine-digit token counts, and an efficiency line
that silently truncated. Rework it for a human.

- Readable magnitudes: tokens render as 122.8M / 7.8K, and a cost as $0.82 or
  $0.0012 by size, instead of 122803929 and six decimals.
- No raw ids: a helper row shows the agent role and its task label (the task id
  stays a key, never a label), and a model row shows the model with the
  provider as a dimmed suffix.
- Provenance as one marker plus a footer legend (`measured unless + partial ·
  n/a unavailable`) instead of a bracket on every figure.
- The efficiency ratios wrap into lines that fit, so no label is ever
  truncated; `n/a` still marks an unavailable value, never 0.
- Friendlier section names ("Helpers") and a compact time split.

Pure model and renderer unchanged in contract: `buildStatisticsModel`,
`renderStatistics` and `StatisticsView` keep their shape, and the overlay still
renders a cached model it never recomputes per frame.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant