Add recorded quota burndown alongside plan usage history - #4085
callmejustdodo wants to merge 2 commits into
Conversation
Reuse CodexBar account-scoped history so chart points retain their provider, account, and reset-window identity. Constraint: Preserve existing provider fetching and the localized Plan Usage menu. Rejected: Join history to a live snapshot by window duration | account switches and same-duration Claude lanes can mix data. Confidence: high Scope-risk: narrow Tested: swift build; make check; 66 focused tests; synthetic chart render. Not-tested: live provider polling or signed app launch.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 27, 2026, 11:46 PM ET / September 28, 2026, 03:46 UTC (Revision 4). ClawSweeper reviewWhat this changesAdds a recorded remaining-quota chart with an even-use guide and capture-age label above the existing Codex and Claude Plan Usage history, with tests, documentation, and synthetic menu proof. Merge readiness⛔ Blocked before merge - 4 items remain The feature remains useful and is absent from current main, but a saved-history compatibility defect remains at the reviewed head. VISION.md also requires maintainer sign-off for this new menu feature. Priority: P2 Review scores
Verification
How this fits togetherCodexBar records provider quota samples by account and reset window. The Plan Usage submenu reads those samples and presents utilization history; this PR adds a remaining-quota view to that submenu. flowchart LR
A[Codex and Claude quota samples] --> B[Account-scoped saved history]
B --> C[Plan Usage submenu]
C --> D[Choose active window]
D --> E[Remaining-quota chart]
D --> F[Existing utilization chart]
Decision needed
Why: VISION.md requires sign-off for new features, and the available discussion contains no maintainer approval of this menu surface. Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the existing provider series classification when building burndown tabs, add a saved 30-day history regression case, and keep the visualization only if its added menu complexity receives feature sign-off. Do we have a high-confidence way to reproduce the issue? Yes for the review finding: supply saved Codex history named Session or Weekly with a 43,200-minute window and an active reset. Source inspection shows the new picker keeps that name while the existing chart normalizes it to Monthly; the case was not executed here. Is this the best way to solve the issue? Yes, subject to feature sign-off and the compatibility repair. Reusing account-scoped saved samples and retaining the original chart is a coherent path; the new picker should reuse the existing classification policy. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 579f68406855. LabelsLabel changes: No label changes. Label 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 (3 earlier review cycles)
|
Preserve both menu charts, label saved capture age, and give multi-day windows calendar endpoints. Include an isolated native proof fixture. Constraint: Saved account history does not prove a fresh live quota window Rejected: Bare live snapshot reconciliation | Account ownership cannot be proven for every selected series Confidence: high Scope-risk: narrow Directive: Keep the original utilization chart accessible alongside burndown Tested: 69 focused tests; make check; weekly render; native submenu accessibility Not-tested: Full suite stopped on two unchanged AdaptiveRefreshTimerTests cancellation failures after retry
Maintainer review
This proposes a menu burndown view and requests feature sign-off under
VISION.md. It reuses account-scoped quota history and adds no dependencies or authentication changes.Summary
Review follow-up
Verification
make check: passed.make test: run; stopped in group 10/130 on twoAdaptiveRefreshTimerTestscancellation errors, reproduced on the runner's retry. Those timer files are unchanged by this PR. Earlier initial implementation verification passed all 1,438 selected tests; that result is not claimed for this follow-up.Native menu proof
Synthetic data from the freshly built running DEBUG fixture, captured before the calendar-label follow-up. It demonstrates the last-known label and the preserved original utilization chart.
Updated weekly labels
Hosted-view rendering of the final weekly view. The updated endpoint strings were also verified in the running native submenu's accessibility tree.
Reproduction instructions
Limits
This plots provider-reported quota percentages, not exact token totals. The observed line gains detail as CodexBar records more snapshots. Saved samples remain explicitly last-known; feature sign-off is still a maintainer decision.