From 840cea7188ffa6f1f6390ab99ba1b1a096d2e797 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Mon, 8 Jun 2026 02:41:51 +0000
Subject: [PATCH] feat(chat): update chat widget theme and improve
interactivity
- Update ChatWidget colors to match site theme using `bg-primary`.
- Enhance message rendering to handle AI SDK 6.0 `parts`, including reasoning.
- Implement layered typing indicators for better user feedback during streaming.
- Reposition scroll-to-top button to avoid overlap with the chat widget.
- Ensure dark mode support for the chat widget container.
---
src/app/globals.css | 4 +-
src/components/ai-chat/ChatWidgetClient.tsx | 61 ++++++++++++++-------
2 files changed, 42 insertions(+), 23 deletions(-)
diff --git a/src/app/globals.css b/src/app/globals.css
index e387a41..906b102 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -100,8 +100,8 @@ div {
/* Scroll to top button */
.scroll-to-top {
position: fixed;
- bottom: 5rem;
- right: 2%;
+ bottom: 1.5rem;
+ right: 6rem;
z-index: 1000;
}
diff --git a/src/components/ai-chat/ChatWidgetClient.tsx b/src/components/ai-chat/ChatWidgetClient.tsx
index b48a4de..a11b9d3 100644
--- a/src/components/ai-chat/ChatWidgetClient.tsx
+++ b/src/components/ai-chat/ChatWidgetClient.tsx
@@ -71,7 +71,7 @@ export default function ChatWidgetClient() {
{isOpen && (
{/* Header */}
-
+
Ask about Amr
);
})}
- {isLoading && (
-
-
-
-
-
+ {status === "submitted" &&
+ messages[messages.length - 1]?.role !== "assistant" && (
+
-
- )}
+ )}
{error && (
{isRateLimited
@@ -163,7 +182,7 @@ export default function ChatWidgetClient() {
isIconOnly
type="submit"
variant="primary"
- className="bg-teal-600 text-white min-w-8 w-8 h-8"
+ className="bg-primary text-white min-w-8 w-8 h-8"
isDisabled={isLoading || !input?.trim()}
>
@@ -178,7 +197,7 @@ export default function ChatWidgetClient() {
isIconOnly
onClick={toggleChat}
aria-label="Open AI assistant"
- className="h-14 w-14 rounded-full bg-teal-600 text-white shadow-lg hover:scale-110 transition-transform"
+ className="h-14 w-14 rounded-full bg-primary text-white shadow-lg hover:scale-110 transition-transform"
>
{isOpen ? : }