From 686a0527719ad672f3e48aec423c390ee5b5b4d4 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Mon, 27 Jul 2026 16:12:19 +0530 Subject: [PATCH 1/2] (fix)ui/chat: extended message input, bubble overflowing width --- frontend/src/components/MessageInput.tsx | 21 ++++++++++++------- .../src/conversation/ConversationBubble.tsx | 8 +++---- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/MessageInput.tsx b/frontend/src/components/MessageInput.tsx index eaac1eea..8d44d765 100644 --- a/frontend/src/components/MessageInput.tsx +++ b/frontend/src/components/MessageInput.tsx @@ -1,4 +1,10 @@ -import { useCallback, useEffect, useRef, useState } from 'react'; +import { + useCallback, + useEffect, + useLayoutEffect, + useRef, + useState, +} from 'react'; import { createPortal } from 'react-dom'; import { useDropzone } from 'react-dropzone'; import { useTranslation } from 'react-i18next'; @@ -943,9 +949,6 @@ export default function MessageInput({ setValue( buildVoiceDraftValue(voiceBaseValueRef.current, normalizedTranscript), ); - setTimeout(() => { - handleInput(); - }, 0); }; const promptVoiceFileFallback = (message: string) => { @@ -1331,20 +1334,23 @@ export default function MessageInput({ }; }, []); - useEffect(() => { + useLayoutEffect(() => { handleInput(); + }, [value, handleInput]); + + useEffect(() => { + window.addEventListener('resize', handleInput); + return () => window.removeEventListener('resize', handleInput); }, [handleInput]); const handleChange = (e: React.ChangeEvent) => { setValue(e.target.value); - handleInput(); }; const handleKeyDown = (e: React.KeyboardEvent) => { if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault(); handleSubmit(); - handleInput(); } }; @@ -1583,7 +1589,6 @@ export default function MessageInput({ tabIndex={1} placeholder={t('inputPlaceholder')} className="inputbox-style dark:text-foreground dark:placeholder:text-muted-foreground/50 w-full scrollbar-thin overflow-x-hidden overflow-y-auto rounded-t-3xl bg-transparent px-2 text-base leading-tight whitespace-pre-wrap opacity-100 placeholder:text-gray-500 focus:outline-hidden sm:px-3" - onInput={handleInput} onKeyDown={handleKeyDown} onPaste={handlePaste} aria-label={t('inputPlaceholder')} diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index e0b20c60..9b22f3e6 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -191,18 +191,18 @@ const ConversationBubble = forwardRef< )}
{!isEditClicked && ( <> -
-
+
+
{message}
From e8b7ca3c836a517bf9fd3b74093e00a6fc03d4a7 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Mon, 27 Jul 2026 16:33:57 +0530 Subject: [PATCH 2/2] (fix)bubble: min-w-0 noise --- frontend/src/conversation/ConversationBubble.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index 9b22f3e6..8f621dcd 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -191,7 +191,7 @@ const ConversationBubble = forwardRef< )}