From a5f6bde26f3a6a03bd3defbe8b4fa1bc6ccf7581 Mon Sep 17 00:00:00 2001 From: agoudbg Date: Fri, 21 Nov 2025 09:27:14 +0800 Subject: [PATCH] refactor: Welcome layout and conditional rendering (#690) * refactor: Welcome layout and conditional rendering Improves flex layout and spacing in ConversationStarter, and updates MessagesBlock to conditionally render ConversationStarter or MessageListView based on chat state. This streamlines the UI and removes redundant rendering logic. * fix: replay mode * fix: Remove unnecessary inset-0 --------- Co-authored-by: Willem Jiang --- .../chat/components/conversation-starter.tsx | 15 ++++++++++---- .../app/chat/components/messages-block.tsx | 20 +++++++++---------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/web/src/app/chat/components/conversation-starter.tsx b/web/src/app/chat/components/conversation-starter.tsx index b80e4c10..f57ca4cd 100644 --- a/web/src/app/chat/components/conversation-starter.tsx +++ b/web/src/app/chat/components/conversation-starter.tsx @@ -19,11 +19,18 @@ export function ConversationStarter({ const questions = t.raw("conversationStarters") as string[]; return ( -
-
- +
+ {/* Spacer for flex layout - pushes Welcome to center */} +
+
+
-
    +
      {questions.map((question, index) => ( - + {responding || messageCount !== 0 || isReplay ? ( + + ) : ( + + )} {!isReplay ? (
      - {!responding && messageCount === 0 && ( - - )}