Skip to content

An AI-powered search engine with a generative UI

fix: Correct desktop offset calculation for chat messages

Yoshiki Miura24f3bacf827c
diff --git a/components/chat-messages.tsx b/components/chat-messages.tsx
index 3440c479..2516f4c5 100644
--- a/components/chat-messages.tsx
+++ b/components/chat-messages.tsx
@@ -70,9 +70,10 @@ export function ChatMessages({
}, [isLoading])
// Calculate the offset height based on device type
+ // Note: pt-14 (56px) on scroll-container must be included in desktop offset
const offsetHeight = isMobile
? 208 // Mobile: larger offset for mobile header/input
- : 140 // Desktop: smaller offset
+ : 196 // Desktop: smaller offset (140px) + pt-14 (56px)
// Extract citation maps from all messages in all sections
const allCitationMaps = useMemo(() => {