-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
Extend the existing usage bars so they can forecast the expected usage at the quota reset time based on the current consumption velocity, and overlay that forecast on top of the current bar.
Today CodexBar already computes UsagePace, but that answers a different question: it compares current usage with an even-budget baseline. What is still missing is the direct answer users want from the bar itself: if I keep consuming at the current rate until reset, where will this window end up?
Problem
The current UI can tell me:
- how much of the window is used / left
- when the window resets
- whether I am ahead of or behind an even pace
- when I might run out
But it does not show the projected final percentage for the current window. Users still have to mentally convert +7% or Runs out in 3d into a final quota outcome.
Non-goals for the first rollout
- No changes to menu bar title text or brand-icon display modes.
- No widget-specific forecast UI.
- No historical or smoothed forecast model.
- No provider-specific forecast heuristics beyond existing
RateWindowtiming data.
Execution split
#6owns forecast math and the raw projection contract.#5owns the progress bar API and forecast marker rendering primitives.#4owns shared metric/view-model fields and forecast text formatting only.#3owns end-to-end wiring and row visibility decisions.#2owns post-integration docs and regression coverage.
To avoid overlap, forecast must be computed in one place only: downstream UI issues consume the projection contract and must not recompute forecast directly from RateWindow.
Acceptance Criteria
- Usage rows can show a projected end-of-window percentage on the same bar as current usage.
- The textual forecast states the projected percentage at reset.
- Forecast is hidden when the window does not have enough timing information.
- Forecast values over 100% are preserved in text and capped only for drawing.
- Existing pace / historical risk behavior for Codex and Claude is not regressed.
- Unit tests and docs cover the new projection semantics.