diff --git a/src/shared/ai-vault-scan-error-message.test.ts b/src/shared/ai-vault-scan-error-message.test.ts index 0e3d929a47e..45e3a3e8bf7 100644 --- a/src/shared/ai-vault-scan-error-message.test.ts +++ b/src/shared/ai-vault-scan-error-message.test.ts @@ -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' + ) }) }) diff --git a/src/shared/ai-vault-scan-error-message.ts b/src/shared/ai-vault-scan-error-message.ts index 1449684ab8e..55244933efc 100644 --- a/src/shared/ai-vault-scan-error-message.ts +++ b/src/shared/ai-vault-scan-error-message.ts @@ -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)`