From 6a5e80fcd933df34b560d60e50821c514df0eeb9 Mon Sep 17 00:00:00 2001 From: ciregenz Date: Thu, 11 Jun 2026 01:19:27 -0700 Subject: [PATCH] [eric] onboarding: hovering a starter prompt shows a translucent ghost chat preview with the message as a user bubble --- .../Dashboard/canvas/DashboardEmptyState.tsx | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/pages/Dashboard/canvas/DashboardEmptyState.tsx b/frontend/src/app/pages/Dashboard/canvas/DashboardEmptyState.tsx index 97870381..d45db91b 100644 --- a/frontend/src/app/pages/Dashboard/canvas/DashboardEmptyState.tsx +++ b/frontend/src/app/pages/Dashboard/canvas/DashboardEmptyState.tsx @@ -72,6 +72,7 @@ const DashboardEmptyState: React.FC<{ const navigate = useNavigate(); const [launching, setLaunching] = React.useState(false); const [expanded, setExpanded] = React.useState(null); + const [hoveredPrompt, setHoveredPrompt] = React.useState(null); const currentCategory = STARTER_CATEGORIES.find((cat) => cat.id === expanded); const currentPrompts = currentCategory?.prompts ?? []; @@ -193,12 +194,16 @@ const DashboardEmptyState: React.FC<{ > back - + setHoveredPrompt(null)} + sx={{ position: 'relative', display: 'flex', flexDirection: 'column', gap: 0.9, width: '100%', maxWidth: 480 }} + > {currentPrompts.map((prompt) => ( launch(prompt)} + onMouseEnter={() => setHoveredPrompt(prompt)} disabled={launching} sx={{ textAlign: 'left', @@ -218,6 +223,45 @@ const DashboardEmptyState: React.FC<{ {prompt} ))} + + {/* Hover preview: a translucent ghost of the chat that would open, + so the user sees their message land before committing. Pure + divs (not the heavy AgentChat), so it costs nothing to render. */} + + {hoveredPrompt && ( + + + New chat + + + + + {hoveredPrompt} + + + + + )} + )}