From 5f76931941b9f64a6d94ef1af62562a4e1f561ad Mon Sep 17 00:00:00 2001 From: MK Fain Date: Wed, 3 Dec 2025 21:22:47 -0600 Subject: [PATCH] Hide GlobalChatPane on settings pages - Added useLocation hook to GlobalChatPane component - Added check to hide GlobalChatPane when on settings pages (pathname starts with '/settings') - Matches existing behavior of FloatingChatButton which already hides on settings pages - Ensures consistent UX where both the chat button and pane are hidden in settings --- src/components/GlobalChatPane.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/GlobalChatPane.tsx b/src/components/GlobalChatPane.tsx index 4f1ca611..7fa59de5 100644 --- a/src/components/GlobalChatPane.tsx +++ b/src/components/GlobalChatPane.tsx @@ -1,5 +1,6 @@ import { useState, useRef, useEffect, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { useLocation } from 'react-router-dom'; import { X, Trash2, Copy, Check, ChevronDown, ArrowUp, Square, Loader2 } from 'lucide-react'; import { Streamdown } from 'streamdown'; import { Button } from '@/components/ui/button'; @@ -95,6 +96,7 @@ export function GlobalChatPane() { const { config } = useAppContext(); const { settings } = useAISettings(); const isMobile = useIsMobile(); + const location = useLocation(); const [input, setInput] = useState(''); const [showScrollToBottom, setShowScrollToBottom] = useState(false); @@ -191,6 +193,11 @@ export function GlobalChatPane() { return null; } + // Don't render on settings pages + if (location.pathname.startsWith('/settings')) { + return null; + } + const hasProviders = settings.providers.length > 0; // Mobile: Full screen drawer from bottom