# Follow the selected metric in every cost chart · lucenx/codexbar-plasma

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

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

Visibility: public

Requested revision: c43c0438a655c8f983987d62c9caec3f4cc88e62

Requested commit: c43c0438a655c8f983987d62c9caec3f4cc88e62

Commit: c43c0438a655c8f983987d62c9caec3f4cc88e62

Tree: f774eb7a8ae9c6b6204747939efa412f82f7a792

Author: Simone

Committer: Simone

## Message

```
Follow the selected metric in every cost chart

Codex review on #59 found two real gaps in the new metric switch.

The provider detail chart kept calling `costChartPoints()`, which always
read `point.cost` and formatted currency, so a provider tab in token mode
showed a cost-scaled chart above token-scaled rows. That helper and the
chart title now follow `costHistoryShowsTokens`.

`spendDailyPoints()` also skipped any provider whose `currencyCode`
differed from the first one. That filter is needed to sum money, but
token counts carry no currency, so it silently dropped whole providers
from the range chart and heatmap in token mode. It now applies in cost
mode only.

Both rules are pinned by new assertions in test_feature_parity.sh.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

```

## Parents

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

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