feat(tui): show countdown to reset alongside date in detailed stats#135
feat(tui): show countdown to reset alongside date in detailed stats#135b3nw wants to merge 1 commit intoMirrowel:devfrom
Conversation
|
I'm starting my review of the new countdown feature in the TUI quota viewer. Adding human-readable time remaining alongside the reset date is a great usability improvement! Diving into |
There was a problem hiding this comment.
Overall Assessment
This PR introduces a much-needed usability improvement to the TUI quota viewer by adding a human-readable countdown to the reset time display. Seeing "Resets in 2h 15m" is significantly more intuitive than having to mentally calculate the difference from an absolute timestamp.
The logic for handling different time scales (days, hours, minutes) is sound and integrates well with the existing detailed stats view.
Architectural Feedback
The addition of format_time_remaining is appropriate, but it highlights some existing duplication with format_cooldown. While not a blocking issue, unifying these into a single robust duration formatter would be a nice architectural cleanup.
Key Suggestions
- Unify duration formatting: The new
format_time_remainingand the existingformat_cooldownshare similar logic. Merging them into a single utility would ensure consistent behavior and formatting throughout the TUI. - Docstring clarification: Minor nit on the
format_time_remainingdocstring to accurately reflect its input parameters.
Questions for the Author
None.
This review was generated by an AI assistant.
Changes the reset display from just the date ('Resets: Feb 17 03:31')
to include a human-readable countdown ('Resets in 12h 30m (Feb 17 03:31)').
Adds format_time_remaining() helper that produces countdown strings
like '12h 30m', '45m', '< 1m', '2d 5h', or 'now'.
afbf971 to
81676d0
Compare
|
@mirrobot-agent update your review or approve approve approve |
…ate in detailed stats
feat(tui): show countdown to reset alongside date in detailed stats
Changes the reset display from just the date ('Resets: Feb 17 03:31')
to include a human-readable countdown ('Resets in 12h 30m (Feb 17 03:31)').
Adds format_time_remaining() helper that produces countdown strings
like '12h 30m', '45m', '< 1m', '2d 5h', or 'now'.