Show fractional session quota estimates#2357
Conversation
887dd2f to
d4d076d
Compare
d4d076d to
fa2b1bd
Compare
|
Codex review: needs maintainer review before merge. Reviewed July 20, 2026, 1:03 PM ET / 17:03 UTC. Summary Reproducibility: not applicable. This PR improves the presentation of an existing calculated forecast rather than reporting a failing current-main behavior. 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:
Next step before merge
Security Review detailsBest possible solution: Keep the localized one-decimal quota display and single-row comparison, provided normal maintainer review agrees that the more compact weekly forecast remains clear at narrow menu widths. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR improves the presentation of an existing calculated forecast rather than reporting a failing current-main behavior. Is this the best way to solve the issue? Yes: changing the formatter and menu-row model while adding catalog and forecast coverage is a narrow maintainable way to preserve fractional capacity without introducing settings or provider changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f8636cb37eb0. Label changesLabel 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 (1 earlier review cycle)
|
Summary
0.3, instead of flooring sub-one capacity to zeroWhy
The historical session forecast is condensed from two lines to one. The derived “Weekly can/cannot run out early” sentence is removed, while the estimated session quota left and windows until reset remain side by side. These values are easy to compare to see whether the weekly quota may run out before reset. Showing
0.3instead of≈0also preserves useful fractional capacity and reduces the Weekly section from four rows to three.The number and session-quota unit now use a dedicated localization template so Chinese and Japanese can omit the number-unit space while other languages retain their appropriate spacing.
Validation
swift test --filter 'UsagePaceTextTests|SessionEquivalentForecastTests'— 62 tests passedmake check— passed, including SwiftFormat, SwiftLint, and all localization catalog checksgit diff --check upstream/main...HEAD— passedScreenshot