From d49d495c2b07a31b5d314f22946be24917d0ca4b Mon Sep 17 00:00:00 2001 From: "hermes-seaeye[bot]" <307254004+hermes-seaeye[bot]@users.noreply.github.com> Date: Sun, 23 Aug 2026 05:06:17 +0000 Subject: [PATCH] fmt(js): `npm run fix` on merge (#92714) Co-authored-by: github-actions[bot] --- .../electron/connection-registry.test.ts | 20 ++++--------------- apps/desktop/electron/connection-registry.ts | 10 ++-------- .../electron/connection-route-identity.ts | 7 +------ apps/desktop/src/store/settings-scope.test.ts | 3 ++- 4 files changed, 9 insertions(+), 31 deletions(-) diff --git a/apps/desktop/electron/connection-registry.test.ts b/apps/desktop/electron/connection-registry.test.ts index 4b215bfeda..ce90a9a01c 100644 --- a/apps/desktop/electron/connection-registry.test.ts +++ b/apps/desktop/electron/connection-registry.test.ts @@ -90,10 +90,7 @@ test('resolvedConnectionId identifies local and migrated remote descriptors', () const ambiguousLocal: ConnectionRegistry = { ...registry, - connections: [ - ...registry.connections, - { id: 'local-copy', kind: 'local', label: 'Local copy' } - ] + connections: [...registry.connections, { id: 'local-copy', kind: 'local', label: 'Local copy' }] } assert.equal(resolvedConnectionId(ambiguousLocal, { mode: 'local' }), null) @@ -283,14 +280,8 @@ test('resolvedConnectionId reuses the exact URL envelope and rejects weak or dup ) // Post-dial URL-only shapes do not contain enough proof to choose a source. - assert.equal( - resolvedConnectionId(registry, { baseUrl: sharedUrl, mode: 'remote', remoteKind: 'url' }), - null - ) - assert.equal( - resolvedConnectionId(registry, { baseUrl: sharedUrl, mode: 'remote', remoteKind: 'cloud' }), - null - ) + assert.equal(resolvedConnectionId(registry, { baseUrl: sharedUrl, mode: 'remote', remoteKind: 'url' }), null) + assert.equal(resolvedConnectionId(registry, { baseUrl: sharedUrl, mode: 'remote', remoteKind: 'cloud' }), null) // Even a complete envelope fails closed when two registrations are exact twins. const duplicate: ConnectionRegistry = { @@ -395,10 +386,7 @@ test('resolvedConnectionId keeps same-host SSH routes distinct by port, key, pat connections: [...registry.connections, { ...base, id: 'ssh-base-copy', label: 'SSH base copy' }] } - assert.equal( - resolvedConnectionId(duplicate, { mode: 'remote', remoteKind: 'ssh', ssh: base }), - null - ) + assert.equal(resolvedConnectionId(duplicate, { mode: 'remote', remoteKind: 'ssh', ssh: base }), null) assert.equal( resolvedConnectionId( { ...duplicate, connections: [...duplicate.connections].reverse() }, diff --git a/apps/desktop/electron/connection-registry.ts b/apps/desktop/electron/connection-registry.ts index c2e8edd672..7c853bba19 100644 --- a/apps/desktop/electron/connection-registry.ts +++ b/apps/desktop/electron/connection-registry.ts @@ -232,9 +232,7 @@ export function resolvedConnectionId( return null } - return registry.connections.some(connection => connection.id === explicitConnectionId) - ? explicitConnectionId - : null + return registry.connections.some(connection => connection.id === explicitConnectionId) ? explicitConnectionId : null } if (descriptor.mode === 'local') { @@ -335,11 +333,7 @@ export function resolvedConnectionId( return matchingConnectionId(registry, route, 'unique') ?? null } -function normalizedSshTarget(route: { - host?: unknown - port?: unknown - user?: unknown -}): null | string { +function normalizedSshTarget(route: { host?: unknown; port?: unknown; user?: unknown }): null | string { const ssh = normalizeSshConfig({ ...route, mode: 'ssh' }) if (!ssh) { diff --git a/apps/desktop/electron/connection-route-identity.ts b/apps/desktop/electron/connection-route-identity.ts index b95e59f296..72124fe3e2 100644 --- a/apps/desktop/electron/connection-route-identity.ts +++ b/apps/desktop/electron/connection-route-identity.ts @@ -6,12 +6,7 @@ * but must never reconstruct a stronger identity from post-dial metadata. */ -import { - normalizeRemoteBaseUrl, - normalizeRemoteHeaders, - normalizeSshConfig, - normAuthMode -} from './connection-config' +import { normalizeRemoteBaseUrl, normalizeRemoteHeaders, normalizeSshConfig, normAuthMode } from './connection-config' import type { ConnectionRegistry, RegistryConnection } from './connection-registry' interface SshRouteConfig { diff --git a/apps/desktop/src/store/settings-scope.test.ts b/apps/desktop/src/store/settings-scope.test.ts index 321ae5d31c..2f38b66686 100644 --- a/apps/desktop/src/store/settings-scope.test.ts +++ b/apps/desktop/src/store/settings-scope.test.ts @@ -17,7 +17,8 @@ vi.mock('@/lib/query-client', () => ({ invalidateProfileScopedQueries: vi.fn() } vi.mock('@/store/starmap', () => ({ resetStarmapGraph: vi.fn() })) const { $activeGatewayProfile } = await import('./profile') -const { $settingsRequestProfile, $settingsScopeOverride, $settingsScopeProfile, setSettingsScope } = await import('./settings-scope') +const { $settingsRequestProfile, $settingsScopeOverride, $settingsScopeProfile, setSettingsScope } = + await import('./settings-scope') beforeEach(() => { $activeGatewayProfile.set('default')