steipete/CodexBar

Add Zed token spend and plan limits to integration

Aperta

#1995 aperta il 8 lug 2026

 (2 commenti) (2 reazioni) (0 assegnatari)Swift (945 fork)batch import
P2clawsweeper:fix-shape-clearclawsweeper:needs-maintainer-reviewclawsweeper:needs-product-decisionclawsweeper:no-new-fix-prhelp wantedimpact:auth-providerissue-rating: 🌊 off-meta tidepool

Metriche repository

Star
 (12.194 stelle)
Metriche merge PR
 (Merge medio 1g 15h) (323 PR mergiate in 30 g)

Descrizione

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.

Guida contributor