From 6709528f261ccdc2dc6729440760722317b90823 Mon Sep 17 00:00:00 2001 From: israel Date: Fri, 9 Jan 2026 10:35:36 +0100 Subject: [PATCH 1/8] fix(chat): prevent blank state before AI response displays --- .../(app)/dashboard/[id]/chat/components/chat-interface.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/platform/app/(app)/dashboard/[id]/chat/components/chat-interface.tsx b/services/platform/app/(app)/dashboard/[id]/chat/components/chat-interface.tsx index a82447b9f..d0d75a1d6 100644 --- a/services/platform/app/(app)/dashboard/[id]/chat/components/chat-interface.tsx +++ b/services/platform/app/(app)/dashboard/[id]/chat/components/chat-interface.tsx @@ -800,9 +800,11 @@ export function ChatInterface({ {/* AI Response area - ref used for scroll positioning */} {/* Show ThinkingAnimation when: 1. Waiting for AI response (isPending, no streaming yet), OR - 2. Tools are actively executing (even if text has started streaming) */} + 2. Streaming started but no text content yet (prevents blank gap), OR + 3. Tools are actively executing (even if text has started streaming) */}
{((isPending && userDraftMessage && !streamingMessage) || + (streamingMessage && !streamingMessage.text) || hasActiveTools) && ( Date: Fri, 9 Jan 2026 12:35:26 +0100 Subject: [PATCH 2/8] feat(chat): add inline cursor to typewriter markdown --- .../chat/components/incremental-markdown.tsx | 91 +++++++++++++++++-- .../[id]/chat/components/typewriter-text.tsx | 23 +---- 2 files changed, 86 insertions(+), 28 deletions(-) diff --git a/services/platform/app/(app)/dashboard/[id]/chat/components/incremental-markdown.tsx b/services/platform/app/(app)/dashboard/[id]/chat/components/incremental-markdown.tsx index baa853b6e..522ac29cb 100644 --- a/services/platform/app/(app)/dashboard/[id]/chat/components/incremental-markdown.tsx +++ b/services/platform/app/(app)/dashboard/[id]/chat/components/incremental-markdown.tsx @@ -68,6 +68,8 @@ interface IncrementalMarkdownProps { components?: Record>; /** Additional CSS class */ className?: string; + /** Whether to show the typing cursor */ + showCursor?: boolean; } // ============================================================================ @@ -109,6 +111,19 @@ const StableMarkdown = memo( // STREAMING MARKDOWN COMPONENT // ============================================================================ +/** + * Animated cursor that appears during typing. + * Uses CSS animation for smooth blinking without JS overhead. + */ +const TypewriterCursor = memo(function TypewriterCursor() { + return ( +