/** * JARVIS — Root App Component * Sets up routing, error boundary, and keyboard shortcuts. */ import React, { useEffect } from 'react' import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom' import { AnimatePresence } from 'framer-motion' import AppLayout from './components/layout/AppLayout' import ChatPage from './components/chat/ChatPage' import ErrorBoundary from './components/layout/ErrorBoundary' import useAppStore from './stores/appStore' export default function App() { const { initializeSession } = useAppStore() useEffect(() => { // Initialize session + fetch health status on app load initializeSession() // Refresh health every 60 seconds const id = setInterval(initializeSession, 60_000) return () => clearInterval(id) }, []) return ( }> } /> } /> ) }