From 6129681035b3cc39c674d78ca5e87f4b4c6eb2b4 Mon Sep 17 00:00:00 2001 From: Sandro Date: Tue, 27 Oct 2026 20:57:05 +0100 Subject: [PATCH] chore(logging): remove excessive console.log and console.info statements in frontend --- frontend/src/lib/api.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index 4b63a4f..d264ce3 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -1135,7 +1135,6 @@ const globalSubscribedRooms = new Set(); function notifyRealtimeStatusChange(connected: boolean, transport: RealtimeTransport) { isRealtimeConnectedState = connected; activeTransport = transport; - console.log(`[MindSift Realtime] Verbindungsstatus geƤndert: connected=${connected}, transport=${transport}`); realtimeStatusListeners.forEach((fn) => { try { fn(connected, transport); @@ -1180,17 +1179,14 @@ export function connectSSE(rooms?: string[]): void { try { const url = buildSSEURL(undefined, undefined, Array.from(globalSubscribedRooms)); - console.log(`[MindSift Realtime] Verbinde SSE zu ${url}...`); const es = new EventSource(url); activeGlobalSSE = es; es.onopen = () => { - console.info('[MindSift Realtime] Server-Sent Events (SSE) erfolgreich verbunden (Corporate Fallback aktiv).'); sseReconnectDelay = 2000; notifyRealtimeStatusChange(true, 'sse'); if (activeSSEId && globalSubscribedRooms.size > 0) { globalSubscribedRooms.forEach((room) => { - console.log(`[MindSift Realtime] SSE Rejoin Room "${room}"`); api.joinSSERoom(activeSSEId!, room, 'join').catch(() => {}); }); } @@ -1199,13 +1195,10 @@ export function connectSSE(rooms?: string[]): void { es.onmessage = (event) => { try { const msg = JSON.parse(event.data) as WSMessage; - console.log('[MindSift Realtime Event] [SSE]', msg.event, msg.payload); if (msg.event === 'SSE_CONNECTED') { activeSSEId = msg.payload?.sseId || null; - console.log('[MindSift Realtime] SSE-Client registriert mit ID:', activeSSEId); if (activeSSEId && globalSubscribedRooms.size > 0) { globalSubscribedRooms.forEach((room) => { - console.log(`[MindSift Realtime] Trete Raum per SSE bei: "${room}"`); api.joinSSERoom(activeSSEId!, room, 'join').catch(() => {}); }); } @@ -1254,7 +1247,6 @@ export function connectWebSocket(): void { // If proxy blocked WebSocket previously, do not attempt failing WebSocket; stay on SSE if (isWsBlockedByProxy) { - console.info('[MindSift Realtime] WebSocket im Firmennetzwerk blockiert (Cache aktiv). Verwende direkt SSE.'); connectSSE(); return; } @@ -1269,7 +1261,6 @@ export function connectWebSocket(): void { try { const url = buildWebSocketURL(); - console.log(`[MindSift Realtime] Versuche WebSocket-Verbindung zu ${url}...`); const ws = new WebSocket(url); activeGlobalWS = ws; @@ -1282,7 +1273,6 @@ export function connectWebSocket(): void { ws.onopen = () => { clearTimeout(wsConnectionWatchdog); - console.info('[MindSift Realtime] WebSocket erfolgreich verbunden!'); if (activeGlobalSSE) { try { activeGlobalSSE.close(); } catch {} activeGlobalSSE = null; @@ -1292,7 +1282,6 @@ export function connectWebSocket(): void { if (globalSubscribedRooms.size > 0) { globalSubscribedRooms.forEach((room) => { try { - console.log(`[MindSift Realtime] Trete Raum per WS bei: "${room}"`); ws.send(JSON.stringify({ event: 'JOIN_ROOM', room })); } catch {} }); @@ -1302,7 +1291,6 @@ export function connectWebSocket(): void { ws.onmessage = (event) => { try { const msg = JSON.parse(event.data) as WSMessage; - console.log('[MindSift Realtime Event] [WS]', msg.event, msg.payload); wsListeners.forEach((fn) => { try { fn(msg);