/* ======================================================================== screen-tap-call.jsx, Emirates calls LUKAS. After the chat, Hala asked "should I call you?" Lukas said yes. Lukas's phone rings. iOS incoming-call UI, caller is "Emirates" with the verified-business badge. Lukas accepts → connecting → handoff is ready. ======================================================================== */ function ScreenTapCall({ active }) { const hala = window.DEMO_SCRIPT.hala; const lukas = window.DEMO_SCRIPT.passenger; // 0: ringing, 1: accepted, 2: connecting, 3: connected const [step, setStep] = useState(0); useEffect(() => { if (!active) { setStep(0); return; } const t1 = setTimeout(() => setStep(1), 2200); const t2 = setTimeout(() => setStep(2), 3000); const t3 = setTimeout(() => setStep(3), 5200); return () => { clearTimeout(t1); clearTimeout(t2); clearTimeout(t3); }; }, [active]); const ctxItems = [ ["Identity re-verified", `Booking ref ${lukas.booking_ref} + email \u00b7 matched`], ["Booking pulled", `${lukas.booking_ref} \u00b7 EK202 cancellation`], ["Chat history loaded", "Web chat just now \u00b7 full transcript"], ["Personal context", `Sister's wedding \u00b7 Brooklyn, 11:00 tomorrow`], ["Preferences carried", "Seat 23A preference \u00b7 vegetarian meal"], ["One thread", "Seamless journey \u00b7 web \u2192 phone, no repeat"], ]; // iOS incoming-call icons const Icon = { message: , remind: , decline: , accept: , verified: , }; const stateLabel = step === 0 ? "Incoming call" : step === 1 ? "Connecting\u2026" : step === 2 ? "Connecting\u2026" : "Connected"; return (
{/* iOS-style INCOMING call screen */}
{/* iOS status bar */}
9:23
{/* Caller block, Emirates (verified) is the caller, not Hala */}
{stateLabel}
Emirates {Icon.verified}
mobile
{/* Incoming actions: decline + accept (big), shortcuts above */}
{Icon.remind}
Remind Me
{Icon.message}
Message
{Icon.decline}
Decline
= 1 ? "is-tapped" : ""}`} onClick={() => { setStep(3); // One-shot flag picked up by ScreenVoice on mount so the // Accept tap both advances the scene and starts the call. window.__autoStartVoiceCall = true; setTimeout(() => window.dispatchEvent(new CustomEvent('demo:advance')), 900); }} > {Icon.accept}
Accept
{/* Right pane, what's flowing across */}
No hold music. No "press 1 for…"

Emirates calls Lukas. Same agent. Same memory.

Hala asked if Lukas would rather take a call, he said yes. Emirates places the outbound call and the chat session rides with it. He doesn't dial anything; he doesn't sit in a queue.

When he taps accept, Hala picks up the conversation mid-sentence: cancellation, the wedding, EK203, seat 23A, vegetarian, all already in context.

{/* Live context-handoff card */}
Context handoff · live
{step === 0 && "Phone ringing\u2026"} {step === 1 && "Lukas accepted\u2026"} {step === 2 && "Forwarding session\u2026"} {step === 3 && "Ready \u00b7 No hold time"}
{ctxItems.map(([k, v], i) => { const visible = step >= 2 && i < (step === 2 ? Math.min(3, ctxItems.length) : ctxItems.length); return (
{k}
{v}
); })}
); } window.ScreenTapCall = ScreenTapCall;