Files
openclaw/ui
Miorbnli 9e6cce6358 fix(ui): show <1m for sub-minute quota reset windows instead of 0m (#108009)
* fix(ui): show <1m for sub-minute quota reset windows instead of 0m

formatQuotaReset computed Math.floor(diffMs / 60_000) for the minute branch.
When a provider quota window resets in under 60 seconds (common for 5h Anthropic
or 3h Codex windows near rollover), the floor is 0 and the UI rendered
"Resets in 0m" — nonsensical and indistinguishable from "already reset".

Add a sub-minute guard returning "<1m", matching the convention already used
by formatRemainingShort and formatRelativeTimestamp elsewhere in the codebase.

Co-Authored-By: Claude <noreply@anthropic.com>

* test(ui): cover quota reset display boundary

Co-Authored-By: ZCode <noreply@zcode.ai>

* test(ui): cover elapsed quota reset boundary

Co-Authored-By: ZCode <noreply@zcode.ai>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: ZCode <noreply@zcode.ai>
2026-07-15 01:15:36 -07:00
..