feat(gain): colored dashboard with efficiency meter and impact bars#129
Merged
pszymkowiak merged 2 commits intortk-ai:masterfrom Feb 15, 2026
Merged
feat(gain): colored dashboard with efficiency meter and impact bars#129pszymkowiak merged 2 commits intortk-ai:masterfrom
pszymkowiak merged 2 commits intortk-ai:masterfrom
Conversation
Upgrade `rtk gain` output with rich terminal visualization: - Colored percentage cells (green ≥70%, yellow ≥40%, red <40%) - Efficiency meter: ASCII progress bar with savings percentage - Impact bars: proportional block charts per command - Styled section headers (bold green) - Command names in bright cyan - History tier indicators (▲/■/•) - Dynamic column widths for clean table alignment - KPI-style key-value layout for summary metrics All visual features are TTY-aware via std::io::IsTerminal — output degrades gracefully to plain text when piped or redirected. No new dependencies (uses existing `colored` crate). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shows colored terminal output of `rtk gain -p` with: - Project-scoped token savings header - Efficiency meter with color gradient - Per-command table with colored Avg% and Impact bars Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pszymkowiak
approved these changes
Feb 15, 2026
Collaborator
pszymkowiak
left a comment
There was a problem hiding this comment.
Display-only changes, no security concern, all tests pass. LGTM.
Minor nit: std::io::stdout().is_terminal() is called per-cell instead of once at the top — not blocking but worth cleaning up later. Also remove the // added comments before merge.
4 tasks
ahundt
added a commit
to ahundt/rtk
that referenced
this pull request
Feb 16, 2026
Merged from upstream/master: - feat(gain): colored dashboard with efficiency meter and impact bars (rtk-ai#129) - refactor(init): add upsert_rtk_block for idempotent CLAUDE.md management (rtk-ai#123) - feat(cargo): add cargo nextest support with failures-only output (rtk-ai#107) - docs: version references to 0.16.0/0.18.0 in README, ARCHITECTURE, CHANGELOG - ci: add validate-docs workflow Conflict resolution in src/init.rs: - Kept RtkBlockUpsert enum and upsert_rtk_block() from upstream - Kept patch_instruction_file() from current branch (for @RTK.md references) - Both features coexist: upsert_rtk_block for legacy --claude-md mode, patch_instruction_file for default @RTK.md reference mode All 688 tests pass.
ahundt
added a commit
to ahundt/rtk
that referenced
this pull request
Feb 23, 2026
Merged from upstream/master: - feat(gain): colored dashboard with efficiency meter and impact bars (rtk-ai#129) - refactor(init): add upsert_rtk_block for idempotent CLAUDE.md management (rtk-ai#123) - feat(cargo): add cargo nextest support with failures-only output (rtk-ai#107) - docs: version references to 0.16.0/0.18.0 in README, ARCHITECTURE, CHANGELOG - ci: add validate-docs workflow Conflict resolution in src/init.rs: - Kept RtkBlockUpsert enum and upsert_rtk_block() from upstream - Kept patch_instruction_file() from current branch (for @RTK.md references) - Both features coexist: upsert_rtk_block for legacy --claude-md mode, patch_instruction_file for default @RTK.md reference mode All 688 tests pass.
ahundt
pushed a commit
to ahundt/rtk
that referenced
this pull request
Feb 23, 2026
…tk-ai#129) * feat(gain): add colored dashboard with efficiency meter and impact bars Upgrade `rtk gain` output with rich terminal visualization: - Colored percentage cells (green ≥70%, yellow ≥40%, red <40%) - Efficiency meter: ASCII progress bar with savings percentage - Impact bars: proportional block charts per command - Styled section headers (bold green) - Command names in bright cyan - History tier indicators (▲/■/•) - Dynamic column widths for clean table alignment - KPI-style key-value layout for summary metrics All visual features are TTY-aware via std::io::IsTerminal — output degrades gracefully to plain text when piped or redirected. No new dependencies (uses existing `colored` crate). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add dashboard visualization screenshot Shows colored terminal output of `rtk gain -p` with: - Project-scoped token savings header - Efficiency meter with color gradient - Per-command table with colored Avg% and Impact bars Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades
rtk gaintext output with rich terminal visualization — colored percentages, efficiency meter, impact bars, and styled headers. All features degrade gracefully to plain text when piped.Before: Plain monochrome text with fixed-width columns.
After: Color-coded dashboard with visual metrics:
Visual features visible in screenshot:
Implementation Details
Visual Features Added
████░░░░with %█░per command▲≥70%,■≥40%,•<40%TTY Detection
All colored output uses
std::io::IsTerminalto detect whether stdout is a terminal:coloredcrateFiles Changed
src/gain.rsTotal: 205 lines added, 42 lines modified (single file)
No New Dependencies
Uses the existing
coloredcrate (already in Cargo.toml) andstd::io::IsTerminal(stable since Rust 1.70).Security Compliance
src/gain.rs(display-only module)Verification
cargo build— compiles cleancargo clippy— no errorscargo test— all pre-existing tests passcargo fmt— formatted🤖 Generated with Claude Code