From c9418f45161b810d729d862533fe70938770489f Mon Sep 17 00:00:00 2001 From: HimanM <67066047+HimanM@users.noreply.github.com> Date: Sun, 21 Jun 2026 19:12:26 +0530 Subject: [PATCH] Refresh welcome state and quick actions --- .../05-quick-actions-and-welcome.md | 22 ++++++---- frontend/src/app/page.tsx | 44 ++++++++++++++----- 2 files changed, 47 insertions(+), 19 deletions(-) diff --git a/docs/feature-checklists/05-quick-actions-and-welcome.md b/docs/feature-checklists/05-quick-actions-and-welcome.md index c0680af..7665228 100644 --- a/docs/feature-checklists/05-quick-actions-and-welcome.md +++ b/docs/feature-checklists/05-quick-actions-and-welcome.md @@ -6,18 +6,22 @@ Improve discovery and usability with better quick actions, a stronger welcome st ## Checklist -- [ ] Review candidate welcome screens and quick-action patterns -- [ ] Decide which shortcuts belong on the empty state versus active chat state -- [ ] Add better quick-action chips for common shopping intents -- [ ] Improve the welcome state so it advertises core capabilities clearly -- [ ] Keep the new layout consistent with the current visual direction -- [ ] Verify prompts generated by quick actions still lead to cards or useful assistant text -- [ ] Run `npm run lint` -- [ ] Run `npm run build` -- [ ] Verify the flow in a live browser session +- [x] Review candidate welcome screens and quick-action patterns +- [x] Decide which shortcuts belong on the empty state versus active chat state +- [x] Add better quick-action chips for common shopping intents +- [x] Improve the welcome state so it advertises core capabilities clearly +- [x] Keep the new layout consistent with the current visual direction +- [x] Verify prompts generated by quick actions still lead to cards or useful assistant text +- [x] Run `npm run lint` +- [x] Run `npm run build` +- [x] Verify the flow in a live browser session - [ ] Commit, push branch, and open draft PR ## Notes - Candidate reference: `tmp_compare/kavi-kapruka/components/chat/QuickActions.tsx` - Candidate reference: `tmp_compare/kavi-kapruka/components/chat/WelcomeScreen.tsx` +- Empty state now highlights gift picks, order tracking, and checkout flow without introducing a new component or layout system. +- Active chat keeps the existing quick-action row and adds a checkout shortcut only when the cart has items. +- Live browser verification used `http://localhost:3000` with a Playwright fallback because the in-app Browser tool was not callable in this thread. +- Browser checks confirmed the refreshed welcome copy rendered and the category quick action still started a useful categories flow. diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 19682af..1585bb5 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -46,10 +46,10 @@ function saveSessionId(sessionId: string) { } const suggestions = [ - "Find birthday cakes", - "Flowers for anniversary", - "Gift ideas for wife", - "Party supplies for 10", + { label: "Restock groceries", prompt: "Help me restock weekly groceries on Kapruka" }, + { label: "Birthday cake", prompt: "Find birthday cakes on Kapruka under Rs. 10,000" }, + { label: "Send flowers", prompt: "I want to send flowers to someone special" }, + { label: "Party supplies", prompt: "Show party supplies for 10 people" }, ]; const TRACK_ORDER_PROMPT = "I want to track my order. Please ask me for the Kapruka order number if needed."; @@ -421,12 +421,27 @@ export default function Home() { Shop with an AI assistant

- Discover products in chat, add to cart instantly, and save checkout details in a real side panel. + Discover products in chat, track orders, and move into checkout without leaving the conversation.

+
+
+

Gift Picks

+

Use the advisor or jump straight into birthday, anniversary, and grocery prompts.

+
+
+

Order Tracking

+

Ask for a tracking update anytime and the assistant will prompt for the order number if needed.

+
+
+

Checkout Flow

+

Save delivery details in the side drawer, then come back to chat for order placement and payment.

+
+
+
>_ - Find a birthday gift under Rs. 10,000 + Try: help me restock my weekly groceries
@@ -464,15 +479,15 @@ export default function Home() { Open Checkout ) : null} - {suggestions.map((text) => ( + {suggestions.map((suggestion) => ( ))}
@@ -504,6 +519,15 @@ export default function Home() { ) )} + {cartCount > 0 ? ( + + ) : null} {messages.map((msg) => (