summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/desktop/src-tauri/src/lib.rs2
-rw-r--r--packages/desktop/src/index.tsx11
2 files changed, 8 insertions, 5 deletions
diff --git a/packages/desktop/src-tauri/src/lib.rs b/packages/desktop/src-tauri/src/lib.rs
index c96abd9f4..cb937401d 100644
--- a/packages/desktop/src-tauri/src/lib.rs
+++ b/packages/desktop/src-tauri/src/lib.rs
@@ -139,7 +139,7 @@ fn spawn_sidecar(app: &AppHandle, port: u32) -> CommandChild {
.args([
"-il",
"-c",
- &format!("{} serve --port={}", sidecar.display(), port),
+ &format!("\"{}\" serve --port={}", sidecar.display(), port),
])
.spawn()
.expect("Failed to spawn opencode")
diff --git a/packages/desktop/src/index.tsx b/packages/desktop/src/index.tsx
index 94cb887f5..ef264fe7e 100644
--- a/packages/desktop/src/index.tsx
+++ b/packages/desktop/src/index.tsx
@@ -18,6 +18,7 @@ import { Suspense, createResource, ParentProps } from "solid-js"
import { UPDATER_ENABLED } from "./updater"
import { createMenu } from "./menu"
import pkg from "../package.json"
+import { Show } from "solid-js";
const root = document.getElementById("root")
if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
@@ -288,7 +289,9 @@ function ServerGate(props: ParentProps) {
})
return (
- <Suspense
+ // Not using suspense as not all components are compatible with it (undefined refs)
+ <Show
+ when={status.state !== "pending"}
fallback={
<div class="h-screen w-screen flex flex-col items-center justify-center bg-background-base">
<Logo class="w-xl opacity-12 animate-pulse" />
@@ -296,9 +299,9 @@ function ServerGate(props: ParentProps) {
</div>
}
>
- {/* Triggers suspense/error boundaries without rendering the returned value */}
+ {/* Trigger error boundary without rendering the returned value */}
{(status(), null)}
- <Suspense>{props.children}</Suspense>
- </Suspense>
+ {props.children}
+ </Show>
)
}