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

@ -262,6 +262,15 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid
}
}, [pendingNewChat, params?.chat_id, router, searchSpaceId, resetCurrentThread]);
// Reset transient slide-out panels when switching search spaces.
// Some browsers can retain overlay/backdrop state across route transitions.
useEffect(() => {
setIsInboxSidebarOpen(false);
setIsAllSharedChatsSidebarOpen(false);
setIsAllPrivateChatsSidebarOpen(false);
setIsAnnouncementsSidebarOpen(false);
}, [searchSpaceId]);
const searchSpaces: SearchSpace[] = useMemo(() => {
if (!searchSpacesData || !Array.isArray(searchSpacesData)) return [];
return searchSpacesData.map((space) => ({