Repository navigation
FIX: render the actual quota reset weekday - #19
Merged
Merged
Conversation
There was a problem hiding this comment.
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
Monand 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Quota cards always displayed
MONbeside their reset deadline, even when thebackend reset timestamp fell on another weekday. This made otherwise consistent
reset-cycle percentages and countdowns appear contradictory.
What changed
Mon, then uppercase the rendered resultTHU 09:36:35in the complete quota card
Root cause
Go date layouts use the reference token
Monfor an abbreviated weekday. Theprevious 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:35ratherthan
MON 09:36:35.Validation
go test -race -cover ./...go vet ./...--version