Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ These are product rules, not implementation details. A change that breaks one ne
**Machines**
- Add Machine connects first: a Machine is kept only once `ssh <destination> localhost remote --stdio` works, otherwise the typed `MachineProblem` says why and what to do next. The SSH host field suggests the `Host`s of `~/.ssh/config`, read only.
- A lost connection is made again on its own, after 1 s growing to 30 s, or at once when the computer wakes; a problem waiting won't fix (a host key, a sign-in that needs a prompt, no or an old localhost there, anything SSH says that localhost doesn't recognize) is shown once and waits for Reconnect. Reconnecting never starts or stops a Service.
- A Machine's Projects show below this computer's and act like them: Start, Stop, Restart, logs, Open in Browser. They are edited on the Machine. Open in Browser forwards the Port to the same port here first; if that port is taken here, it says so (`PortConflict`) rather than using another.
- A Machine's Projects show below this computer's and act like them: Start, Stop, Restart, logs, Open in Browser, and add, import, edit, remove and favourite through the same editors. Each change is made by the Machine's core (`Origin::Machine`), with its folders picked in localhost's own picker (`ListDirectory`) and scanned there; nothing of them, and no Secret typed here, is stored on this computer. While the Machine isn't connected the editors are disabled and say why; nothing is queued. An older localhost there answers `Unsupported`, and the app says to update it there. Open in Browser forwards the Port to the same port here first; if that port is taken here, it says so (`PortConflict`) rather than using another.
- Quitting asks first when Services started from here on another Machine are active: that Machine stops them once the connection ends, unless localhost is open on it.

**Detection**
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ A dev box or home server you reach with `ssh` can be a **Machine**: its Projects

1. Check that `ssh devbox localhost --version` works from a terminal without asking anything (a key, in the SSH agent if it has a passphrase, and a host key you already trusted). It runs without your interactive profile: with zsh, put `localhost` on the `PATH` in `~/.zshenv`, not `~/.zshrc`.
2. Open **Settings → Machines → Add Machine…**. In **SSH host**, type a `Host` from `~/.ssh/config` (the field lists them), or `user@host:port`. localhost connects first, and says why and what to do if it can't.
3. The Machine's Projects show in the sidebar under its name, below this computer's: Start, Stop, Restart, logs. They are edited on the Machine.
3. The Machine's Projects show in the sidebar under its name, below this computer's: Start, Stop, Restart, logs, and add, import, edit or remove them there, with its folders picked and scanned on the Machine.
4. **Open in Browser** forwards the Service's Port to the same port here, through the SSH connection and on loopback only, then opens it.

Any network `ssh` uses works: a LAN, a VPN, `ProxyJump`, Tailscale. Nothing new listens on either computer. A lost connection is made again on its own; Services you started from here stop on the Machine when the connection ends, unless localhost is open there. More in the [Machines docs](https://www.getlocalhost.app/docs/machines).
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/src/dialogs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async fn pick(open: impl FnOnce(Box<dyn FnOnce(Option<FilePath>) + Send>)) -> Op

/// `path` relative to `base`, e.g. `web` or `../shared`; `.` for `base`
/// itself. `None` on another Windows drive or share, which no relative path reaches.
fn relative_path(path: &Path, base: &Path) -> Option<String> {
pub(crate) fn relative_path(path: &Path, base: &Path) -> Option<String> {
let prefix = |path: &Path| match path.components().next() {
Some(Component::Prefix(prefix)) => Some(prefix.as_os_str().to_string_lossy().to_lowercase()),
_ => None,
Expand Down
Loading
Loading