diff --git a/frontend/src/components/layout/AISidebar.tsx b/frontend/src/components/layout/AISidebar.tsx index 5da8b7e..b48415d 100644 --- a/frontend/src/components/layout/AISidebar.tsx +++ b/frontend/src/components/layout/AISidebar.tsx @@ -5,7 +5,7 @@ import { createSession, fetchSessions } from '@/api/ai'; import { useUIStore } from '@/store/uiStore'; export function AISidebar() { - const { setAISidebarOpen } = useUIStore(); + const { aiSidebarCollapsed, toggleAISidebar } = useUIStore(); const [sessionId, setSessionId] = useState(null); const [loading, setLoading] = useState(true); @@ -27,6 +27,28 @@ export function AISidebar() { })(); }, []); + // Collapsed: narrow icon strip + if (aiSidebarCollapsed) { + return ( +
+ +
+ ); + } + + // Expanded: full chat panel with resize handle return ( KI Assistent
diff --git a/frontend/src/components/layout/AppShell.tsx b/frontend/src/components/layout/AppShell.tsx index 70a2085..c46a995 100644 --- a/frontend/src/components/layout/AppShell.tsx +++ b/frontend/src/components/layout/AppShell.tsx @@ -8,11 +8,10 @@ import { ToastContainer } from '@/components/ui/Toast'; import { useUIStore } from '@/store/uiStore'; export function AppShell() { - const { aiSidebarOpen } = useUIStore(); const location = useLocation(); // Hide AI sidebar on the AI Assistant page itself - const showAISidebar = aiSidebarOpen && !location.pathname.startsWith('/ai-assistant'); + const showAISidebar = !location.pathname.startsWith('/ai-assistant'); return (
@@ -30,9 +29,10 @@ export function AppShell() { > - {showAISidebar && }
+ {/* AI Sidebar — full height, right of TopBar and Toolbar */} + {showAISidebar && } ); diff --git a/frontend/src/components/layout/TopBar.tsx b/frontend/src/components/layout/TopBar.tsx index f4868ad..a971579 100644 --- a/frontend/src/components/layout/TopBar.tsx +++ b/frontend/src/components/layout/TopBar.tsx @@ -14,7 +14,7 @@ export function TopBar() { const { t } = useTranslation(); const navigate = useNavigate(); const { user } = useAuthStore(); - const { toggleSidebar, toggleAISidebar } = useUIStore(); + const { toggleSidebar, toggleAISidebar, aiSidebarCollapsed } = useUIStore(); const { currentTenant, availableTenants, switchTenant, isSwitching } = useTenant(); const logoutMutation = useLogout(); @@ -72,7 +72,10 @@ export function TopBar() { {/* AI Assistant toggle */}