Skip to content

Use tonal pairs for cached token bands - #1130

Merged
edwin-zvs merged 2 commits into
mainfrom
fix-token-meter-tonal-cache
Aug 1, 2026
Merged

Use tonal pairs for cached token bands#1130
edwin-zvs merged 2 commits into
mainfrom
fix-token-meter-tonal-cache

Conversation

@edwin-zvs

@edwin-zvs edwin-zvs commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • render cached and fresh token usage as solid same-hue tones instead of mixed-density glyphs
  • preserve both parts when their boundary shares a terminal cell, eliminating false three-section bars
  • keep the original single-dot legend shape, with a darker dot and brighter same-hue model text
  • keep tonal pairs distinct after ANSI 256/16 quantization
  • update the fleet token-meter design spec to record the tonal-pair semantics

Testing

  • env -u NO_COLOR TERM=xterm-256color COLORTERM=truecolor cargo test -p construct-cli (1311 unit tests + reconnect integration test passed)
  • cargo test -p construct-cli legend (12 passed after legend follow-up)
  • cargo test -p construct-cli cached (14 passed after legend follow-up)
  • cargo build
  • git diff --check
  • deterministic before/after VHS recording, visually verified at midpoint

@edwin-zvs

Copy link
Copy Markdown
Contributor Author

Visual comparison

Before

After

@edwin-zvs

edwin-zvs commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Visual comparison

Before

token-meter-before.mp4

After

token-meter-after.mp4

@edwin-zvs

edwin-zvs commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Updated after recording: single darker legend dots with brighter same-hue labels.

token-meter-after.mp4

@edwin-zvs
edwin-zvs merged commit 687c908 into main Aug 1, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the fix-token-meter-tonal-cache branch August 1, 2026 22:52
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