From 4d8e0e6c7577b69f8dc85ef2b4a37a1918e96fb9 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Sat, 3 Oct 2026 13:40:44 -0700 Subject: [PATCH] test(native-chat): a mirrored paired chat carries its host, so a workspace-id collision no longer hides its owner --- .../StructuredAgentSessionAttentionBridge.test.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/components/native-chat/StructuredAgentSessionAttentionBridge.test.tsx b/src/renderer/src/components/native-chat/StructuredAgentSessionAttentionBridge.test.tsx index d83cf01b19bd..40e4b21fc533 100644 --- a/src/renderer/src/components/native-chat/StructuredAgentSessionAttentionBridge.test.tsx +++ b/src/renderer/src/components/native-chat/StructuredAgentSessionAttentionBridge.test.tsx @@ -450,7 +450,8 @@ describe('StructuredAgentSessionAttentionBridge', () => { throw new Error('snapshot did not publish a chat tab') } expect(tab.contentType).toBe('agent-session') - expect(tab.executionHostId).toBeUndefined() + // The snapshot stamps each mirrored chat with its host, so a later id collision cannot reassign it. + expect(tab.executionHostId).toBe('runtime:env-1') render() await waitFor(() => expect(mocks.subscribeCompletions).toHaveBeenCalledOnce()) expect(mocks.subscribeCompletions.mock.calls[0]?.[0]).toEqual({ @@ -470,7 +471,10 @@ describe('StructuredAgentSessionAttentionBridge', () => { } }) ) - expect(resolveNotificationTabOwner(store.getState(), tab)).toBeNull() + expect(resolveNotificationTabOwner(store.getState(), tab)).toEqual({ + executionHostId: 'runtime:env-1', + runtimeEnvironmentId: 'env-1' + }) expect(mocks.unsubscribe).not.toHaveBeenCalled() expect(mocks.subscribeCompletions).toHaveBeenCalledOnce()