Bug
The "Open in IDE" buttons emit a vscode://file/<absolute-path> link, where <absolute-path> is the path on the server (where Archon runs). When Archon runs inside WSL2 and the user opens the Archon Web UI from a Windows browser, the path is a Linux path like /home/datafactory/.archon/workspaces/.../source — but Windows VS Code receives vscode://file//home/datafactory/... and tries to resolve it on Windows. There is no /home/datafactory/ on Windows, so VS Code opens an empty / "file not found" window.
VS Code does support WSL paths via a different scheme:
vscode://vscode-remote/wsl+<distro>/<linux-absolute-path>
Archon needs to use that variant when running under WSL2.
Steps to Reproduce
- Run
archon serve inside a WSL2 distro (Ubuntu, Debian, …).
- From the Windows host browser, open
http://localhost:3000.
- Click Open in IDE in the Header (or "Open in IDE" on a workflow run card).
- VS Code launches but reports the path can't be opened — the Linux path was passed verbatim to Windows VS Code.
Expected vs Actual
- Expected: VS Code opens the workspace folder via the WSL remote, identical to running
code . from inside the WSL shell.
- Actual: VS Code launches with an unresolvable path on Windows.
Affected code
Two call sites construct the vscode://file/... URI directly, with no platform handling:
packages/web/src/components/layout/Header.tsx:32
window.open(`vscode://file/${normalizedPath}`, '_blank');
packages/web/src/components/dashboard/WorkflowRunCard.tsx:300
href={`vscode://file/${run.working_path.replace(/\\/g, '/')}`}
Suggested Fix
-
Detect WSL on the server. Add an isWSL() helper in @archon/paths analogous to the existing isDocker(). WSL is detectable via:
process.env.WSL_DISTRO_NAME (set inside every WSL distro)
/proc/sys/kernel/osrelease containing microsoft (lower-cased)
-
Expose it through the existing health/info endpoint. GET /api/health already returns is_docker (packages/server/src/routes/api.ts:2682). Add is_wsl and wsl_distro (the value of WSL_DISTRO_NAME).
-
Adapt the link helpers. A small util like:
function ideUri(path: string, env: { isWsl: boolean; wslDistro?: string }) {
const p = path.replace(/\\/g, '/');
return env.isWsl && env.wslDistro
? `vscode://vscode-remote/wsl+${env.wslDistro}${p.startsWith('/') ? p : `/${p}`}`
: `vscode://file/${p}`;
}
Both Header.tsx and WorkflowRunCard.tsx then call this helper instead of building the URI inline.
-
Optional follow-up: same idea applies to remote SSH setups (vscode://vscode-remote/ssh-remote+<host>/<path>). Could later be generalized; WSL is the common case for now.
Impact
Affects every Windows + WSL2 dev who interacts with Archon via the Web UI. Workaround today is to copy the path with the existing copy-path button and wsl --cd <path> code . manually — friction every time.
Scope
- Packages:
paths (env detection), server (health endpoint extension), web (URI construction)
- Breaking change: no
- Database changes: no
Definition of Done
Bug
The "Open in IDE" buttons emit a
vscode://file/<absolute-path>link, where<absolute-path>is the path on the server (where Archon runs). When Archon runs inside WSL2 and the user opens the Archon Web UI from a Windows browser, the path is a Linux path like/home/datafactory/.archon/workspaces/.../source— but Windows VS Code receivesvscode://file//home/datafactory/...and tries to resolve it on Windows. There is no/home/datafactory/on Windows, so VS Code opens an empty / "file not found" window.VS Code does support WSL paths via a different scheme:
Archon needs to use that variant when running under WSL2.
Steps to Reproduce
archon serveinside a WSL2 distro (Ubuntu, Debian, …).http://localhost:3000.Expected vs Actual
code .from inside the WSL shell.Affected code
Two call sites construct the
vscode://file/...URI directly, with no platform handling:packages/web/src/components/layout/Header.tsx:32packages/web/src/components/dashboard/WorkflowRunCard.tsx:300Suggested Fix
Detect WSL on the server. Add an
isWSL()helper in@archon/pathsanalogous to the existingisDocker(). WSL is detectable via:process.env.WSL_DISTRO_NAME(set inside every WSL distro)/proc/sys/kernel/osreleasecontainingmicrosoft(lower-cased)Expose it through the existing health/info endpoint.
GET /api/healthalready returnsis_docker(packages/server/src/routes/api.ts:2682). Addis_wslandwsl_distro(the value ofWSL_DISTRO_NAME).Adapt the link helpers. A small util like:
Both
Header.tsxandWorkflowRunCard.tsxthen call this helper instead of building the URI inline.Optional follow-up: same idea applies to remote SSH setups (
vscode://vscode-remote/ssh-remote+<host>/<path>). Could later be generalized; WSL is the common case for now.Impact
Affects every Windows + WSL2 dev who interacts with Archon via the Web UI. Workaround today is to copy the path with the existing copy-path button and
wsl --cd <path> code .manually — friction every time.Scope
paths(env detection),server(health endpoint extension),web(URI construction)Definition of Done
isWSL()helper added to@archon/paths, with tests covering env var and/proc/sys/kernel/osreleasedetection/api/healthreportsis_wsl+wsl_distroHeader.tsxandWorkflowRunCard.tsxbuild the WSL-flavouredvscode://vscode-remote/wsl+<distro>/...URI when the server reportsis_wsl: true