From e996d96fa08225b1e38e6eade3d427b69b1affea Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Thu, 27 Aug 2026 15:51:42 +0700 Subject: [PATCH] Sasquatch: fix desktop discoverability + repetitive greeting - Move bubble & panel to bottom-RIGHT on desktop (was bottom-left, colliding with / hiding behind the desktop footer). Mobile stays bottom-left. - Raise bubble/panel z-index to z-60 so it always sits above the footer. - Re-clamp a stale saved drag position on mount: a bubble dragged off-screen on one device no longer disappears on another. - Stop showing the long welcome greeting + action button on every open once a conversation has started (chatMessages > 0), so it no longer "says the same thing all over again". Co-authored-by: shakespeare.diy --- src/components/SasquatchGuide.tsx | 46 +++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/src/components/SasquatchGuide.tsx b/src/components/SasquatchGuide.tsx index 5b7885c..0c59b19 100644 --- a/src/components/SasquatchGuide.tsx +++ b/src/components/SasquatchGuide.tsx @@ -635,11 +635,26 @@ export function SasquatchGuide({ message, onDismiss }: SasquatchGuideProps) { const bubbleStyle = useMemo(() => { if (dragPos) { - return { position: 'fixed' as const, left: dragPos.x, top: dragPos.y, bottom: 'auto', right: 'auto', zIndex: 50 }; + return { position: 'fixed' as const, left: dragPos.x, top: dragPos.y, bottom: 'auto', right: 'auto', zIndex: 60 }; } return undefined; }, [dragPos]); + // Safety: a bubble position saved on one device/viewport (e.g. a phone) can + // land off-screen or hidden on another (e.g. desktop). On mount, if a saved + // drag position is outside the current viewport, clear it so the bubble + // returns to its default, always-visible corner. + useEffect(() => { + if (!dragPos) return; + const maxX = window.innerWidth - 56; + const maxY = window.innerHeight - 56; + if (dragPos.x < 0 || dragPos.y < 0 || dragPos.x > maxX || dragPos.y > maxY) { + setDragPos(null); + } + // Only run on mount — we don't want to fight the user mid-drag. + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + // Only auto-open the panel when the context message explicitly opts in via // `autoShow`. On the map (`/`) and The Lab (`/lab`) the guide stays minimized // until the user taps the bubble — the message content is still used to @@ -1181,8 +1196,11 @@ Instructions:
- {/* Greeting */} -

- {activeMessage.message} -

+ {/* Greeting — only shown before the user starts chatting, so the + same wall of welcome text doesn't reappear on every open once + a conversation is underway. */} + {chatMessages.length === 0 && ( +

+ {activeMessage.message} +

+ )} - {/* Action button */} - {activeMessage.action && ( + {/* Action button — also only before chatting */} + {chatMessages.length === 0 && activeMessage.action && (