Skip to content

The agent that grows with you

fix(desktop): honor default remote SSH profile

Shawn Wang0e37a439bda1
diff --git a/apps/desktop/electron/connection-config.test.ts b/apps/desktop/electron/connection-config.test.ts
index 6a3f55aec25..8e4c4bf093d 100644
--- a/apps/desktop/electron/connection-config.test.ts
+++ b/apps/desktop/electron/connection-config.test.ts
@@ -71,6 +71,7 @@ test('resolveRemoteSshDashboardProfile never sends a conn: pool key to the remot
assert.equal(resolveRemoteSshDashboardProfile('', 'bob'), 'bob')
assert.equal(resolveRemoteSshDashboardProfile('', 'default'), '')
assert.equal(resolveRemoteSshDashboardProfile('writer', 'conn:mac-mini::default'), 'writer')
+ assert.equal(resolveRemoteSshDashboardProfile('default', 'mac-mini'), '')
})
test('normAuthMode coerces to token unless explicitly oauth', () => {
diff --git a/apps/desktop/electron/connection-config.ts b/apps/desktop/electron/connection-config.ts
index e12dce43974..9378401dcc0 100644
--- a/apps/desktop/electron/connection-config.ts
+++ b/apps/desktop/electron/connection-config.ts
@@ -308,8 +308,8 @@ function connectionScopeKey(profile) {
function resolveRemoteSshDashboardProfile(configuredRemoteProfile, poolOrProfileKey) {
const configured = String(configuredRemoteProfile || '').trim()
- if (configured && configured !== 'default') {
- return configured
+ if (configured) {
+ return configured === 'default' ? '' : configured
}
const key = String(poolOrProfileKey || '').trim()