From e5a636518ca3d40e7fcf5d862d81632a8f5d622c Mon Sep 17 00:00:00 2001 From: Andrey Cheptsov Date: Sun, 14 Jun 2026 12:06:37 +0200 Subject: [PATCH 1/2] Add Zed to the dev environment IDE dropdown in the UI Backend support for the `zed` IDE already exists (#3947), but the run launch UI never offered it. Add Zed to the IDE options dropdown and the related form/run types so it can be selected from the UI. Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/src/pages/Runs/Launch/constants.tsx | 5 +++++ frontend/src/pages/Runs/Launch/types.ts | 2 +- frontend/src/types/run.d.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/Runs/Launch/constants.tsx b/frontend/src/pages/Runs/Launch/constants.tsx index f9b25bc26c..84988d8f2a 100644 --- a/frontend/src/pages/Runs/Launch/constants.tsx +++ b/frontend/src/pages/Runs/Launch/constants.tsx @@ -80,12 +80,17 @@ export const IDE_OPTIONS = [ label: 'Windsurf', value: 'windsurf', }, + { + label: 'Zed', + value: 'zed', + }, ] as const; export const IDE_DISPLAY_NAMES: Record = { cursor: 'Cursor', vscode: 'VS Code', windsurf: 'Windsurf', + zed: 'Zed', }; export const getIDEDisplayName = (ide: string): string => { diff --git a/frontend/src/pages/Runs/Launch/types.ts b/frontend/src/pages/Runs/Launch/types.ts index 20a5240d56..e0a1986946 100644 --- a/frontend/src/pages/Runs/Launch/types.ts +++ b/frontend/src/pages/Runs/Launch/types.ts @@ -4,7 +4,7 @@ export interface IRunEnvironmentFormValues { gpu_enabled?: boolean; offer?: IGpu; name: string; - ide?: 'cursor' | 'vscode' | 'windsurf'; + ide?: 'cursor' | 'vscode' | 'windsurf' | 'zed'; config_yaml: string; image?: string; python?: string; diff --git a/frontend/src/types/run.d.ts b/frontend/src/types/run.d.ts index 3dcb26446d..6113956ad6 100644 --- a/frontend/src/types/run.d.ts +++ b/frontend/src/types/run.d.ts @@ -14,7 +14,7 @@ declare type TGPUResources = IGPUSpecRequest & { name?: string | string[]; }; -declare type TIde = 'cursor' | 'vscode' | 'windsurf'; +declare type TIde = 'cursor' | 'vscode' | 'windsurf' | 'zed'; declare type TVolumeMountPointRequest = { name: string | string[]; From 70bc0f0c6a78edb04e05fbf7a3e7aad39394b533 Mon Sep 17 00:00:00 2001 From: Andrey Cheptsov Date: Sun, 14 Jun 2026 18:58:22 +0200 Subject: [PATCH 2/2] Fix "Open in IDE" link to use server-provided attached_ide_url MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The run details "Open in IDE" button hand-rolled the URL as `{ide}://vscode-remote/ssh-remote+...`, which is correct only for VS Code forks. Zed — the first non-fork IDE, now selectable in the dropdown — needs `zed://ssh/...`, so the button produced a broken link. Use the per-IDE URL the server already computes and exposes via `JobConnectionInfo.attached_ide_url` (built by `ide.get_url`), making the UI a single source of truth instead of duplicating the URL logic. This also fixes latent issues the hand-rolled URL had for non-primary jobs/replicas (host should be the job name) and IPv6/port formatting. Extend the runs API connection-info test to cover all IDEs (vscode/cursor/windsurf/zed) with and without sshproxy. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../index.tsx | 11 +++-- frontend/src/types/run.d.ts | 12 +++++ .../_internal/server/routers/test_runs.py | 46 +++++++++++++++++-- 3 files changed, 60 insertions(+), 9 deletions(-) diff --git a/frontend/src/pages/Runs/Details/RunDetails/ConnectToRunWithDevEnvConfiguration/index.tsx b/frontend/src/pages/Runs/Details/RunDetails/ConnectToRunWithDevEnvConfiguration/index.tsx index ec5444c665..9e03c6b6c2 100644 --- a/frontend/src/pages/Runs/Details/RunDetails/ConnectToRunWithDevEnvConfiguration/index.tsx +++ b/frontend/src/pages/Runs/Details/RunDetails/ConnectToRunWithDevEnvConfiguration/index.tsx @@ -42,12 +42,12 @@ export const ConnectToRunWithDevEnvConfiguration: FC<{ run: IRun }> = ({ run }) const [sshCommand, copySSHCommand] = getSSHCommand(run); const configuration = run.run_spec.configuration as TDevEnvironmentConfiguration; - const latestSubmission = run.jobs[0]?.job_submissions?.slice(-1)[0]; - const workingDir = latestSubmission?.job_runtime_data?.working_dir ?? '/'; const hasIDE = !!configuration.ide; - const openInIDEUrl = hasIDE - ? `${configuration.ide}://vscode-remote/ssh-remote+${run.run_spec.run_name}${workingDir}` - : undefined; + // The IDE deep link is built server-side, per IDE, in JobConnectionInfo.attached_ide_url + // (e.g. `zed://ssh/...` for Zed vs `...//vscode-remote/ssh-remote+...` for VS Code forks). + // It is set once the job is running and reachable via the SSH config alias created by + // `dstack attach`. The UI always talks to a same-version server, so no fallback is needed. + const openInIDEUrl = run.jobs[0]?.job_connection_info?.attached_ide_url ?? undefined; const ideDisplayName = hasIDE ? getIDEDisplayName(configuration.ide!) : undefined; const [configCliCommand, copyCliCommand] = useConfigProjectCliCommand({ projectName: run.project_name }); @@ -222,6 +222,7 @@ export const ConnectToRunWithDevEnvConfiguration: FC<{ run: IRun }> = ({ run })