fix(desktop): preserve registry route identity

This commit is contained in:
addel
2026-08-17 06:04:21 +10:00
committed by Teknium
parent c76b7e6343
commit decd6a73fa
16 changed files with 175 additions and 108 deletions
+12
View File
@@ -23,6 +23,18 @@ export function backendScopeKey(connectionId: null | string | undefined, profile
return `conn:${connection}::${profileKey}`
}
/** Scope a registry route without collapsing its explicit `local` source id.
* Null/empty ids still identify the legacy profile-only route. */
export function registryBackendScopeKey(
connectionId: null | string | undefined,
profile: null | string | undefined
): string {
const profileKey = String(profile ?? '').trim() || 'default'
const connection = String(connectionId ?? '').trim()
return connection ? `conn:${connection}::${profileKey}` : profileKey
}
/** All pool keys owned by a connection share this prefix (teardown on remove). */
export function backendScopePrefix(connectionId: string): string {
return `conn:${String(connectionId).trim()}::`
+2 -1
View File
@@ -1,7 +1,8 @@
export {
backendScopeKey,
backendScopePrefix,
LOCAL_CONNECTION_ID
LOCAL_CONNECTION_ID,
registryBackendScopeKey
} from './backend-scope'
export {
BILLING_REFUSAL_POLICY,