mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 18:28:15 +00:00
1.6 KiB
1.6 KiB
Next Session — Outbound Call UI + Remaining Work
Priority 1: Outbound Call UI
Problem: When agent clicks Call, a toast appears and the call happens in the background. No call screen shows.
Fix: When agent clicks Call on a lead:
- Immediately set
callState = 'ringing-out'andcallerNumbervia Jotai atoms - Show ActiveCallCard with "Calling {name}..." and End button
- Show CallPrepCard with AI summary (same as inbound)
- Context panel auto-loads Lead 360
- Sidecar calls Kookoo outbound in parallel
- When SIP bridge arrives (newRTCSession), auto-answer it — don't show Answer/Decline
- UI transitions to active call with Mute/Hold/End
- Call ends → Disposition form
Files to change:
src/components/call-desk/click-to-call-button.tsx— set Jotai atoms on click, not just call APIsrc/components/call-desk/active-call-card.tsx— handle 'ringing-out' statesrc/state/sip-manager.ts— auto-answer SIP when outbound call is pendingsrc/pages/call-desk.tsx— include 'ringing-out' in isInCall, set selected lead on dial
Key insight: The call card is driven by app state, not SIP events. Set state immediately on click.
Priority 2: Remaining Polish
- Kookoo callback creates call records (already deployed)
- Toast for dial should be replaced with the call card (covered by Priority 1)
- Test full outbound flow end-to-end on staging
Priority 3: Caching
- DataProvider fires 14 queries on mount (7 × StrictMode)
- Add deduplication or sidecar-level cache
Deploy Commands
See memory/helix-engage-session-progress.md for full deploy instructions.