refactor: fixed forefox rendering issues

- Updated NewChatPage to reset state when switching between chats and search spaces.
- Enhanced LayoutDataProvider to reset transient slide-out panels on search space changes.
- Refactored RightPanel to simplify rendering logic and remove unnecessary animations.
- Cleaned up LayoutShell by removing motion components for improved performance.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-03-11 16:37:56 -07:00
parent d960a065b1
commit 042b42a8a0
5 changed files with 55 additions and 86 deletions

View file

@ -1,6 +1,5 @@
"use client";
import { motion } from "motion/react";
import { useMemo, useState } from "react";
import { TooltipProvider } from "@/components/ui/tooltip";
import type { InboxItem } from "@/hooks/use-inbox";
@ -308,27 +307,23 @@ export function LayoutShell({
isResizing={isResizing}
/>
<motion.main
layout={isResizing ? false : "position"}
style={{ contain: "inline-size" }}
className="flex-1 flex flex-col min-w-0"
>
<main className="flex-1 flex flex-col min-w-0">
<Header />
<div className={cn("flex-1", isChatPage ? "overflow-hidden" : "overflow-auto")}>
{children}
</div>
</motion.main>
</main>
{/* Right panel — tabbed Sources/Report (desktop only) */}
{documentsPanel && (
<RightPanel
documentsPanel={{
open: documentsPanel.open,
onOpenChange: documentsPanel.onOpenChange,
}}
/>
)}
{/* Right panel — tabbed Sources/Report (desktop only) */}
{documentsPanel && (
<RightPanel
documentsPanel={{
open: documentsPanel.open,
onOpenChange: documentsPanel.onOpenChange,
}}
/>
)}
{/* Inbox Sidebar - slide-out panel */}
{inbox && (