fix: show "Unlimited budget" when budget is $0
When budgetCents is 0 (no budget set), the UI now shows "Unlimited budget" instead of misleading "0% of $0.00 budget" throughout: - Dashboard: metric card shows "Unlimited budget" instead of percentage - Companies: shows "Unlimited budget" label instead of "/ $0.00" - Costs: hides utilization percent and progress bar, shows "Unlimited budget" - Inbox: suppresses budget utilization alert when no budget is set Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -195,7 +195,7 @@ export function Inbox() {
|
||||
!!dashboard && dashboard.agents.error > 0 && !hasRunFailures;
|
||||
const hasAlerts =
|
||||
!!dashboard &&
|
||||
(showAggregateAgentError || dashboard.costs.monthUtilizationPercent >= 80);
|
||||
(showAggregateAgentError || (dashboard.costs.monthBudgetCents > 0 && dashboard.costs.monthUtilizationPercent >= 80));
|
||||
const hasStale = staleIssues.length > 0;
|
||||
const hasContent = hasActionableApprovals || hasRunFailures || hasAlerts || hasStale;
|
||||
|
||||
@@ -339,7 +339,7 @@ export function Inbox() {
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
{dashboard!.costs.monthUtilizationPercent >= 80 && (
|
||||
{dashboard!.costs.monthBudgetCents > 0 && dashboard!.costs.monthUtilizationPercent >= 80 && (
|
||||
<div
|
||||
className="flex cursor-pointer items-center gap-3 px-4 py-3 transition-colors hover:bg-accent/50"
|
||||
onClick={() => navigate("/costs")}
|
||||
|
||||
Reference in New Issue
Block a user