feat(dashboard): show projectId warning in Live Account Monitor

Add warning indicator on Antigravity account dots when projectId is
missing. Matches the warning shown in Provider Editor for consistency.
This commit is contained in:
kaitranntt
2026-01-15 11:59:41 -05:00
parent bc02ecc94c
commit 28b0faa0cb
@@ -3,10 +3,11 @@
*/ */
import type React from 'react'; import type React from 'react';
import { ChevronRight } from 'lucide-react'; import { ChevronRight, AlertTriangle } from 'lucide-react';
import { cn, STATUS_COLORS } from '@/lib/utils'; import { cn, STATUS_COLORS } from '@/lib/utils';
import { PROVIDER_COLORS } from '@/lib/provider-config'; import { PROVIDER_COLORS } from '@/lib/provider-config';
import { ProviderIcon } from '@/components/shared/provider-icon'; import { ProviderIcon } from '@/components/shared/provider-icon';
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
import type { ProviderStats } from '../types'; import type { ProviderStats } from '../types';
import { getSuccessRate, cleanEmail } from '../utils'; import { getSuccessRate, cleanEmail } from '../utils';
import { InlineStatsBadge } from './inline-stats-badge'; import { InlineStatsBadge } from './inline-stats-badge';
@@ -102,16 +103,35 @@ export function ProviderCard({
</div> </div>
</div> </div>
{/* Account color dots */} {/* Account color dots with warning for agy accounts missing projectId */}
<div className="flex gap-1 mt-3"> <div className="flex gap-1 mt-3 items-center">
{stats.accounts.slice(0, 5).map((acc) => ( {stats.accounts.slice(0, 5).map((acc) => {
<div const isMissingProjectId = stats.provider === 'agy' && !acc.projectId;
key={acc.id} return (
className="w-2 h-2 rounded-full" <div key={acc.id} className="relative">
style={{ backgroundColor: acc.color }} <div
title={privacyMode ? '••••••' : cleanEmail(acc.email)} className="w-2 h-2 rounded-full"
/> style={{ backgroundColor: acc.color }}
))} title={privacyMode ? '••••••' : cleanEmail(acc.email)}
/>
{isMissingProjectId && (
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<AlertTriangle
className="absolute -top-1 -right-1 w-2.5 h-2.5 text-amber-500"
aria-label="Missing Project ID"
/>
</TooltipTrigger>
<TooltipContent side="top" className="text-xs">
Missing Project ID - re-add account to fix
</TooltipContent>
</Tooltip>
</TooltipProvider>
)}
</div>
);
})}
{stats.accounts.length > 5 && ( {stats.accounts.length > 5 && (
<span className="text-[10px] text-muted-foreground ml-1"> <span className="text-[10px] text-muted-foreground ml-1">
+{stats.accounts.length - 5} +{stats.accounts.length - 5}