Skip to content

Commit ebe5a2b

Browse files
authored
fix(app): remount SDK/sync tree when server URL changes (#13437)
1 parent 9f20e0d commit ebe5a2b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/app/src/app.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import "@/index.css"
2-
import { ErrorBoundary, Suspense, lazy, type JSX, type ParentProps } from "solid-js"
2+
import { ErrorBoundary, Show, Suspense, lazy, type JSX, type ParentProps } from "solid-js"
33
import { Router, Route, Navigate } from "@solidjs/router"
44
import { MetaProvider } from "@solidjs/meta"
55
import { Font } from "@opencode-ai/ui/font"
@@ -156,8 +156,11 @@ export function AppBaseProviders(props: ParentProps) {
156156

157157
function ServerKey(props: ParentProps) {
158158
const server = useServer()
159-
if (!server.url) return null
160-
return props.children
159+
return (
160+
<Show when={server.url} keyed>
161+
{props.children}
162+
</Show>
163+
)
161164
}
162165

163166
export function AppInterface(props: { defaultUrl?: string; children?: JSX.Element; isSidecar?: boolean }) {

0 commit comments

Comments
 (0)