diff --git a/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/utils.js b/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/utils.js index 0e916d4d..24e9f875 100644 --- a/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/utils.js +++ b/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/utils.js @@ -165,6 +165,10 @@ export function parseQuotaData(provider, data) { // quota, both with same shape: {total, used, remaining, unit, resetAt}. // Skip an organization bucket when its total is 0 — most personal // Qoder accounts won't have one and rendering "0/0" is misleading. + // Don't forward Qoder's `remaining` field: it's an absolute credit + // count, but getRemainingPercentage / QuotaTable interpret + // `remaining` as a 0-100 percentage and would render 348 credits + // as "348%". The percentage is computed from used/total instead. if (data.quotas) { Object.entries(data.quotas).forEach(([quotaType, quota]) => { if (quotaType === "organization" && (!quota || (Number(quota.total) || 0) === 0)) { @@ -174,7 +178,6 @@ export function parseQuotaData(provider, data) { name: quotaType === "user" ? "Personal" : quotaType === "organization" ? "Organization" : quotaType, used: quota.used || 0, total: quota.total || 0, - remaining: quota.remaining, unit: quota.unit, resetAt: quota.resetAt || null, });