Files
tty7/docs/remote
l0ng-ai 6a15d212a7 fix(editor): give an open buffer its own host instead of a registry id
Review follow-up to #656.

`HostRegistry` means "a machine this window has a link to": every entry
gets there through `HostLinks::insert`, is listed as a machine you can
attach agent hooks to, and is swept by `release_unused_hosts` once no
workspace holds it. Filing the pane's SFTP channel there made it neither
of those things and broke both directions — a bogus "Remote machine" row
in the agent-hooks picker, and, after a `delete_workspace` sweep,
`HostLinks::remove` taking the SFTP host out of the registry underneath
an open buffer, at which point Cmd-S returned silently: no write, no
toast, dirty marker still on.

So the buffer holds the `SharedHost` itself. Save and reload go straight
through it, which also drops two lookups that could fail; a dead link now
reports a save error rather than doing nothing at all.

- editor: `OpenFile::host` is a `SharedHost`; comparisons key on its id
- editor: `apply_pending_cursor` matches (host, path), not path alone —
  a `file.rs:12` link could otherwise land its cursor in a same-named
  file from another machine
- editor: the status bar shows a foreign-host file's own full path
  instead of naming it under the local repo it is not in
- sftp: `sftp_editor_host` builds the host and hands it over, no insert
- docs: the SFTP panel has no drag source, so downloading is the row
  menu; the transfer table said otherwise
2026-08-16 18:39:27 +08:00
..