Skip to content

fix(menu-bar): show precise reset durations#22

Merged
eddmann merged 1 commit into
mainfrom
codex/reset-description-formatting
May 18, 2026
Merged

fix(menu-bar): show precise reset durations#22
eddmann merged 1 commit into
mainfrom
codex/reset-description-formatting

Conversation

@eddmann
Copy link
Copy Markdown
Owner

@eddmann eddmann commented May 18, 2026

Summary

Fixes #15 by making reset-time labels more precise for longer usage windows.

Previously the app used RelativeDateTimeFormatter, which could summarize a weekly reset more than 40 hours away as in 1 day. That understated the remaining wait and made the weekly usage card feel misleading.

What changed

  • Replaced the broad relative formatter with deterministic duration formatting.
  • Rounded remaining time up so the UI does not understate reset time.
  • Kept short reset windows compact:
    • 45.2 minutes -> in 46 minutes
    • 3.1 hours -> in 4 hours
  • Made long reset windows more explicit:
    • 40 hours -> in 1 day 16 hours
    • 48 hours -> in 2 days

Testing

  • xcodebuild test -project ClaudeMeter.xcodeproj -scheme ClaudeMeter -configuration Debug -only-testing:ClaudeMeterTests/UsageLimitRiskTests

Replace broad relative reset labels with rounded duration text so weekly reset windows do not understate the remaining wait.\n\nCovers minute, hour, day-plus-hour, whole-day, and elapsed reset descriptions in UsageLimitRiskTests.
@eddmann eddmann merged commit b3fcc51 into main May 18, 2026
1 check passed
@eddmann eddmann deleted the codex/reset-description-formatting branch May 18, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weekly Usage should round up to the day or show days and hours

1 participant