[BUG] Context window progress bar fill width doesn't match displayed percentage (under-fills by ~15-20%)
Description
In the usage / context overlay panel, the Context window progress bar is visually filled significantly less than the percentage shown in the label. The numeric label reads 82%, but the blue filled portion of the bar reaches only ~64% of the track width — an under-fill of roughly 15-20%.
The "Plan usage" bars below it (5-hour limit 17%, Weekly 4%) appear to render at roughly the correct width, so the discrepancy seems specific to the context-window bar.
<img width="412" height="266" alt="Image" src="https://github.com/user-attachments/assets/b2660a5c-c466-4ff6-b6c8-d0a0c5260070" />
Steps to reproduce
- Open the usage overlay panel (the floating panel that shows "Context window … (xx%)" and "Plan usage").
- Let the context window fill up (here: 164.6k / 200.0k = 82%).
- Compare the width of the blue fill against the label percentage.
Expected
The fill width should match the displayed percentage — at 82% the bar should be filled ~82% of the track.
Actual
- Label:
164.6k / 200.0k (82%) - Bar fill measured from the screenshot: ~64% of the track width
- Mismatch: ~15-18% under-filled
Possible cause: the bar may be scaling against a larger denominator than 200k (e.g. reserving headroom for an auto-compact window) while the label divides by 200k. Or a max-width / inset rounding bug in the fill calculation.
Environment
- OS: macOS (Darwin 25.3.0)
- Model shown: Opus 4.8
- Surface: usage/context overlay panel
A screenshot is available and can be attached to this issue.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗