From 6118d0f94029c858dfb01ba0fa587b0c347a1254 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Tue, 13 May 2025 02:03:14 -0700 Subject: [PATCH] Prod: drop the border of the last message instead of using a mt:-1 on the composer --- src/apps/chat/AppChat.tsx | 2 +- src/apps/chat/components/message/ChatMessage.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/chat/AppChat.tsx b/src/apps/chat/AppChat.tsx index 0b85daed5..9753b5c6f 100644 --- a/src/apps/chat/AppChat.tsx +++ b/src/apps/chat/AppChat.tsx @@ -103,7 +103,7 @@ const composerOpenSx: SxProps = { borderTop: `1px solid`, borderTopColor: 'rgba(var(--joy-palette-neutral-mainChannel, 99 107 116) / 0.4)', // hack: eats the bottom of the last message (as it has a 1px divider) - mt: '-1px', + // mt: '-1px', }; const composerClosedSx: SxProps = { diff --git a/src/apps/chat/components/message/ChatMessage.tsx b/src/apps/chat/components/message/ChatMessage.tsx index aabc722c3..2f70381dd 100644 --- a/src/apps/chat/components/message/ChatMessage.tsx +++ b/src/apps/chat/components/message/ChatMessage.tsx @@ -576,7 +576,7 @@ export function ChatMessage(props: { // filter: 'url(#agi-futuristic-glow)', // style: omit border if set externally - ...(!('borderBottom' in (props.sx || {})) && { + ...(!('borderBottom' in (props.sx || {})) && !props.isBottom && { borderBottom: '1px solid', borderBottomColor: 'divider', }), @@ -623,7 +623,7 @@ export function ChatMessage(props: { display: 'block', // this is Needed, otherwise there will be a horizontal overflow ...props.sx, - }), [adjContentScaling, backgroundColor, isEditingText, isUserMessageSkipped, isUserStarred, isVndAndCacheAuto, isVndAndCacheUser, props.sx, uiComplexityMode]); + }), [adjContentScaling, backgroundColor, isEditingText, isUserMessageSkipped, isUserStarred, isVndAndCacheAuto, isVndAndCacheUser, props.isBottom, props.sx, uiComplexityMode]); // avatar icon & label & tooltip