steipete/CodexBar
Add Zed token spend and plan limits to integration
Ouverte
#1 995 ouverte le 8 juil. 2026
P2clawsweeper:fix-shape-clearclawsweeper:needs-maintainer-reviewclawsweeper:needs-product-decisionclawsweeper:no-new-fix-prhelp wantedimpact:auth-providerissue-rating: 🌊 off-meta tidepool
Métriques du dépôt
- Stars
- (12 194 étoiles)
- Métriques de merge PR
- (Merge moyen 1j 15h) (323 PRs mergées en 30 j)
Description
Summary
Please expand the Zed integration to include token spend information and plan limits, so usage can be tracked without opening the Zed account page.
Motivation
CodexBar is great for quick usage visibility across providers. Adding Zed token spend + limits would make Zed usage equally visible in the menu bar and help avoid unexpected overages.
Reference
Zed pricing/plans docs: https://zed.dev/docs/account/plans-and-pricing
Requested behaviour
- Show Zed Token Spend in CodexBar.
- Show Zed limit/quota (where available from Zed data source).
- Show remaining amount (limit - spend), if both values are available.
- If limit data is unavailable, still show spend and a clear “limit unavailable” state.
Suggested UI
- In the Zed section, display:
- Spent
- Limit
- Remaining
- Billing/usage period (if available)
Implementation notes (suggestion)
- Add a typed model for Zed usage fields (spent, limit, remaining, period).
- Keep parsing resilient to missing/partial fields.
- Add tests for:
- successful parsing
- missing limit
- malformed payload fallback
- remaining calculation
Acceptance criteria
- Zed spend appears in CodexBar.
- Zed limit appears when available.
- Remaining is correct when spend + limit exist.
- No crash on incomplete data.
- Tests cover parser and value-calculation paths.