Skip to content

Show fractional session quota estimates#2357

Open
Zihao-Qi wants to merge 1 commit into
steipete:mainfrom
Zihao-Qi:codex/show-fractional-weekly-windows
Open

Show fractional session quota estimates#2357
Zihao-Qi wants to merge 1 commit into
steipete:mainfrom
Zihao-Qi:codex/show-fractional-weekly-windows

Conversation

@Zihao-Qi

@Zihao-Qi Zihao-Qi commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep the weekly usage section as three rows: remaining/reset, pace/verdict, and session estimate/reset windows
  • show fractional session quota estimates, such as 0.3, instead of flooring sub-one capacity to zero
  • localize the estimate, unit, and number-unit spacing across all app catalogs

Why

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.3 instead of ≈0 also 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 passed
  • make check — passed, including SwiftFormat, SwiftLint, and all localization catalog checks
  • git diff --check upstream/main...HEAD — passed

Screenshot

Screenshot 2026-07-20 at 11 22 46

@Zihao-Qi
Zihao-Qi marked this pull request as ready for review July 20, 2026 14:51
@Zihao-Qi
Zihao-Qi force-pushed the codex/show-fractional-weekly-windows branch from 887dd2f to d4d076d Compare July 20, 2026 15:51
@Zihao-Qi
Zihao-Qi force-pushed the codex/show-fractional-weekly-windows branch from d4d076d to fa2b1bd Compare July 20, 2026 16:19
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Jul 20, 2026
@clawsweeper

clawsweeper Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed July 20, 2026, 1:03 PM ET / 17:03 UTC.

Summary
The PR changes weekly session-quota presentation to show rounded fractional estimates, consolidates the forecast into one two-column row, and adds localized estimate/unit strings across app catalogs.

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.

  • Patch scope: 30 files affected; 190 additions, 76 deletions. Most of the patch is synchronized localization-catalog work supporting one focused weekly-usage presentation change.
  • Validation scope: 62 focused tests reported plus repository check suite. The reported validation covers the forecast formatter, localization catalogs, formatting, and linting.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • [P2] No discrete defect or mechanical repair was found; this PR is ready for ordinary maintainer review.

Security
Cleared: The diff is limited to local Swift UI/formatting logic, tests, and localization resources, with no dependency, credential, execution, or supply-chain change identified.

Review details

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

Label justifications:

  • P3: This is a user-visible quota-display refinement with limited blast radius and no reported availability, data, or security impact.
  • 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 (screenshot): The submitted menu screenshot directly shows the revised weekly presentation, while focused formatter tests support the nonvisual fractional and localization behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The submitted menu screenshot directly shows the revised weekly presentation, while focused formatter tests support the nonvisual fractional and localization behavior.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The submitted menu screenshot directly shows the revised weekly presentation, while focused formatter tests support the nonvisual fractional and localization behavior.
Evidence reviewed

What I checked:

  • Forecast presentation implementation: The PR replaces the prior verdict-plus-integer-window detail with localized left/right text, rounding finite positive quota estimates to one decimal and preserving the reset-window comparison. (Sources/CodexBar/UsagePaceText.swift:37, fa2b1bd8ca84)
  • Accessible menu-row update: The menu card renders the new estimate and reset values in a single baseline-aligned row and supplies one combined accessibility label. (Sources/CodexBar/MenuCardView.swift:552, fa2b1bd8ca84)
  • Regression and localization coverage: The branch updates forecast assertions, menu-card isolation coverage, and catalog tests, including CJK number-unit spacing for the new localization template. (Tests/CodexBarTests/SessionEquivalentForecastTests.swift:244, fa2b1bd8ca84)
  • Contributor validation and visible proof: The PR body reports focused forecast tests, the repository check suite, and diff whitespace validation, and includes a compact menu screenshot that directly shows the revised weekly row. (fa2b1bd8ca84)

Likely related people:

  • steipete: The affected menu-card and usage-display paths are repository-owned surfaces; the available review context does not expose sufficient local history to attribute a narrower current-main code owner. (role: repository owner and likely UI follow-up owner; confidence: low; files: Sources/CodexBar/MenuCardView.swift, Sources/CodexBar/UsagePaceText.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • 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.
Review history (1 earlier review cycle)
  • reviewed 2026-07-20T16:22:18.968Z sha fa2b1bd :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added 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 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. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Jul 20, 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: 📸 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant