Show token allocation and cost per million in Overview - #2855
Show token allocation and cost per million in Overview#2855Chipagosfinest wants to merge 64 commits into
Conversation
…end-converged # Conflicts: # README.md
|
🦞👀 Pull request received. I will update this pull request when review starts. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb12b5ea02
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@Yuxin-Qiao this stacked follow-up is ready for review after #2759 lands. Exact head |
|
Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 11:21 PM ET / August 12, 2026, 03:21 UTC. ClawSweeper reviewWhat this changesAdds a known-token allocation strip and same-row native-currency cost-per-million figures to the Overview spend card. Merge readinessKeep open for maintainer product-direction review: this is a proof-backed stacked feature branch whose base PR remains open, so it should be considered only after the base lands and the focused follow-up is rebased. Priority: P3 Review scores
Verification
How this fits togetherCodexBar’s Overview turns enabled-provider snapshots into menu-bar status rows. The proposed spend summary derives token allocation and per-provider rates from local cost-history data before rendering the compact Overview card. flowchart LR
A[Enabled provider snapshots] --> B[Spend history model]
B --> C[Known-token allocation]
C --> D[Overview spend card]
D --> E[Menu-bar overview]
B --> F[Local share summary]
Decision needed
Why: The code and contributor response establish that this is intentional, but choosing the permanent meaning of the Overview preference is a user-facing product decision. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: After approving the all-provider summary contract, merge #2759 first, then rebase this focused allocation layer and recheck selected rows, global totals, and mixed-currency presentation together. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this is a new UI capability, and the supplied exact-head production-component screenshots directly show its intended states. Is this the best way to solve the issue? Unclear pending product approval: the implementation is coherent, but maintainers must first choose whether global spend data may intentionally differ from the selected Overview rows. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 26ebaf9d5b09. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
|
@Yuxin-Qiao @clawsweeper ready for maintainer review / re-review.
This remains stacked behind #2759; the review order and focused product commits are called out at the top of the PR. |
|
@clawsweeper re-review Exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Review order
This is a stacked follow-up to #2759.
ff3374eand its lint-only follow-upeb12b5e.UI proof: baseline to allocation
Every value below is synthetic. The after images visibly say
SYNTHETIC DATA · PRODUCTION COMPONENTSand render the production Overview summary/provider-row components at the real 310-point menu width.Before: multi-provider Overview from #2759
After: complete allocation
Exact 3/3 reporting, a provider-colored known-token strip, token shares, and approximate same-row cost per 1M tokens.
After: partial data and a long roster
Six tracked providers remain visible. The summary becomes approximate, the missing rate stays unavailable, and the compact legend uses
+3overflow without hiding the provider rows.After: native currencies and a tiny positive rate
EUR and USD remain separate. A positive sub-cent normalized rate renders as
<$0.01 / 1M, while its nonzero total spend remains visible as$0.04.Existing share flow from #2759
This follow-up does not change local share/export. The base PR continues to own that experience.
Wide Settings proof · Narrow Settings proof · Allocation screenshot provenance and regeneration
What this changes
The Overview spend card now explains how known tokens are allocated instead of showing only a single total.
Product contract
<$0.01(or the currency's minimum visible unit), never$0.00.Verification
Exact head:
36cf2cdfb8088092a0eb792a3d6304521ceccbc0lint-macospassed: 22 locale catalogs / 1,392 English keys plus formatting checks.1483edaand the current “Overview rows” preference copy.The renderer is opt-in and skips unless
CODEXBAR_OVERVIEW_ALLOCATION_PROOF_DIRis set. Local Swift tests cannot reach the CodexBar target on this CLT-only Mac because the dependency toolchain cannot loadPreviewsMacros; hosted macOS execution above is the runtime evidence.