Skip to content

feat(ui): the Overview cards say what kind of money they are, in order - #52

Closed
as-koshiyama wants to merge 4 commits into
feat/metering-viewfrom
feat/overview-actual-spend
Closed

feat(ui): the Overview cards say what kind of money they are, in order#52
as-koshiyama wants to merge 4 commits into
feat/metering-viewfrom
feat/overview-actual-spend

Conversation

@as-koshiyama

@as-koshiyama as-koshiyama commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

#44 has merged; base is now feat/metering-view (#51). The review surface is this PR's own commits — #51's metering work is the base, not the diff. When #51 lands this retargets to main automatically. Landing order: #51 → this.

What

The Overview cards reorder to say what kind of money each one is, left to right: SPEND, TOKENS, TOKEN COST, AVG USAGE RATE, TOOLS & SITES — the actual bill first, the work done, the API-rate hypothetical it would have cost, how hard the plan is being driven, the machine's inventory last.

SPEND carries only real money now

The saving-vs-API-rates line moves off the SPEND card — that comparison is the hypothetical's business, and it lives on TOKEN COST and in the Cost view. In its place the card answers the question actual spend turns on: is overflow billing in play? Driven by the metering samples, in the honest grammar:

Two tests pin that no API rates string can appear on the Overview when SPEND renders with figures (the phrase only ever comes from TOKEN COST's own qualifier).

AVG USAGE RATE is new

The mean peak of the 5-hour metering windows — the number that predicts a cap hit before it bills, which no token count can. Qualifiers: window count, hottest window ( amber from 90%), and the [m] pointer to the per-day breakdown on Usage. Shows with the absence stated on machines without Claude Desktop's samples.

TOOLS & SITES fold into one card

9 · 12-style headline, keeping the ▲ autonomous and ▲ browser(s) unreadable warnings and the visit total. Both cfg variants handled (non-sqlite builds say sites are not compiled in).

Verification

Three new tests (extra-usage line follows the meter through quiet → pegged; AVG USAGE RATE averages peaks and states absence; the folded card exists and AI SITES is gone) plus the no-API-rates-on-SPEND assertions. cargo fmt, clippy -D warnings, 268 tests pass on the branch. Docs: the Overview card table and order rationale in dashboard.md; CHANGELOG entry included.

🤖 Generated with Claude Code

as-koshiyama and others added 3 commits August 2, 2026 09:23
# Conflicts:
#	CHANGELOG.md
#	src/ui/mod.rs
SPEND, TOKENS, TOKEN COST, AVG USAGE RATE, TOOLS & SITES - the actual bill first, the work done, the API-rate hypothetical it would have cost, how hard the plan is being driven, the machine's inventory last. SPEND now carries only real money: the saving-vs-API-rates line moves off it (that comparison lives on TOKEN COST and in the Cost view) and in its place the card says whether extra usage is in play, from the metering samples - 'no extra usage' while no window has ever pegged, 'extra usage likely' once one has, and nothing claimed on a machine without history. AVG USAGE RATE is new: the mean peak of the 5-hour windows, the number that predicts a cap hit before it bills, with the hottest window amber from 90% and a pointer to the per-day breakdown on [m]. TOOLS and AI SITES fold into one inventory card.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@as-koshiyama
as-koshiyama requested a review from kleyt0n as a code owner August 2, 2026 09:35
@as-koshiyama
as-koshiyama requested a review from kleyt0n August 2, 2026 09:35
@as-koshiyama
as-koshiyama requested a review from umar-hai as a code owner August 2, 2026 09:35
@kleyt0n
kleyt0n changed the base branch from feat/spend-vs-token-cost to feat/metering-view August 3, 2026 10:29
@as-koshiyama

Copy link
Copy Markdown
Contributor Author

Superseded by #56, which packs this together with #51 and #49 into one branch for review. The two commits from this PR (f0ed7e6, 77938b2) are carried over intact and mapped in #56's body.

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.

2 participants