feat: connection lost/reconnected banner with i18n
Adds a slim animated banner below the header that: - Shows 'Connection lost — reconnecting…' with spinner when WS drops - Flashes 'Reconnected!' with auto-dismiss after 3s on recovery - Only appears after initial connection (not on first load) - Supports EN/FR via i18n system - Uses aria role=alert for accessibility
This commit is contained in:
@@ -4,6 +4,7 @@ import { Header } from './components/Header';
|
||||
import { Sidebar } from './components/Sidebar';
|
||||
import { Chat } from './components/Chat';
|
||||
import { LoginScreen } from './components/LoginScreen';
|
||||
import { ConnectionBanner } from './components/ConnectionBanner';
|
||||
|
||||
export default function App() {
|
||||
const {
|
||||
@@ -38,6 +39,7 @@ export default function App() {
|
||||
/>
|
||||
<div className="flex-1 flex flex-col min-w-0">
|
||||
<Header status={status} sessionKey={activeSession} onToggleSidebar={() => setSidebarOpen(!sidebarOpen)} activeSessionData={sessions.find(s => s.key === activeSession)} onLogout={logout} />
|
||||
<ConnectionBanner status={status} />
|
||||
<Chat messages={messages} isGenerating={isGenerating} status={status} onSend={sendMessage} onAbort={abort} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user