Skip to content

Add quota exhaustion projection overlay to usage bars #1

@kmatsunami

Description

@kmatsunami

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 RateWindow timing data.

Execution split

  • #6 owns forecast math and the raw projection contract.
  • #5 owns the progress bar API and forecast marker rendering primitives.
  • #4 owns shared metric/view-model fields and forecast text formatting only.
  • #3 owns end-to-end wiring and row visibility decisions.
  • #2 owns 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.

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