From 28d1b394d1254c4824c7772c097624032af16633 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 04:46:53 +0000 Subject: [PATCH 1/3] feat: add suggested questions to chat widget empty state - Provide guidance for users in the AI assistant empty state - Add interactive chips for common questions - Implement handleSuggestedQuestion helper in chat hook - Document UX pattern in .jules/palette.md - Ensure keyboard accessibility and proper ARIA labels --- src/components/chat/client.tsx | 29 +++++++++++++++++++++++--- src/components/chat/use-chat-widget.ts | 13 ++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/src/components/chat/client.tsx b/src/components/chat/client.tsx index 41f977d..61a9852 100644 --- a/src/components/chat/client.tsx +++ b/src/components/chat/client.tsx @@ -24,10 +24,17 @@ export default function ChatWidgetClient() { copiedId, copyToClipboard, handleEdit, + handleSuggestedQuestion, isFilterBarVisible, status, } = useChatWidget(); + const suggestedQuestions = [ + "What are Amr's core technical skills?", + "Tell me about his most recent projects.", + "What was his PhD research about?", + ]; + return (
{messages.length === 0 && !isLoading && ( -
- Hi! I'm Miro. Ask me anything about Amr's experience, projects, - or skills 🙂 +
+
+ Hi! I'm Miro. Ask me anything about Amr's + experience, projects, or skills 🙂 +
+
+ {suggestedQuestions.map((q) => ( + + ))} +
)} {messages.map((m, index) => ( diff --git a/src/components/chat/use-chat-widget.ts b/src/components/chat/use-chat-widget.ts index cf4b1a1..fa928bc 100644 --- a/src/components/chat/use-chat-widget.ts +++ b/src/components/chat/use-chat-widget.ts @@ -109,6 +109,18 @@ export function useChatWidget() { [input, isLoading, sendMessage], ); + const handleSuggestedQuestion = useCallback( + async (question: string) => { + if (isLoading) return; + try { + await sendMessage({ text: question }); + } catch (err) { + console.error("Failed to send suggested question:", err); + } + }, + [isLoading, sendMessage], + ); + const isRateLimited = error?.message?.includes("429") || (error as unknown as { status?: number })?.status === 429; @@ -143,6 +155,7 @@ export function useChatWidget() { copiedId, copyToClipboard, handleEdit, + handleSuggestedQuestion, isFilterBarVisible, status, }; From 9d32e03635214c4b73024b17ca0e7eefd8eae007 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 04:56:26 +0000 Subject: [PATCH 2/3] feat: add suggested questions to chat widget empty state - Provide guidance for users in the AI assistant empty state - Add interactive chips for common questions - Implement handleSuggestedQuestion helper in chat hook - Fix TypeScript error by using valid Button variant ("ghost") - Document UX pattern in .jules/palette.md - Ensure keyboard accessibility and proper ARIA labels --- src/components/chat/client.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/chat/client.tsx b/src/components/chat/client.tsx index 61a9852..8f3e37c 100644 --- a/src/components/chat/client.tsx +++ b/src/components/chat/client.tsx @@ -75,7 +75,7 @@ export default function ChatWidgetClient() {