mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 08:02:24 +00:00
The WSL transport, installer, router target and protocol kind have all been in place since remote workspaces landed, but nothing constructed a `RemoteTarget::Wsl` outside tests — `available_hosts` returned saved SSH profiles, `~/.ssh/config` aliases and a dev-only `--stdio` row, so the one machine that needs no configuration at all was the one you could not pick. Every installed distribution is now a row in the switcher, between the saved profiles and the config aliases: installing one is as deliberate as writing a profile, but the list is discovered rather than written, so it does not outrank the machines named by hand. The label is the exact string `wsl -d` takes — that string is also the connection key — and the endpoint column says `WSL`, which is what makes searching for `wsl` find them. `core::shells::wsl_distros` is promoted out of `cfg(test)` and answers empty off Windows, so the new-tab dropdown and the switcher enumerate distributions through one function and cannot disagree about which exist. It spawns `wsl.exe`, and `available_hosts` runs inside the switcher's render, so the list is a global filled by a backgrounded, TTL'd `sweep_wsl` — the shape `terminal::pane_liveness` already uses for the machine answers drawn two rows above these. Swept at startup and on every open, so `wsl --install` is visible after reopening the panel rather than after a restart. `spec_for`'s WSL arm said "not available in this build yet"; it now says there is no SSH connection to describe, which is what the `Err` has always meant to the routed paths that read the target instead. And the band is "Other Machines" rather than "Other SSH Hosts", since a distribution reached by spawning `wsl.exe` is sitting in it.