Skip to content

feat(tui): show countdown to reset alongside date in detailed stats#135

Open
b3nw wants to merge 1 commit intoMirrowel:devfrom
b3nw:feat/tui-reset-countdown
Open

feat(tui): show countdown to reset alongside date in detailed stats#135
b3nw wants to merge 1 commit intoMirrowel:devfrom
b3nw:feat/tui-reset-countdown

Conversation

@b3nw
Copy link
Contributor

@b3nw b3nw commented Feb 16, 2026

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'.

@b3nw b3nw requested a review from Mirrowel as a code owner February 16, 2026 15:48
@mirrobot-agent
Copy link
Contributor

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 src/proxy_app/quota_viewer.py now.

Copy link
Contributor

@mirrobot-agent mirrobot-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_remaining and the existing format_cooldown share 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_remaining docstring 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'.
@b3nw b3nw force-pushed the feat/tui-reset-countdown branch from afbf971 to 81676d0 Compare February 16, 2026 16:07
@b3nw
Copy link
Contributor Author

b3nw commented Feb 16, 2026

@mirrobot-agent update your review or approve approve approve

MasuRii added a commit to MasuRii/LLM-API-Key-Proxy that referenced this pull request Feb 17, 2026
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.

1 participant