From 0afb85e241bfc320f215a63884811034ac5e5838 Mon Sep 17 00:00:00 2001 From: BigBodyCobain <43977454+BigBodyCobain@users.noreply.github.com> Date: Wed, 10 Jun 2026 09:44:44 -0600 Subject: [PATCH] Fix MeshChat behavior tests after Agent Shell tab replaced dashboard Dead Drop UI. Point trust and dm-add assertions at Infonet Messages and MeshTerminal where those flows now live. Co-authored-by: Cursor --- .../__tests__/mesh/meshChatBehavior.test.ts | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/frontend/src/__tests__/mesh/meshChatBehavior.test.ts b/frontend/src/__tests__/mesh/meshChatBehavior.test.ts index 090adc3..6cb914c 100644 --- a/frontend/src/__tests__/mesh/meshChatBehavior.test.ts +++ b/frontend/src/__tests__/mesh/meshChatBehavior.test.ts @@ -114,23 +114,24 @@ describe('MeshChat behavior - policy wiring', () => { expect(controller).toContain('timer = setTimeout(() => void poll(classification.refreshCount), classification.delay);'); }); - it('dead-drop UI distinguishes invite-pinned trust from TOFU-only', () => { - const index = readSource('../../components/MeshChat/index.tsx'); - expect(index).toContain('getContactTrustSummary'); - expect(index).toContain('INVITE PINNED'); - expect(index).toContain('TOFU ONLY'); - expect(index).toContain('anchored by an imported signed invite'); - expect(index).toContain('rootWitnessContinuityLabel'); - expect(index).toContain('RECOVER ROOT'); - expect(index).toContain('!selectedContactTrustSummary?.rootMismatch'); + it('dead-drop trust copy lives in shared hints and Infonet Messages', () => { + const hints = readSource('../../mesh/meshPrivacyHints.ts'); + expect(hints).toContain('INVITE PINNED'); + expect(hints).toContain('FIRST CONTACT (TOFU ONLY)'); + expect(hints).toContain('anchored by an imported signed invite'); + const messages = readSource('../../components/InfonetTerminal/MessagesView.tsx'); + expect(messages).toContain('getContactTrustSummary'); + expect(messages).toContain('rootWitnessContinuityLabel'); }); - it('request UI does not route ordinary request flow through legacy add-contact lookup', () => { + it('MeshChat Agent Shell tab keeps legacy dm-add guidance in MeshTerminal', () => { const index = readSource('../../components/MeshChat/index.tsx'); - expect(index).toContain('handleRequestComposerAction'); + expect(index).toContain('AgentShellPanel'); + expect(index).toContain('AGENT SHELL'); expect(index).not.toContain('handleAddContact().catch(() =>'); - expect(index).toContain('dm add'); - expect(index).toContain('legacy migration'); + const terminal = readSource('../../components/MeshTerminal.tsx'); + expect(terminal).toContain('dm add'); + expect(terminal).toContain('legacy migration'); }); it('controller blocks trust-new-key when the stable root changed', () => {