From 8bfe97e92e1a153276ef5285dc3c4d14dded73e9 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Tue, 24 Feb 2026 21:47:09 -0300 Subject: [PATCH] fix: allow anonymous chat connections when auth fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Modified chat auth failure handler to proceed with WebSocket connection - Generates anonymous user_id and session_id using crypto.randomUUID() - WebSocket handler already supports anonymous connections (creates UUIDs if not provided) - Removes error notification and retry loop that prevented chat from working This allows chat to work publicly without requiring authentication, which is the expected behavior for public bots. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- ui/suite/chat/chat.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/suite/chat/chat.html b/ui/suite/chat/chat.html index 8efbff0..0771b6d 100644 --- a/ui/suite/chat/chat.html +++ b/ui/suite/chat/chat.html @@ -1100,8 +1100,18 @@ }) .catch(function (e) { console.error("Auth failed:", e); - notify("Failed to connect to chat server", "error"); - setTimeout(proceedWithChatInit, 3000); + // Proceed with anonymous connection - WebSocket handler supports it + currentUserId = crypto.randomUUID ? crypto.randomUUID() : Date.now().toString(); + currentSessionId = crypto.randomUUID ? crypto.randomUUID() : Date.now().toString(); + currentBotId = botName; + currentBotName = botName; + console.log("Anonymous chat:", { + currentUserId: currentUserId, + currentSessionId: currentSessionId, + currentBotId: currentBotId, + currentBotName: currentBotName, + }); + connectWebSocket(); }); }