From a70e7b0ca739b66574b220f3181d4e89fb1d0453 Mon Sep 17 00:00:00 2001 From: Mabolla <133767935+Mabolla@users.noreply.github.com> Date: Thu, 20 Aug 2026 20:35:34 +0300 Subject: [PATCH] fix(desktop): route terminals through registry SSH --- apps/desktop/electron/main.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts index 00ca47f5dd..b4d34eb356 100644 --- a/apps/desktop/electron/main.ts +++ b/apps/desktop/electron/main.ts @@ -144,6 +144,7 @@ import { updateEligibility, upsertConnection } from './connection-registry' +import { activeRegistrySshScope } from './active-ssh-route' import { describeCrashReason, installCrashForensics } from './crash-forensics' import { adoptServedDashboardToken } from './dashboard-token' import { loadOrCreateInstallationId, sshOwnershipId } from './desktop-installation' @@ -9520,6 +9521,13 @@ async function teardownSshConnection(profile) { function activeSshTerminalTarget() { const profile = primaryProfileKey() const config = readDesktopConnectionConfig() + const registryScope = activeRegistrySshScope(readDesktopConnectionsRegistry(), profile) + + if (registryScope) { + const state = sshConnections.get(registryScope) + + return state && state.ssh ? { ssh: state.ssh, scope: registryScope } : 'pending' + } if (profileSshOverride(config, profile)) { const scope = sshScopeKey(profile) @@ -9538,7 +9546,6 @@ function activeSshTerminalTarget() { if (config.mode === 'ssh') { const state = sshConnections.get('') - return state && state.ssh ? { ssh: state.ssh, scope: '' } : 'pending' }