hide Chat header in GlobalChatPane when mobile toggle is present

The header is redundant in mobile view since context is clear from the toggle button
This commit is contained in:
MK Fain committed 2025-12-03 22:16:49 -06:00
1 parent 093423ea0b
commit ee784b149e
1 file changed
+25 -20
+25 -20
View File
@@ -210,29 +210,34 @@ export function GlobalChatPane({ embedded = false, mobileChatMode, onMobileChatM
// Embedded mode: Render inline without fixed positioning
if (embedded) {
// Hide header when there's a mode toggle (mobile view with switching)
const showHeader = !mobileChatMode;
return (
<div className="h-full flex flex-col bg-background">
{/* Header */}
<div className="flex items-center justify-between px-4 py-3 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
<h2 className="font-semibold text-lg">{t('globalChat')}</h2>
<div className="flex items-center gap-1">
{messages.length > 0 && (
<Tooltip>
<TooltipTrigger asChild>
<Button
variant="ghost"
size="icon"
className="h-8 w-8"
onClick={clearMessages}
>
<Trash2 className="h-4 w-4" />
</Button>
</TooltipTrigger>
<TooltipContent>{t('clearChat')}</TooltipContent>
</Tooltip>
)}
{/* Header - hidden when mobile toggle is present */}
{showHeader && (
<div className="flex items-center justify-between px-4 py-3 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
<h2 className="font-semibold text-lg">{t('globalChat')}</h2>
<div className="flex items-center gap-1">
{messages.length > 0 && (
<Tooltip>
<TooltipTrigger asChild>
<Button
variant="ghost"
size="icon"
className="h-8 w-8"
onClick={clearMessages}
>
<Trash2 className="h-4 w-4" />
</Button>
</TooltipTrigger>
<TooltipContent>{t('clearChat')}</TooltipContent>
</Tooltip>
)}
</div>
</div>
</div>
)}
{/* Messages */}
<div