From 1d395a8c368325cdcd2afcb77e310d87433143c3 Mon Sep 17 00:00:00 2001 From: saridsa2 Date: Thu, 19 Mar 2026 21:24:00 +0530 Subject: [PATCH] =?UTF-8?q?docs:=20next=20session=20plan=20=E2=80=94=20out?= =?UTF-8?q?bound=20call=20UI,=20caching,=20remaining=20polish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/next-session.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/next-session.md diff --git a/docs/next-session.md b/docs/next-session.md new file mode 100644 index 0000000..5c39b49 --- /dev/null +++ b/docs/next-session.md @@ -0,0 +1,35 @@ +# 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: +1. Immediately set `callState = 'ringing-out'` and `callerNumber` via Jotai atoms +2. Show ActiveCallCard with "Calling {name}..." and End button +3. Show CallPrepCard with AI summary (same as inbound) +4. Context panel auto-loads Lead 360 +5. Sidecar calls Kookoo outbound in parallel +6. When SIP bridge arrives (newRTCSession), auto-answer it — don't show Answer/Decline +7. UI transitions to active call with Mute/Hold/End +8. Call ends → Disposition form + +**Files to change:** +- `src/components/call-desk/click-to-call-button.tsx` — set Jotai atoms on click, not just call API +- `src/components/call-desk/active-call-card.tsx` — handle 'ringing-out' state +- `src/state/sip-manager.ts` — auto-answer SIP when outbound call is pending +- `src/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.