From a9a3e9992ddcd9277cf28a876dbd9308b428880b Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Tue, 13 Jan 2026 20:52:34 -0600 Subject: [PATCH] CLAUDE: Add error boundary UI for WebSocket failures (HIGH-001) When WebSocket connection fails after max attempts (permanentlyFailed state): - Show red error banner with "Connection Failed" message and "Try Again" button - Loading modal distinguishes between connecting/reconnecting/failed states - "Try Again" button uses manualRetry() to reset state and attempt fresh connection - Yellow reconnecting banner only shows during active reconnection attempts Uses permanentlyFailed state and manualRetry() from HIGH-002. Co-Authored-By: Claude Opus 4.5 --- frontend-sba/pages/games/[id].vue | 54 +++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/frontend-sba/pages/games/[id].vue b/frontend-sba/pages/games/[id].vue index af217f4..3a00f89 100755 --- a/frontend-sba/pages/games/[id].vue +++ b/frontend-sba/pages/games/[id].vue @@ -14,9 +14,39 @@
- +
+
+
+
+ + + +
+
+

+ Connection Failed +

+

+ Unable to connect to the game server after multiple attempts. Please check your internet connection and try again. +

+
+
+ +
+
+ + +
@@ -186,7 +216,10 @@

- {{ isConnecting ? 'Connecting to game...' : 'Connection Failed' }} + {{ isConnecting ? 'Connecting to game...' : permanentlyFailed ? 'Connection Failed' : 'Reconnecting...' }} +

+

+ Unable to reach server after multiple attempts

@@ -196,10 +229,10 @@ Auth: {{ authStore.isAuthenticated ? 'OK' : authStore.isLoading ? 'Checking...' : 'Failed' }}
- - WebSocket: {{ isConnected ? 'Connected' : isConnecting ? 'Connecting...' : 'Disconnected' }} + + WebSocket: {{ isConnected ? 'Connected' : isConnecting ? 'Connecting...' : permanentlyFailed ? 'Failed' : 'Reconnecting...' }}
-

Error: {{ connectionError }}

+

{{ connectionError }}

WS URL: {{ wsDebugUrl }}

@@ -211,10 +244,11 @@