Skip to content

NextPolish header + breakdown rendering, hide synthetic model#1

Merged
e-margot merged 3 commits into
mainfrom
next
May 22, 2026
Merged

NextPolish header + breakdown rendering, hide synthetic model#1
e-margot merged 3 commits into
mainfrom
next

Conversation

@e-margot
Copy link
Copy Markdown
Contributor

@e-margot e-margot commented May 22, 2026

Summary

  • Show codestrain __version__ dim'd next to the tagline so users can spot stale installs at a glance.
  • Fix per-project breakdown alignment — pad columns by visible width before applying ANSI colour, so durations/turns/costs no longer drift left.
  • Filter Claude Code's <synthetic> marker out of the Models row (cached errors / no-response slash commands / interrupted turns). Token and turn counts still include those events.

Test plan

  • codestrain — version appears next to tagline
  • codestrain on a multi-project day — breakdown columns line up cleanly
  • Session with interrupted/cached turns — <synthetic> no longer appears in Models row, but token/turn totals unchanged

e-margot added 3 commits May 21, 2026 18:20
Adds a `__version__` constant and prints it dim'd next to the tagline so
users can tell at a glance which release they're actually running — the
quickest path to diagnosing "my numbers look wrong" reports caused by an
out-of-date install (e.g. a Homebrew tap clone that hasn't refreshed).
The per-project breakdown rendered jagged because `f"{coloured:<36}"`
counted invisible ANSI escapes toward the field width — the actual visible
text never reached the spec, so the padding was a no-op and durations /
turns / costs all drifted left of where they should sit.

Pre-compute each column's width from the raw text, pad with ljust/rjust
before applying colour, then render. Columns now line up exactly.
`<synthetic>` is Claude Code's marker for events it fabricates locally —
cached API errors, no-response slash commands, interrupted turns. It's
not a real model, but it was being listed alongside claude-opus / sonnet
in the Models row, which read as "you used some weird model called
synthetic". Filter it out at render time; token and turn counts still
include those events.
@e-margot e-margot merged commit 16276d1 into main May 22, 2026
20 checks passed
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