fix(desktop): route terminals through registry SSH

This commit is contained in:
Mabolla
2026-08-20 20:35:34 +03:00
committed by Teknium
parent 24ab1acbe0
commit a70e7b0ca7
+8 -1
View File
@@ -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'
}