From a5dc5687f8a402f368bd7421fd9dca206b574620 Mon Sep 17 00:00:00 2001 From: Chris Staley Date: Mon, 30 Mar 2026 10:03:10 -0600 Subject: [PATCH] fix: remove auto-opening OAuth/API key modal on provider detail page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-opening the "Add Connection" dialog when navigating to a provider with zero connections was a poor UX pattern. It surprised users who were simply browsing provider details (e.g. after deleting a connection or checking settings). The page already displays a clear empty state with an "Add Connection" button — users should click it when ready. --- .../dashboard/providers/[id]/page.tsx | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/src/app/(dashboard)/dashboard/providers/[id]/page.tsx b/src/app/(dashboard)/dashboard/providers/[id]/page.tsx index 66488b657e..6da47e5bdb 100644 --- a/src/app/(dashboard)/dashboard/providers/[id]/page.tsx +++ b/src/app/(dashboard)/dashboard/providers/[id]/page.tsx @@ -802,7 +802,6 @@ export default function ProviderDetailPage() { const { copied, copy } = useCopyToClipboard(); const t = useTranslations("providers"); const notify = useNotificationStore(); - const hasAutoOpened = useRef(false); const userDismissed = useRef(false); const [proxyTarget, setProxyTarget] = useState(null); const [proxyConfig, setProxyConfig] = useState(null); @@ -989,25 +988,12 @@ export default function ProviderDetailPage() { } }, [loading, connections, loadConnProxies]); - // Auto-open Add Connection modal when no connections exist (better UX) - // Only fires once on initial load, not on HMR remounts or after user dismissal - useEffect(() => { - if ( - !loading && - connections.length === 0 && - providerInfo && - !isCompatible && - !hasAutoOpened.current && - !userDismissed.current - ) { - hasAutoOpened.current = true; - if (isOAuth) { - setShowOAuthModal(true); - } else { - setShowAddApiKeyModal(true); - } - } - }, [loading]); // eslint-disable-line react-hooks/exhaustive-deps + // NOTE: Removed auto-open of Add Connection modal when no connections exist. + // The page already shows a clear "No connections yet" empty state with an + // "Add Connection" button. Auto-opening the modal was a poor UX pattern that + // surprised users navigating to a provider detail page — especially when + // re-visiting a provider after deleting a connection. Users should explicitly + // click the button when they're ready to connect. const handleSetAlias = async (modelId, alias, providerAliasOverride = providerAlias) => { const fullModel = `${providerAliasOverride}/${modelId}`;