# Drop the invented credits meter and group credit balances · lucenx/codexbar-plasma

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

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

Visibility: public

Requested revision: b2bd81dff2ec4cbbcf8eec57e8bbcfea87bdabe2

Requested commit: b2bd81dff2ec4cbbcf8eec57e8bbcfea87bdabe2

Commit: b2bd81dff2ec4cbbcf8eec57e8bbcfea87bdabe2

Tree: d508ef0764307d6f815c5fc4970ec3fd8c01a70f

Author: Simone

Committer: Simone

## Message

```
Drop the invented credits meter and group credit balances

`usage.credits` reports only `remaining`, `updatedAt`, and `events`, so the
Credits meter had to invent its own denominator: it scaled the balance against
a hardcoded 1000 credits, filling for 1000 and reading full for anything above
it. The section now prints the balance on its own until the CLI reports the
matching allowance.

`formatNumber` also formatted digits by hand, so a depleted balance printed as
"0.0", four-figure balances came out as a bare digit run, and the decimal mark
ignored the locale while every other figure in the popup went through
`groupedDecimalString`. It now shares that helper and drops the fractional part
for whole balances.

Static checks cover both rules: the Credits section may not scale the balance
against a literal again, and `formatNumber` must route through
`groupedDecimalString` instead of `toFixed`.

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

```

## Parents

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

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