Files
paseo/plugins/claude-usage-source/server
Mohamed Boudra 7e3826ad6c Forecast when provider quotas will run out (#10289)
* feat(usage): forecast quota remaining at reset

Show whether current usage will last until reset and how much quota is likely to remain. Anchor estimates to the last successful reading so the countdown does not move the projected runout between refreshes.

* fix(usage): keep quota forecasts tied to their readings

A cached provider observation must keep its own timestamp across refreshes. Hide forecasts after a failed request until a newer reading takes its place, and keep reset text within its column on narrow screens.

* fix(usage): hide stale forecasts after Refresh all fails

Store refresh failures with the cached readings they affect so card and list requests use the same forecast rule. Reports that arrive during a refresh retain their forecasts.

* test(usage): cover a timed-out Refresh all and retry

* test(usage): timestamp the expired-login refresh fixture

The expired-login result represents a new attempt. Give it a fresh timestamp so the UI can accept it without relaxing the guard against older reports.

* fix(usage): keep refresh errors visible alongside quota

Store request feedback with its refresh control. A newer report can restore the forecast while an overlapping failed request still needs to surface its error.
2026-11-20 22:51:32 +07:00
..