From 6abe86806f1419eb9b39534facf2df2c3ebe0649 Mon Sep 17 00:00:00 2001 From: adamelmore <2363879+adamdottv@users.noreply.github.com> Date: Sat, 24 Jan 2026 08:30:08 -0600 Subject: [PATCH] fix(app): better error screen when connecting to sidecar --- packages/desktop/src/index.tsx | 45 +++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/packages/desktop/src/index.tsx b/packages/desktop/src/index.tsx index f9eb19a585..fe9e3f92e2 100644 --- a/packages/desktop/src/index.tsx +++ b/packages/desktop/src/index.tsx @@ -370,18 +370,51 @@ function ServerGate(props: { children: (data: Accessor) => JSX. }), ) + const errorMessage = () => { + const error = serverData.error + if (!error) return "Unknown error" + if (typeof error === "string") return error + if (error instanceof Error) return error.message + return String(error) + } + + const restartApp = async () => { + await invoke("kill_sidecar").catch(() => undefined) + await relaunch().catch(() => undefined) + } + return ( // Not using suspense as not all components are compatible with it (undefined refs) - -
-
+ + +
+
+ } + > + {(data) => props.children(data)} +
} > - {(data) => props.children(data)} +
+
OpenCode failed to start
+
+ The local OpenCode server could not be started. Restart the app, or check your network settings (VPN/proxy) + and try again. +
+
+
{errorMessage()}
+
+ +
+
) }