# fix\(costs\): show measured zero amounts in recent history rows \(\#274\) · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/commit/0c2018bab7a4db073eed334dda374ac2863752ce)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

Requested revision: 0c2018bab7a4db073eed334dda374ac2863752ce

Requested commit: 0c2018bab7a4db073eed334dda374ac2863752ce

Commit: 0c2018bab7a4db073eed334dda374ac2863752ce

Tree: 3e293310c9e5ebdb9c81c8983071e8c023999b30

Author: Simone

Committer: GitHub

## Message

```
fix(costs): show measured zero amounts in recent history rows (#274)

historyRows built row values with tokenSummary, which prints only
strictly positive figures. A day with measured zero cost and positive
tokens displayed only the token count; a day with positive cost and
zero tokens displayed only the amount. The chart already showed the
explicit zero, so the row contradicted the chart, and the established
CLI behavior that distinguishes measured zero from unavailable
amounts was lost in rows.

Reuse amountSummary, like modelRows already does, and drop the now
unused tokenSummary helper.

Constraint: history filtering, bar scaling, and peak selection stay metric-based
Rejected: Teaching tokenSummary to print zeros | the other call site and both tests already cover amountSummary
Confidence: high
Scope-risk: narrow

Documentation impact: CHANGELOG Unreleased gained an entry; docs/usage.md
and docs/cost-history.md describe the preserved zeros. TODO is unaffected:
presentation-only change, no CLI contract touched. Verification: new
data-driven QtTest fails before the fix (146 vs 145 cases) and passes
after; make check exit 0 (1308 QML assertions passed, 25 local skips
for missing optional KDE modules, 96 Python tests OK); make package
exit 0.
```

## Parents

- [d9979ebf4c1fa11fa5b59a9dc5c59d1533290d4b](https://git.cafe/lucenx/codexbar-plasma/commit/d9979ebf4c1fa11fa5b59a9dc5c59d1533290d4b?format=markdown)

[Source at this commit](https://git.cafe/lucenx/codexbar-plasma/tree/0c2018bab7a4db073eed334dda374ac2863752ce?format=markdown)
