Show reset times in compact account rows - #3477
Conversation
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 12:08 PM ET / 16:08 UTC. ClawSweeper reviewWhat this changesAdds quota-specific reset times to compact account rows, with localized wrapping text, accessibility descriptions, privacy redaction, and regression coverage. Merge readiness✅ Ready for maintainer review This remains a useful improvement absent from current main. The provider-description finding is resolved, and the updated real-account menu transcript satisfies the previous proof request. No blocking patch defects were found. Priority: P3 Review scores
Verification
How this fits togetherCodexBar turns provider account usage snapshots into menu cards and compact rows. This change preserves each quota's reset information through layout planning and formats it using the existing display preference and provider presentation rules. flowchart TD
A[Account usage snapshots] --> B[Compact layout planner]
B --> C[Select constrained quota windows]
C --> D[Provider reset presentation rules]
E[Display and privacy preferences] --> F[Localized row formatting]
D --> F
F --> G[Menu rows and accessibility text]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep reset details attached to their own account quota and reuse existing formatting, privacy preferences, and provider presentation rules throughout the compact menu. Do we have a high-confidence way to reproduce the issue? Not applicable as a new presentation capability; source inspection confirms current main omits reset details from compact rows, and the supplied live transcript demonstrates the added behavior. Is this the best way to solve the issue? Yes. Preserving quota windows until presentation and reusing the shared formatter is a bounded extension of the existing menu, with provider-specific reset semantics covered. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 170a4d41c6d6. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a0ddcfdf8
ℹ️ 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 percent = UsageFormatter.percentText( | ||
| detail.window.remainingPercent, | ||
| suffix: L("usage_percent_suffix_left")) | ||
| let reset = UsageFormatter.resetLine(for: detail.window, style: resetTimeDisplayStyle, now: now) |
There was a problem hiding this comment.
Honor provider reset-description semantics
When a provider uses resetDescription for non-reset detail, this unconditionally turns that detail into a reset claim. For example, with four or more DeepSeek token accounts, its balance window has no resetsAt and stores text such as $5.00 (Paid: …) in resetDescription; the provider presentation explicitly treats that as balance detail and suppresses resets, but a visible compact row now renders Resets $5.00 …. Apply the provider's menu-card presentation policy before invoking the generic reset formatter so balance/quota detail is not mislabeled.
Useful? React with 👍 / 👎.
Show reset times in compact account rows
With four or more accounts in the stacked layout, inactive accounts only showed quota percentages. Comparing when a constrained account becomes available again required expanding each account. Compact rows now show each displayed quota's provider-reported reset alongside its remaining percentage, using the existing countdown or date/time preference.
The planner retains the complete quota window until presentation. Each row shows up to two constrained windows in remaining-capacity order; a healthy visible row shows its least remaining window. Percentages and reset times come from the same account and quota. Missing reset data leaves the label and percentage visible. The shared formatter handles provider text and elapsed resets without projecting future boundaries.
Long details wrap. VoiceOver includes reset information, and the existing personal-information setting also redacts email addresses in provider reset text. Full and segmented account cards already display resets.
Review feedback addressed
Commit
7cb55c7addresses the provider reset-presentation finding. Compact primary windows now respect the provider's existing menu-card reset policy. Balance/quota descriptions for providers such as DeepSeek are no longer prefixed with “Resets”; provider descriptions retain their intended presentation, and dated resets still work when an optional description is absent or blank. Secondary windows keep their own reset behavior.Regression coverage includes suppressed primary resets, date-backed exceptions, secondary-window independence, secondary-presence policy, raw provider descriptions, and the absent/blank-description dated fallback.
Validation
Validation of the final code in
7cb55c7:make check: passed; zero format/lint violations.make test: all 86 groups passed on the first attempt; no failures, retries or timeouts.CODEXBAR_SIGNING=adhoc ./Scripts/package_app.sh debug: passed. The freshly packaged debug bundle reportsCodexGitCommit = 7cb55c7; its code signature verifies.CodexBarCLI config validatereportsConfig: OK.CodexBarCLI usage --provider codex --all-accounts --source oauth --format json --json-only --web-timeout 20exited 0. All five accounts returned usage without errors; every account's weekly window included a reset date. No stderr output. Only anonymized success/reset-presence metadata was retained.Automated tests used the repository's account/session isolation and suppressed Keychain access. The separate live run below used the contributor's existing accounts with explicit permission.
Real app behavior proof
On September 7, 2026, the freshly packaged debug app was launched from this checkout. The running executable's path was checked to confirm the development bundle was running. The contributor opened the actual Codex menu and supplied a screenshot captured at 17:57:45 CEST. This exercises the actual status-menu integration with five real Codex accounts: one expanded active account and four compact inactive accounts.
The screenshot was visually inspected. This is an anonymized observation transcript of that live screenshot; the original contains personal account identifiers and is not uploaded. “Account A–E” below replace those identifiers. Usage/reset text is transcribed from the visible menu, not generated from fixtures:
Wöchentlich 88% übrig/Zurückgesetzt in 6d 22hWöchentlich 1% übrig · Zurückgesetzt in 5h 54mWöchentlich 11% übrig · Zurückgesetzt in 1d 1hWöchentlich 36% übrig · Zurückgesetzt in 3d 5hWöchentlich 98% übrig · Zurückgesetzt in 6d 10hAll four compact reset lines are visible beneath their account labels and bars in the same real menu. The critical row is red, the constrained rows retain their warning styling, and the healthy row retains the best-account star. The full active card and the compact rows appear together without truncating the reset text. The menu bar also shows the debug build's
Dindicator.This live check covers the German countdown display and the real compact multi-account menu. Other locales, absolute date/time formatting, missing/elapsed reset data and provider-policy edge cases are covered by automated tests, rather than claimed as live checks. CUA timed out and Peekaboo's bridge was unavailable, so menu opening/capture was performed by the contributor; the screenshot was then inspected directly.
Supplemental synthetic render proof
The original implementation also passed the native render test and its 10 compact-row regression tests. Eight synthetic PNG renders cover English/German, countdown/date-time, and 280/360-point widths. These are supplemental layout evidence; the real-account observation above is the live integration check.
References