Skip to content

FIX: render the actual quota reset weekday - #19

Merged
merefield merged 1 commit into
mainfrom
agent/fix-reset-weekday
Aug 17, 2026
Merged

merefield merged 1 commit into
mainfrom
agent/fix-reset-weekday

Conversation

@merefield

Copy link
Copy Markdown
Owner

Why

Quota cards always displayed MON beside their reset deadline, even when the
backend reset timestamp fell on another weekday. This made otherwise consistent
reset-cycle percentages and countdowns appear contradictory.

What changed

  • format the Go weekday token as Mon, then uppercase the rendered result
  • add a regression test proving a Thursday timestamp renders as THU 09:36:35
    in the complete quota card
  • bump the maintained source version from v0.7.6 to v0.7.7
  • update README version examples

Root cause

Go date layouts use the reference token Mon for an abbreviated weekday. The
previous layout used uppercase MON, which Go interpreted as literal text.

User impact

The reset deadline now agrees with the percentage and countdown on every quota
view. For example, the affected weekly window renders THU 09:36:35 rather
than MON 09:36:35.

Validation

  • go test -race -cover ./...
  • go vet ./...
  • local v0.7.7 binary built and checked with --version
  • macOS, Linux, and Windows amd64/arm64 distributions rebuilt

@merefield
merefield marked this pull request as ready for review August 17, 2026 21:55
@merefield
merefield requested a lite review from Copilot August 17, 2026 21:55

Copilot AI 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.

Pull request overview

Fixes quota-card reset deadline rendering so the displayed weekday matches the backend ResetsAt timestamp (rather than always showing a literal MON due to an incorrect Go time layout token).

Changes:

  • Corrects the time layout by formatting weekday as Mon and uppercasing the rendered result for display.
  • Adds a regression test asserting a Thursday reset timestamp renders as THU 09:36:35 (including within the full quota card output).
  • Bumps the maintained fallback/source version and updates version examples in docs/tests to v0.7.7.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Updates versioning examples to v0.7.7.
main_test.go Updates --version output expectation to v0.7.7.
internal/version/version.go Bumps maintained fallback version to 0.7.7.
internal/version/version_test.go Updates fallback-version test expectation to 0.7.7.
internal/ui/meters.go Fixes reset deadline weekday formatting via formatResetDeadline.
internal/ui/meters_test.go Adds regression coverage for weekday rendering and full card output.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@merefield
merefield merged commit ccc9f05 into main Aug 17, 2026
7 checks passed
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.

2 participants