fix(desktop): carry remoteKind/remoteHost through the primary backend so the pill reads SSH

A global SSH connection showed the statusbar pill as a plain token remote
("Remote: 127.0.0.1") instead of "SSH: user@host". startHermes() builds the
renderer-facing connection by hand-copying fields from the resolved descriptor
and dropped remoteHost + remoteKind, so the pill never saw remoteKind === ssh
and fell back to the URL-remote label (and looked like a token connection).

The per-profile pool path already spreads the full descriptor (...remote), so
only the primary/global path was affected — which is exactly the global-SSH
setup. Pass remoteHost + remoteKind through.

(The saved connection.json was already correct: mode:ssh with the encrypted
served dashboard token — that token IS the intended artifact, not a regression.)
This commit is contained in:
yoniebans 2026-06-19 18:10:37 +02:00
parent a510e1132c
commit 2ead3210ea

View file

@ -5500,6 +5500,12 @@ async function startHermes() {
authMode: remote.authMode || 'token',
token: remote.token,
wsUrl: remote.wsUrl,
// Carry the SSH identity through so the statusbar pill reads "SSH: host"
// (not "Remote: 127.0.0.1") for a global SSH connection. Without these
// the primary-backend path drops them and the pill mislabels SSH as a
// plain token remote.
remoteHost: remote.remoteHost,
remoteKind: remote.remoteKind,
logs: hermesLog.slice(-80),
...getWindowState()
}