From 97bccd2e7db9a4c490b3d635e85724dd25e5b02c Mon Sep 17 00:00:00 2001 From: Lia Date: Fri, 2 Oct 2026 02:57:49 +0000 Subject: [PATCH] fix: Align Agent Contact Email with Its Label --- client/src/components/Agents/AgentContact.tsx | 2 +- .../__tests__/Landing.agent-contact.spec.tsx | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/client/src/components/Agents/AgentContact.tsx b/client/src/components/Agents/AgentContact.tsx index 7b075aac42..951603511a 100644 --- a/client/src/components/Agents/AgentContact.tsx +++ b/client/src/components/Agents/AgentContact.tsx @@ -59,7 +59,7 @@ export default function AgentContact({ {contact?.email ? ( {label} diff --git a/client/src/components/Chat/__tests__/Landing.agent-contact.spec.tsx b/client/src/components/Chat/__tests__/Landing.agent-contact.spec.tsx index 692b672457..fdc4bda71d 100644 --- a/client/src/components/Chat/__tests__/Landing.agent-contact.spec.tsx +++ b/client/src/components/Chat/__tests__/Landing.agent-contact.spec.tsx @@ -126,6 +126,29 @@ describe('Landing agent contact', () => { expect(screen.queryByRole('link', { name: 'Owner User' })).not.toBeInTheDocument(); }); + it('renders the email link without inline baseline space beside the contact label', () => { + mockConversation = { + endpoint: 'agents', + agent_id: 'agent-1', + }; + mockAgentsMap = { + 'agent-1': { + id: 'agent-1', + name: 'LibreChat', + description: 'Contact Danny if you see any errors', + support_contact: { email: 'messagedaniel@pm.me' }, + }, + }; + + renderLanding(); + + const link = screen.getByRole('link', { name: 'messagedaniel@pm.me' }); + expect(link).toHaveAttribute('href', 'mailto:messagedaniel@pm.me'); + expect(link).toHaveClass('block'); + expect(link).not.toHaveClass('inline-block'); + expect(screen.getByText('Contact:').parentElement).toHaveClass('items-center'); + }); + it('does not show contact when the selected agent is missing from agentsMap', () => { mockConversation = { endpoint: 'agents',