From efa1d0bd22acc4a00b04ab84afdccfbfa0de379c Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Tue, 9 Jun 2026 07:23:32 +0200 Subject: [PATCH] Stage 17 #2: extend the offline soft-disable to all server-action buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Following the in-game bar, the Connecting indicator now also visually disables the other proactive (server-sending) controls while offline: chat send + nudge, profile save / link email|telegram / merge-confirm, friends (redeem, get-code, accept/decline, unfriend, block, unblock), New Game (auto-match variant + send-invitation) and the lobby hide ❌. Purely local controls (board/rack/reset, menus, navigation, settings, copy-code) stay live. Each reads the global connection.online signal; full e2e + check green. --- PLAN.md | 6 ++++-- ui/src/game/Chat.svelte | 5 +++-- ui/src/game/Game.svelte | 2 +- ui/src/screens/Friends.svelte | 15 ++++++++------- ui/src/screens/Lobby.svelte | 3 ++- ui/src/screens/NewGame.svelte | 5 +++-- ui/src/screens/Profile.svelte | 11 ++++++----- 7 files changed, 27 insertions(+), 20 deletions(-) diff --git a/PLAN.md b/PLAN.md index 3050036..f4b0b22 100644 --- a/PLAN.md +++ b/PLAN.md @@ -1457,8 +1457,10 @@ provided cert) at the contour caddy; prod VPN; rollback. still **opens with the spinner** and fills on reconnect (global indicator + read auto-retry), so navigation is never dead. Pure policy unit-tested (`retry.ts`); a mock-only `window.__conn` hook drives a Chromium+WebKit e2e (indicator appears offline, the action disables, both clear - on reconnect). Other server-action buttons (chat send, profile save, …) are not yet visually - disabled but degrade to a safe no-op (the suppressed toast + indicator) — easy to extend. + on reconnect). The visual soft-disable spans the server-action buttons across the app: the + game bar (commit/exchange/pass/hint/resign), chat send + nudge, profile save / link / merge, + friends (request/respond/unfriend/block/code), New Game (auto-match + invite) and the lobby + hide ❌; purely local controls (board/rack/reset, menu, navigation, settings) stay live. ## Deferred TODOs (cross-stage) diff --git a/ui/src/game/Chat.svelte b/ui/src/game/Chat.svelte index f1a6dd0..10ec271 100644 --- a/ui/src/game/Chat.svelte +++ b/ui/src/game/Chat.svelte @@ -1,6 +1,7 @@