feat(usage): show Zed plan quota on the dashboard

Add a Zed usage handler so connected Zed accounts appear on
/dashboard/quota. Reads GET /client/users/me for plan, edit
predictions, optional hosted model requests and billing-cycle reset.

Render unlimited rows as "N used · Unlimited" instead of 0 / ∞, and
surface overdue-invoice / token-billing messages.
This commit is contained in:
Amir Seify authored and decolua committed 2026-08-28 16:16:01 +07:00
1 parent 67d9182e1a
commit e5a13c3ab7
8 files changed
+459 -12

No files matched your search

@@ -558,6 +558,22 @@ export function parseQuotaData(provider, data) {
}
break;
case "zed":
// Edit predictions + optional hosted model_requests; unlimited uses remainingPercentage.
if (data.quotas) {
Object.entries(data.quotas).forEach(([name, quota]) => {
normalizedQuotas.push({
name,
used: quota.used || 0,
total: quota.total || 0,
resetAt: quota.resetAt || null,
remainingPercentage: quota.remainingPercentage,
unlimited: quota.unlimited,
});
});
}
break;
default:
// Generic fallback for unknown providers
if (data.quotas) {