Skip to content

[feature]: show provider reset countdowns to the minute #238

Description

@MemberIT

Pre-flight checks

  • I searched existing issues and did not find a duplicate request for minute-accurate reset countdowns.
  • I reproduced the behavior with the current released plugin: reset timestamps supplied by providers are rendered as a rounded major unit.

Problem

The Sidebar renders quota reset countdowns with coarse compact rounding. For example, the OpenAI Weekly window is shown as 6d even though the provider API supplies a concrete reset timestamp with hours and minutes remaining.

This makes the countdown useful only near the last day. Earlier in a weekly or monthly window, users cannot reliably plan work around the exact time that quota becomes available again.

Requested feature

Render every provider-supplied reset timestamp to minute precision on human-facing quota surfaces:

  • Sidebar panel
  • popup toast
  • compact status / prompt bar
  • /quota and opencode-quota show

Use a compact unambiguous format such as 6d1h17m, 21d20h10m, or 37m. Preserve the provider timestamp through the normalized resetTimeIso data path; do not fabricate precision for providers that do not return a reset time.

Motivation

Precise countdowns let users decide when to stop, switch providers, or resume work based on the actual quota reset time throughout the entire window—not only on the final day.

Screenshot

The attached screenshot shows the current coarse display (6d, 2d, 29d, 21d) despite providers returning reset timestamps with more precision.

Rounded quota countdown screenshot

Acceptance criteria

  • A reset timestamp with days, hours, and minutes renders as DdHhMm (for example, 6d1h17m).
  • A reset timestamp below one day renders as HhMm; below one hour it renders as Mm.
  • All human-facing rendering surfaces use the same formatter.
  • Providers without a reported reset timestamp retain their current missing-time behavior.
  • The countdown must not round down partial minutes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions