From e22d331bf19131c47ec59522c8fc573e257d4381 Mon Sep 17 00:00:00 2001 From: Tam Nhu Tran Date: Tue, 24 Feb 2026 18:24:40 +0700 Subject: [PATCH] fix(ui): unify gemini and agy safety warning banner - collapse provider-specific warning variants into one shared card - keep issue #509 as the single risk reference for both flows - reuse cliproxy warning card space for Settings > Proxy pointer --- .../account/account-safety-warning-card.tsx | 42 +++++++++---------- .../components/account/add-account-dialog.tsx | 1 - ui/src/pages/cliproxy.tsx | 3 +- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/ui/src/components/account/account-safety-warning-card.tsx b/ui/src/components/account/account-safety-warning-card.tsx index b453f6de..8272caab 100644 --- a/ui/src/components/account/account-safety-warning-card.tsx +++ b/ui/src/components/account/account-safety-warning-card.tsx @@ -1,4 +1,4 @@ -import { AlertTriangle, ExternalLink } from 'lucide-react'; +import { AlertTriangle, ExternalLink, Settings2 } from 'lucide-react'; import { Badge } from '@/components/ui/badge'; import { Checkbox } from '@/components/ui/checkbox'; import { Label } from '@/components/ui/label'; @@ -6,45 +6,36 @@ import { cn } from '@/lib/utils'; interface AccountSafetyWarningCardProps { className?: string; - provider?: 'gemini' | 'agy'; showAcknowledgement?: boolean; acknowledged?: boolean; onAcknowledgedChange?: (value: boolean) => void; disabled?: boolean; + showProxySettingsLink?: boolean; } export function AccountSafetyWarningCard({ className, - provider = 'gemini', showAcknowledgement = false, acknowledged = false, onAcknowledgedChange, disabled = false, + showProxySettingsLink = false, }: AccountSafetyWarningCardProps) { - const isAgy = provider === 'agy'; - - const title = isAgy ? 'Antigravity OAuth Risk' : 'Account Safety Warning'; - const subtitle = isAgy - ? 'Issue #509 · Third-party OAuth ban risk' - : 'Issue #509 · Shared Gemini + AGY account risk'; - const firstLine = isAgy ? ( + const title = 'OAuth Account Safety Warning'; + const subtitle = 'Issue #509 · Gemini + AGY OAuth risk'; + const firstLine = ( <> - Antigravity OAuth currently has active ban/suspension patterns. Complete the responsibility - steps before running auth or starting ccs agy. - - ) : ( - <> - Using one Google account for both ccs gemini and{' '} - ccs agy can trigger account disable/ban. + Issue #509 documents suspension/ban reports tied to ccs agy{' '} + and shared-account usage between ccs gemini and{' '} + ccs agy. ); - const secondLine = isAgy ? ( - <>If you want to keep this account, do not continue unless you accept full responsibility. - ) : ( - <>If you want to keep Google AI access, do not continue this shared-account setup. + const secondLine = ( + <>Continue only if you accept full responsibility for OAuth and account-access risk. ); const issueUrl = 'https://github.com/kaitranntt/ccs/issues/509'; const issueLabel = 'Read issue #509'; + const proxySettingsLabel = 'Gemini + AGY controls: Settings > Proxy'; return (
+ {showProxySettingsLink && ( + + + {proxySettingsLabel} + + )} Applies to CLI and dashboard auth diff --git a/ui/src/components/account/add-account-dialog.tsx b/ui/src/components/account/add-account-dialog.tsx index 3d064d04..a387eb92 100644 --- a/ui/src/components/account/add-account-dialog.tsx +++ b/ui/src/components/account/add-account-dialog.tsx @@ -347,7 +347,6 @@ export function AddAccountDialog({ {requiresSafetyAcknowledgement && !showAuthUI && ( { diff --git a/ui/src/pages/cliproxy.tsx b/ui/src/pages/cliproxy.tsx index d340a142..35c7704c 100644 --- a/ui/src/pages/cliproxy.tsx +++ b/ui/src/pages/cliproxy.tsx @@ -248,7 +248,6 @@ export function CliproxyPage() { .toLowerCase() .trim(); const showAccountSafetyWarning = warningProvider === 'gemini' || warningProvider === 'agy'; - const warningProviderType = warningProvider === 'agy' ? 'agy' : 'gemini'; const handleRefresh = () => { queryClient.invalidateQueries({ queryKey: ['cliproxy'] }); @@ -396,7 +395,7 @@ export function CliproxyPage() { {/* Right Panel */}
{showAccountSafetyWarning && ( - + )} {selectedVariantData && parentAuthForVariant ? (