fix(ai-vault): preserve non-scanner relay errors

This commit is contained in:
Brennan Benson
2026-08-24 02:00:38 -07:00
parent 88192bcfb1
commit 869e4ea623
2 changed files with 8 additions and 3 deletions
@@ -79,6 +79,11 @@ describe('describeAiVaultScanError', () => {
"Error invoking remote method 'aiVault:listSessions': Error: SSH relay is not ready"
)
).toBe('SSH relay is not ready')
expect(describeAiVaultScanError('Relay Scanner is not ready')).toBe('Scanner is not ready')
expect(describeAiVaultScanError('Relay AI Vault scanner is not ready')).toBe(
'AI Vault scanner is not ready'
)
expect(describeAiVaultScanError('Relay client is not connected')).toBe(
'Relay client is not connected'
)
})
})
+2 -2
View File
@@ -8,8 +8,8 @@ const RETRY = 'Refresh to try again.'
/** Electron wraps every rejected `ipcMain.handle` before the renderer sees it. */
const IPC_INVOKE_PREFIX = /^Error invoking remote method '[^']*': (?:\w*Error: )?/
/** Relay-hosted scan errors carry a transport-only `Relay ` prefix. */
const RELAY_PREFIX = /^Relay /
/** Relay-hosted scanner errors carry a transport-only `Relay ` prefix. */
const RELAY_PREFIX = /^Relay (?=AI Vault )/
/** Both the fork-based service and the legacy worker thread emit this family. */
const SCANNER = String.raw`AI Vault (?:service|scanner worker)`