From e23cfcdde8344129e1bd5ed848cc7c32769ada0d Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Fri, 16 Oct 2026 16:47:54 -0700 Subject: [PATCH] test(native-chat): use an agent without chat modes in the paired-host permission tests (#29891) #29335 gave Grok chats their own permission modes, so on a paired host that predates per-chat modes a Grok chat is now checked like Claude and Codex; that is intended. #29442's tests, merged a day earlier, used Grok as the agent without modes. Use Gemini, which still has none. --- .../src/runtime/structured-chat-host-permission.test.ts | 7 ++++--- src/shared/agent-chat-permission-host-support.test.ts | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/runtime/structured-chat-host-permission.test.ts b/src/renderer/src/runtime/structured-chat-host-permission.test.ts index 6965f8dd25f..b7c3b589d86 100644 --- a/src/renderer/src/runtime/structured-chat-host-permission.test.ts +++ b/src/renderer/src/runtime/structured-chat-host-permission.test.ts @@ -104,9 +104,10 @@ describe('the permission verdict on a paired host', () => { await expect( readStructuredChatHostPermissionVerdict({ kind: 'local' }, 'claude', 'ask') ).resolves.toEqual({ kind: 'allowed' }) - await expect(readStructuredChatHostPermissionVerdict(PAIRED, 'grok', 'ask')).resolves.toEqual({ - kind: 'allowed' - }) + // Gemini chats have no modes of their own; Grok gained them in #29335. + await expect(readStructuredChatHostPermissionVerdict(PAIRED, 'gemini', 'ask')).resolves.toEqual( + { kind: 'allowed' } + ) expect(mocks.supportsCapability).not.toHaveBeenCalled() expect(mocks.callRuntimeRpc).not.toHaveBeenCalled() }) diff --git a/src/shared/agent-chat-permission-host-support.test.ts b/src/shared/agent-chat-permission-host-support.test.ts index 35ab22b0020..48b0ec755f9 100644 --- a/src/shared/agent-chat-permission-host-support.test.ts +++ b/src/shared/agent-chat-permission-host-support.test.ts @@ -29,7 +29,8 @@ describe('what a host predating per-chat modes runs', () => { }) it('names no mode for an agent without chat modes', () => { - expect(legacyHostChatPermissionMode('grok', {})).toBeNull() + // Grok gained chat modes in #29335; Gemini still has none. + expect(legacyHostChatPermissionMode('gemini', {})).toBeNull() }) })