From fdf14d589749e2918913c54eb6f3610129c165b5 Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Mon, 6 Jul 2026 16:12:50 +0200 Subject: [PATCH] fix(offline): skip the NewGame friend fetch offline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NewGame's onMount fetched the friend list (gateway.friendsList) for a non-guest; offline the transport kill switch refuses it, so it toasted on entering the New Game screen (the local game still created fine). The friends section is hidden offline anyway — skip the fetch when offline. --- ui/src/screens/NewGame.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/screens/NewGame.svelte b/ui/src/screens/NewGame.svelte index e3597c9..751b244 100644 --- a/ui/src/screens/NewGame.svelte +++ b/ui/src/screens/NewGame.svelte @@ -112,7 +112,9 @@ ); onMount(async () => { - if (guest) return; + // Offline mode offers only the local vs_ai flow (the friends section is hidden), and the network + // is off, so skip the friend fetch — it would be refused by the transport and toast an error. + if (guest || offlineMode.active) return; try { friends = await gateway.friendsList(); } catch (e) {