diff --git a/app/main.py b/app/main.py index 0184262..c52121a 100644 --- a/app/main.py +++ b/app/main.py @@ -2471,7 +2471,13 @@ async def admin_overview(request: Request): for email, active, balance, user_id in rows: team = teams.get(f"member:{email}", {}) spend = float(team.get("spend") or 0.0) - member_all_time = all_time_spend.get(f"member:{email}", 0.0) + member_all_time = float(all_time_spend.get(f"member:{email}", 0.0)) + # Normalize floating-point residue (e.g. -5.55e-17 after a cycle reset) + # so the panel/dashboards never render "-0.00". + if abs(spend) < 1e-9: + spend = 0.0 + if abs(member_all_time) < 1e-9: + member_all_time = 0.0 credits = get_credit_balance(email) eff = compute_max_budget( float(balance) if balance is not None else MEMBER_BUDGET,