From a2ac043aedfe97975bf592f68a0760ecb1ab0556 Mon Sep 17 00:00:00 2001 From: poyrazavsever Date: Tue, 9 Jun 2026 16:03:49 +0300 Subject: [PATCH] feat: add responsive mobile-friendly sidebar for chat sessions --- app/(dashboard)/chat/page.tsx | 137 +++++++++++++++++++++------------- 1 file changed, 84 insertions(+), 53 deletions(-) diff --git a/app/(dashboard)/chat/page.tsx b/app/(dashboard)/chat/page.tsx index 19708cf..c12fb7a 100644 --- a/app/(dashboard)/chat/page.tsx +++ b/app/(dashboard)/chat/page.tsx @@ -42,6 +42,7 @@ export default function AIChatPage() { const [sessions, setSessions] = useState([]); const [activeSessionId, setActiveSessionId] = useState(null); const [input, setInput] = useState(""); + const [isMobileSessionsOpen, setIsMobileSessionsOpen] = useState(false); const messagesEndRef = useRef(null); const { messages, sendMessage, setMessages, status, stop } = useChat({ @@ -158,55 +159,85 @@ export default function AIChatPage() { await sendMessage({ text: currentInput }, { body: { sessionId } }); } - return ( -
-
+ + ); + + return ( +
+ + {/* Desktop Sidebar */} + -
-
+ {/* Mobile Sidebar Overlay */} + {isMobileSessionsOpen && ( +
setIsMobileSessionsOpen(false)} + /> + )} + + {/* Mobile Sidebar Drawer */} + +
+
@@ -216,8 +247,8 @@ export default function AIChatPage() {

Kayıtlı verilerin hakkında soru sor.

-
@@ -264,8 +295,8 @@ export default function AIChatPage() {
-
-
+ +