From cecaf82445926074954dff61a9fd00bf37d4fcca Mon Sep 17 00:00:00 2001 From: LukeParkerDev <10430890+Hona@users.noreply.github.com> Date: Mon, 4 May 2026 13:20:21 +1000 Subject: [PATCH] deslop --- .../src/components/dialog-select-server.tsx | 73 ++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/packages/app/src/components/dialog-select-server.tsx b/packages/app/src/components/dialog-select-server.tsx index b51431c93f..ef62315bb5 100644 --- a/packages/app/src/components/dialog-select-server.tsx +++ b/packages/app/src/components/dialog-select-server.tsx @@ -8,7 +8,7 @@ import { List } from "@opencode-ai/ui/list" import { TextField } from "@opencode-ai/ui/text-field" import { useMutation } from "@tanstack/solid-query" import { showToast } from "@opencode-ai/ui/toast" -import { batch, createEffect, createMemo, createResource, onCleanup, Show, startTransition, untrack } from "solid-js" +import { batch, createEffect, createMemo, createResource, For, onCleanup, Show, startTransition, untrack } from "solid-js" import { createStore, reconcile } from "solid-js/store" import { DialogWslServer } from "@/components/dialog-wsl-server" import { ServerHealthIndicator, ServerRow } from "@/components/server/server-row" @@ -324,10 +324,19 @@ export function DialogSelectServer(props: DialogSelectServerProps = {}) { if (!isWslSidecar(conn)) return return wslState()?.servers.find((item) => item.config.id === ServerConnection.key(conn))?.runtime } + const nonReadyWslServers = createMemo(() => + (wslState()?.servers ?? []).filter((item) => item.runtime.kind !== "ready"), + ) const canRetryWsl = (conn: ServerConnection.Any) => { const runtime = wslRuntime(conn) return runtime?.kind === "failed" || runtime?.kind === "stopped" } + const canRetryWslRuntime = (kind: string) => kind === "failed" || kind === "stopped" + const wslRuntimeLabel = (kind: string) => { + if (kind === "starting") return "Starting" + if (kind === "failed") return "Failed" + return "Stopped" + } const sortedItems = createMemo(() => { const list = items() @@ -586,6 +595,68 @@ export function DialogSelectServer(props: DialogSelectServerProps = {}) { } > + 0}> +
+
+ + {(item) => { + const key = ServerConnection.Key.make(item.config.id) + const retryable = () => canRetryWslRuntime(item.runtime.kind) + return ( +
+
+
+ {item.config.distro} + + WSL + + + {wslRuntimeLabel(item.runtime.kind)} + +
+ + e.stopPropagation()} + onPointerDown={(e: PointerEvent) => e.stopPropagation()} + /> + + + + retryWslMutation.mutate(key)}> + Retry start + + + + + + removeWslMutation.mutate(key)} + class="text-text-on-critical-base hover:bg-surface-critical-weak" + > + + {language.t("dialog.server.menu.delete")} + + + + + +
+ ) + }} + +
+
+