diff --git a/src/components/call-desk/active-call-card.tsx b/src/components/call-desk/active-call-card.tsx index 6bd5ee6..9289b9b 100644 --- a/src/components/call-desk/active-call-card.tsx +++ b/src/components/call-desk/active-call-card.tsx @@ -208,7 +208,7 @@ export const ActiveCallCard = ({ lead, callerPhone, missedCallId, onCallComplete ); } - // Appointment booking after disposition + // Appointment booking after disposition — auto-return when form closes if (postCallStage === 'appointment') { return ( <> @@ -216,6 +216,9 @@ export const ActiveCallCard = ({ lead, callerPhone, missedCallId, onCallComplete

Booking Appointment

for {fullName || phoneDisplay}

+ -
-
- -
-
-

Call Ended — {fullName || phoneDisplay}

-

{formatDuration(callDuration)} · Log this call

+ <> +
+
+
+
+ +
+
+

Call Ended — {fullName || phoneDisplay}

+

{formatDuration(callDuration)} · Log this call

+
+
+
+
- -
+ { + setEnquiryOpen(false); + notify.success('Enquiry Logged'); + }} + /> + ); } diff --git a/src/components/call-desk/ai-chat-panel.tsx b/src/components/call-desk/ai-chat-panel.tsx index c1a7fd3..06da039 100644 --- a/src/components/call-desk/ai-chat-panel.tsx +++ b/src/components/call-desk/ai-chat-panel.tsx @@ -45,7 +45,11 @@ export const AiChatPanel = ({ callerContext, role = 'cc-agent' }: AiChatPanelPro const inputRef = useRef(null); const scrollToBottom = useCallback(() => { - messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' }); + // Scroll within the messages container only — don't scroll the parent panel + const el = messagesEndRef.current; + if (el?.parentElement) { + el.parentElement.scrollTop = el.parentElement.scrollHeight; + } }, []); useEffect(() => {