Skip to content

Show reset times in compact account rows - #3477

Open
TobitRE wants to merge 2 commits into
steipete:mainfrom
TobitRE:codex/account-reset-times
Open

Show reset times in compact account rows#3477
TobitRE wants to merge 2 commits into
steipete:mainfrom
TobitRE:codex/account-reset-times

Conversation

@TobitRE

@TobitRE TobitRE commented Sep 7, 2026

Copy link
Copy Markdown

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 7cb55c7 addresses 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.
  • Focused compact-row, planner and menu-layout checks passed during development; the final full suite includes the additional provider-policy regression cases.
  • Independent local Codex review of the final follow-up diff: no actionable findings.
  • CODEXBAR_SIGNING=adhoc ./Scripts/package_app.sh debug: passed. The freshly packaged debug bundle reports CodexGitCommit = 7cb55c7; its code signature verifies.
  • The packaged CodexBarCLI config validate reports Config: OK.
  • Live packaged CLI: CodexBarCLI usage --provider codex --all-accounts --source oauth --format json --json-only --web-timeout 20 exited 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:

Visible account Presentation Observed quota/reset text
Account A (active) Full card Wöchentlich 88% übrig / Zurückgesetzt in 6d 22h
Account B Compact, critical Wöchentlich 1% übrig · Zurückgesetzt in 5h 54m
Account C Compact, constrained Wöchentlich 11% übrig · Zurückgesetzt in 1d 1h
Account D Compact, constrained Wöchentlich 36% übrig · Zurückgesetzt in 3d 5h
Account E Compact, healthy, best-account star Wöchentlich 98% übrig · Zurückgesetzt in 6d 10h

All 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 D indicator.

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.

Synthetic compact account rows with German reset countdowns at 360 points Synthetic compact account rows at 280 points, checking wrapping

References

  • #2545: existing compact multi-account layout.
  • #3456: shared reset formatting used by this change.
  • #2468: maintainer discussion of authoritative reset data versus projected schedules.

@clawsweeper

clawsweeper Bot commented Sep 7, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T15:32:33.097901Z 6a0ddcf PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 12:08 PM ET / 16:08 UTC.

ClawSweeper review

What this changes

Adds 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
Reviewed head: 7cb55c7e06102d25f2a5e454d93a795a591b521a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-covered improvement with sufficient real-menu evidence and the earlier provider-policy defect corrected.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The updated body supplies an anonymized live-output transcript from the freshly packaged 7cb55c7 app showing four inactive Codex accounts with distinct weekly reset details in the real five-account menu. It covers the changed planner, controller, and row presentation and resolves the previous proof request; the private original screenshot was not independently viewed here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The updated body supplies an anonymized live-output transcript from the freshly packaged 7cb55c7 app showing four inactive Codex accounts with distinct weekly reset details in the real five-account menu. It covers the changed planner, controller, and row presentation and resolves the previous proof request; the private original screenshot was not independently viewed here.
Evidence reviewed 8 items Applicable repository policy: Read the complete root AGENTS.md. No nested AGENTS.md files or maintainer-notes directory were found. Applied guidance on shared helpers, provider isolation, focused coverage, and fresh-bundle UI evidence; no builds, tests, or account probes were executed during this read-only review.
Complete introduced patch inspected: Read the complete eight-file introduced delta locally, including the new 325-line test file, supplementing the truncated supplied patches. Production changes remain confined to compact-row planning, formatting, and controller integration.
Current main still omits compact reset information: The main-branch planner reduces quota windows to labels and percentages, so the compact renderer cannot display their resets. Existing expanded cards provide resets but do not satisfy the requested comparison without expanding accounts.
Findings None None.
Security None None.

How this fits together

CodexBar 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]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta Production +112/-45, net +67; tests +333/-9, net +324 Production growth supports quota-preserving presentation, with substantially more regression and render coverage.

Technical review

Best 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.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The updated body supplies an anonymized live-output transcript from the freshly packaged 7cb55c7 app showing four inactive Codex accounts with distinct weekly reset details in the real five-account menu. It covers the changed planner, controller, and row presentation and resolves the previous proof request; the private original screenshot was not independently viewed here.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The updated body supplies an anonymized live-output transcript from the freshly packaged 7cb55c7 app showing four inactive Codex accounts with distinct weekly reset details in the real five-account menu. It covers the changed planner, controller, and row presentation and resolves the previous proof request; the private original screenshot was not independently viewed here.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is live_output.

Label justifications:

  • P3: This improves compact-menu readability and account comparison without changing provider fetching or account selection.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The updated body supplies an anonymized live-output transcript from the freshly packaged 7cb55c7 app showing four inactive Codex accounts with distinct weekly reset details in the real five-account menu. It covers the changed planner, controller, and row presentation and resolves the previous proof request; the private original screenshot was not independently viewed here.
  • proof: sufficient: Contributor real behavior proof is sufficient. The updated body supplies an anonymized live-output transcript from the freshly packaged 7cb55c7 app showing four inactive Codex accounts with distinct weekly reset details in the real five-account menu. It covers the changed planner, controller, and row presentation and resolves the previous proof request; the private original screenshot was not independently viewed here.

Evidence

What I checked:

  • Applicable repository policy: Read the complete root AGENTS.md. No nested AGENTS.md files or maintainer-notes directory were found. Applied guidance on shared helpers, provider isolation, focused coverage, and fresh-bundle UI evidence; no builds, tests, or account probes were executed during this read-only review. (AGENTS.md:1, 7cb55c7e0610)
  • Complete introduced patch inspected: Read the complete eight-file introduced delta locally, including the new 325-line test file, supplementing the truncated supplied patches. Production changes remain confined to compact-row planning, formatting, and controller integration. (Sources/CodexBar/MenuCardCompactAccountRow.swift:16, 7cb55c7e0610)
  • Current main still omits compact reset information: The main-branch planner reduces quota windows to labels and percentages, so the compact renderer cannot display their resets. Existing expanded cards provide resets but do not satisfy the requested comparison without expanding accounts. (Sources/CodexBarCore/AccountMenuLayoutPlanner.swift:122, 170a4d41c6d6)
  • Latest release comparison: The supplied latest release, v0.56.7, also renders only the compact constraint summary; it does not already contain this improvement. (Sources/CodexBar/MenuCardCompactAccountRow.swift:79, d8f4cec19b82)
  • Previous provider-policy finding resolved: The planner now applies primary reset suppression, raw-description handling, and optional-description fallback before presentation. These correspond to the existing full-card rules, and focused tests cover balance descriptions, dated exceptions, and secondary-window independence. This addresses Show reset times in compact account rows #3477 (comment). (Sources/CodexBarCore/AccountMenuLayoutPlanner.swift:203, 7cb55c7e0610)
  • New real-menu evidence addresses previous rank-up: The complete supplied body at sourceRevision 8a4179b542c2f1586d2224cabd7dd280216654a82de0789dc4c0f6d8bb38678a records a freshly packaged 7cb55c7 app and a real five-account Codex menu observed at 17:57:45 CEST. Its anonymized live transcript shows four compact weekly quota/reset pairs at 1%, 11%, 36%, and 98% remaining, alongside the active full card. This exercises the changed controller-to-row path and supplies the runtime transcript requested by the previous review. The original private screenshot was not supplied to this reviewer; the CLI success and synthetic renders are supplemental. (Sources/CodexBar/StatusItemController+CompactAccountMenu.swift:148, 7cb55c7e0610)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-07T15:29:32.920Z sha 6a0ddcf :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-07T16:02:15.299Z sha 7cb55c7 :: needs real behavior proof before merge. :: none

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant