Opt-in expiry runway for Codex reset credits (addresses #1758)#1907
Opt-in expiry runway for Codex reset credits (addresses #1758)#1907cleanerzkp wants to merge 1 commit into
Conversation
Render the reset-credit inventory as a horizontal timeline — one dot per credit, positioned by remaining time over the longest credit lifetime — behind a new CreditExpiryDisplayStyle picker that defaults to the existing compact list. Addresses steipete#1758 (show all reset-credit expirations, not only the soonest). - Colors resolve through MenuHighlightStyle so the runway stays legible on the highlighted row; hover reveals each credit's exact countdown + absolute date, mirroring the Z.ai chart; hover animation gates on accessibilityReduceMotion. - Data-derived horizon (max expiresAt - grantedAt); no-expiry credits stay counted and in the tooltip but off the track. - Distinct height fingerprint for the runway row. - Extract loadQuotaWarningMarkersVisible to keep loadDefaultsState within the function-length limit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Codex review: needs real behavior proof before merge. Reviewed July 4, 2026, 9:35 PM ET / 01:35 UTC. Summary Reproducibility: not applicable. as a feature PR rather than a bug report. Source inspection confirms current main already has compact expiry text and full help text, while this PR proposes a new opt-in timeline view for the remaining at-a-glance concern. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Choose the intended product shape for reset-credit expiry visibility, then land the narrow UI after redacted built-app proof and clean required checks, keeping the current compact list as the default unless maintainers decide otherwise. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature PR rather than a bug report. Source inspection confirms current main already has compact expiry text and full help text, while this PR proposes a new opt-in timeline view for the remaining at-a-glance concern. Is this the best way to solve the issue? Unclear until maintainers choose the product shape. The implementation is narrow and default-compatible, but the new setting versus replacement decision and missing real UI proof should be resolved before merge. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 17347d847b15. Label changesLabel changes:
Label justifications:
Evidence reviewedAcceptance criteria:
What 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
|
|
Thanks for the thoughtful implementation and especially the attention to highlight styling, accessibility, and focused tests. I am closing this as superseded by #1902 ( The current CI failures are not the reason for closing; the core issue is product/scope fit. Thank you for exploring the alternative so thoroughly. |
|
Status update on the two failing macOS shards from the first run (both now understood):
Also folded in a small On your review questions: product direction is opt-in by default (picker defaults to the current list; the runway changes nothing unless selected) — happy to make it replacement or drop the gate, your call. The new run needs a maintainer approval to start; |

Summary
An opt-in "expiry runway" view for the Codex reset-credits menu row: a horizontal timeline with one dot per credit, so all expiries are visible at a glance instead of clipped behind
+Nin the compact list. Addresses #1758 (show all reset-credit expirations, not only the soonest).Default is unchanged — this ships behind a new
CreditExpiryDisplayStylepicker (Display settings) defaulting to.list, so nobody's current row changes unless they opt in. Happy to flip the default or drop the setting entirely — see the open question below.Why
The 0.39.x compact list (#1902) reads well at 2–3 credits but at 4+ it clips (
7d 7h · 13d 5h · 22d 4h · +2) and asks you to place four countdowns on a mental timeline. The runway makes position carry the timing: a far-right cluster reads "nothing expires for weeks" pre-attentively, and the nearest dot turns red under 48h. Hovering any dot reveals its exact countdown + absolute date (mirroring theZaiHourlyUsageChartMenuViewhover), so the runway is a strict superset of the list — no information is lost, and the row's.help()tooltip + accessibility label are untouched.Design notes (kept native)
max(expiresAt − grantedAt)across the inventory) — no hardcoded window; credits with no expiry stay counted/in the tooltip but off the track.MenuHighlightStyle(progressTrack/progressTint/error), mirroringUsageProgressBar, so the runway stays legible on the highlighted (blue) row rather than clashing with raw.accentColor/.red.compactExpiryText); hover shows both forms.accessibilityReduceMotion(perQuotaWarningAlertOverlayController).CodexResetCreditsPresentation.heightFingerprintgets arunwaydiscriminator (the honest cost of gating — two heights).Open question for you
Straight replacement, or keep the gate (this PR)? Replacement is defensible since hover makes the runway a superset of the list and it drops the second height/settings surface; the gate keeps your fresh default untouched. I went with opt-in to be conservative on a surface you just built — flipping the default or removing the picker is a one-line change, your call.
Not in scope (declared): single-point resets (session/weekly/monthly,
CodexCreditLimitSnapshot.resetsAt) stay as text — one timestamp needs no axis. A natural future adopter is OpenAI API credit grants (per-grantexpiresAtexists but the snapshot currently collapses tonextGrantExpiry, so it'd need fetcher plumbing first) — happy to follow up if this direction lands.Commands run
swift build— greenswift test --filter CodexResetCreditRunwayTests --filter CodexResetCreditsMenuCardTests --filter MenuCardHeightFingerprintTests— greenmake check— SwiftFormat + SwiftLint + locale gate greenTests
CodexResetCreditRunwayTestscovers marker placement over the data-derived horizon, the nearest-credit flag,<48hurgency, no-expiry exclusion, empty→list fallback, the horizon label, and thatmake(…)only builds runway data for.runway.