Show raw Codex credit totals#1683
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 4:26 AM ET / 08:26 UTC. Summary Reproducibility: not applicable. this is a feature/UI improvement rather than a broken existing behavior. Review confidence comes from source inspection, focused tests, and inspected fixture screenshots for the changed menu UI. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Land this branch after ordinary CI and maintainer approval, keeping dashboard credits displayed as raw credits and separate from local token-log dollar rollups. Do we have a high-confidence way to reproduce the issue? Not applicable; this is a feature/UI improvement rather than a broken existing behavior. Review confidence comes from source inspection, focused tests, and inspected fixture screenshots for the changed menu UI. Is this the best way to solve the issue? Yes. The current head uses the existing dashboard model and chart view, avoids unsupported dollar conversion, preserves local cost rollups, and fixes the earlier absent-today edge case with regression coverage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f1de7006027e. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (5 earlier review cycles)
|
|
Maintainer review against current Focused tests are green (
The 25-credits-per-dollar conversion has external support in the Codex student-program terms, while the current Codex rate card describes credit usage by task rather than billing semantics. That does not settle the UI label. Recommendation: keep the account-scoped conversion, fix day selection, label it as an estimate, and reassess after #1797. No merge from this review. |
f8b9f83 to
2e3a1ac
Compare
0ea4e61 to
6932501
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6932501311
ℹ️ 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".
| let recent = self.removingSkillUsageServices(from: breakdown) | ||
| .compactMap { self.sanitized($0, startKey: startKey, todayKey: todayKey, calendar: dayCalendar) } | ||
| .sorted { $0.day < $1.day } | ||
| let todayCredits = recent.first(where: { $0.day == todayKey })?.totalCreditsUsed |
There was a problem hiding this comment.
Treat absent today usage as zero
When the dashboard has usage in the 30-day window but none today, the scraper omits zero-value bars, so recent contains no row for todayKey. This makes the new Today metric render — instead of 0 credits for a normal no-usage-today case while the Last 30 days total still shows data; default the today total to 0 when there is recent breakdown data but no today row.
Useful? React with 👍 / 👎.
Co-authored-by: kalista78 <kalista78@proton.me>
06e8548 to
675f7dc
Compare
|
Maintainer repair pushed at exact head What changed:
Proof:
Chart fixture (today intentionally absent): Aggregate-only fixture (no service rows): @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Landed in Final exact-head proof:
|


Summary
Shows calendar-correct raw Codex dashboard credit totals without pretending dashboard credits are billed dollars.
Maintainer rewrite
TodayandLast 30 dayscredit totals above the existing dashboard usage-breakdown chart.25 credits = $1conversion.Proof
swift test --filter OpenAIDashboardModelsTests: 8 tests passed.make check: SwiftFormat clean; SwiftLint 0 violations; repository checks clean.make test: all 47 shards passed on the exact head../Scripts/compile_and_run.sh: fresh signed app packaged, launched, and remained running.Exact head:
06e85486117a149dd622e336f3561b3e8f30af72Contributor
Thanks @avenoxai for the original dashboard-credit totals direction. The rewrite preserves contributor credit while choosing raw, account-scoped credits over an unsupported dollar estimate.