Commit Graph

99 Commits

Author SHA1 Message Date
526ad18159 feat: call desk redesign — 2-panel layout, collapsible sidebar, inline AI, ringtone
- Collapsible sidebar with Jotai atom (icon-only mode, persisted to localStorage)
- 2-panel call desk: worklist (60%) + context panel (40%) with AI + Lead 360 tabs
- Inline AI call prep card — known lead summary or unknown caller script
- Active call card with compact Answer/Decline buttons
- Worklist panel with human-readable labels, priority badges, click-to-select
- Context panel auto-switches to Lead 360 when lead selected or call incoming
- Browser ringtone via Web Audio API on incoming calls
- Sonner + Untitled UI IconNotification for toast system
- apiClient pattern: centralized post/get/graphql with auto-toast on errors
- Remove duplicate avatar from top bar, hide floating widget on call desk
- Fix Link routing in collapsed sidebar (was using <a> causing full page reload)
- Fix GraphQL field names: adStatus→status, platformUrl needs subfield selection
- Silent mode for DataProvider queries to prevent toast spam

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 18:33:36 +05:30
61901eb8fb feat: wire frontend to platform data, migrate to Jotai + Vercel AI SDK
- Replace mock DataProvider with real GraphQL queries through sidecar
- Add queries.ts and transforms.ts for platform field name mapping
- Migrate SIP state from React Context to Jotai atoms (React 19 compat)
- Add singleton SIP manager to survive StrictMode remounts
- Remove hardcoded Olivia/Sienna accounts from nav menu
- Add password eye toggle, remember me checkbox, forgot password link
- Fix worklist hook to transform platform field names
- Add seed scripts for clinics, health packages, lab tests
- Update test harness for new doctor→clinic relation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 16:44:45 +05:30
e01a4d7747 feat: add AI flow test script — validates auth, lead lookup, patient, doctor, appointments, calls, activities as Rekha 2026-03-18 14:46:19 +05:30
f5c8766f68 feat: complete seeder — 5 doctors linked to workspace members, appointments linked to doctor entities, all agent names match real users 2026-03-18 14:34:58 +05:30
f9231ab126 feat: complete data seeder — 5 patient stories with linked campaigns, patients, leads, appointments, calls, activities, follow-ups 2026-03-18 12:42:43 +05:30
06fc842d98 feat: add platform data seeder with 5 patient stories — campaigns, leads, appointments, calls, activities, follow-ups 2026-03-18 12:35:12 +05:30
b72464a7ec feat: add AI assistant chat panel for call center agents
Wire a tabbed sidebar (Stats | AI Assistant) into the call desk page,
replacing the static DailyStats-only sidebar. The AI chat panel sends
queries to the sidecar POST /api/ai/chat endpoint and renders
responses in a chat-style UI with quick-ask buttons, caller context
banner, typing indicator, and basic markdown formatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 11:27:44 +05:30
bb48d07e61 feat: add worklist with missed calls, follow-ups, and leads sections 2026-03-18 11:26:16 +05:30
ffcaa79410 feat: add Patient 360 page, global search, appointment form — all using FontAwesome Pro duotone icons 2026-03-18 11:19:16 +05:30
937605c883 feat: add Patient 360 page and global search component
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 11:13:40 +05:30
9690ac416e feat: add appointment booking form slide-out during calls, wired to platform createAppointment mutation 2026-03-18 11:07:15 +05:30
66ad398b81 feat: wire real auth — login returns user profile with role from platform, remove mock users and role selector tabs 2026-03-18 10:42:54 +05:30
832fa31597 feat: wire call logging to platform — disposition creates Call record, updates Lead status, logs LeadActivity 2026-03-18 09:11:15 +05:30
d846d97377 refactor: remove demo mode — all auth goes through sidecar, call desk is live-only 2026-03-18 08:45:42 +05:30
125aeae41c fix: prevent duplicate SIP registration (module-level guard), extract real caller number from X-CALLERNO header 2026-03-18 08:33:45 +05:30
dfc4a0cd44 fix: move Ozonetel agent login to sidecar auth flow — frontend only handles SIP, sidecar handles REST login 2026-03-18 07:43:29 +05:30
4193b7545a feat: add API client, wire login page to sidecar auth with demo mode fallback 2026-03-18 07:22:19 +05:30
aff383cb6d fix: session reset after call end, add reject/decline for incoming calls, extract caller ID from SIP headers (P-Asserted-Identity, Remote-Party-ID) 2026-03-17 21:31:53 +05:30
36b3a5d34d feat: Ozonetel SIP integration — agent login, SIP registration, inbound call flow working
Known issues to fix:
- Must refresh page after each call (SIP session not resetting to idle properly)
- Decline/reject call not working
- Caller ID shows DID instead of original caller (Ozonetel IVR config issue with call:cid)
- Socket.IO reconnect noise in console (sidecar not running)
2026-03-17 21:20:32 +05:30
d54d54f5f3 fix: prevent StrictMode double-mount from killing SIP WebSocket connection 2026-03-17 20:08:22 +05:30
b2cc3d7012 feat: add floating call widget with SIP controls, click-to-call, and SIP provider
Introduce a shared SipProvider context so all components use the same SIP
connection. Add a floating CallWidget (idle pill, ringing, active with
disposition, ended states) visible for CC agents on every page. Add a
ClickToCallButton for the worklist. Wire SIP status badge and worklist
into the call-desk page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 18:08:46 +05:30
d5feaab75a feat: add JsSIP SIP client and useSipPhone hook for Ozonetel softphone integration 2026-03-17 18:03:31 +05:30
4f9bdc7312 feat: add Socket.IO client and useCallEvents hook for live CTI mode 2026-03-17 09:14:25 +05:30
45bae9c1c0 chore: rename Ramaiah Memorial Hospital to Global Hospital
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 08:59:13 +05:30
eb638c20e8 feat: add Follow-ups and Call History pages for CC Agent
Implements full Follow-ups page with overdue/upcoming/completed sections
and left-border color-coded cards. Adds Call History table filtered by
current agent with disposition badges and duration formatting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 06:12:24 +05:30
58777222ca feat: add exit animations on lead cards and cross-page filter continuity
- Wrap lead cards in AnimatePresence/motion.div so they fade+slide out when removed from the NEW filter
- Update "View All" link to pass active source filter as ?source= URL param
- Initialize AllLeadsPage sourceFilter from URL search params on mount

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 18:32:27 +05:30
5efa22a35a feat: build CC Agent Call Desk with CTI simulation, AI insights, disposition form, and call log
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 18:30:34 +05:30
e9ac6e598a feat: build Admin Team Dashboard with scoreboard, funnel, SLA, ROI, and integration health
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 18:28:00 +05:30
26c352e2cc feat: 3-role auth, role-based routing, role-specific sidebar navigation
Add cc-agent role alongside executive and admin. Login page now has 3 tabs
(Marketing Executive, Call Center, Admin). RoleRouter renders the appropriate
home page per role. Sidebar shows completely different nav items per role with
role subtitle. Placeholder pages added for Team Dashboard, Call Desk, Call
History, and Follow-ups.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 18:24:25 +05:30
530dfa1aa4 feat: add Call, LeadIngestionSource types and mock data, AI fields on leads
- Add CallDirection, CallStatus, CallDisposition, Call types to entities.ts
- Add IntegrationStatus, AuthStatus, IngestionPlatform, LeadIngestionSource types
- Add aiSummary and aiSuggestedAction fields to Lead type
- Create src/mocks/calls.ts with 15 INBOUND COMPLETED calls across 3 agents
- Create src/mocks/ingestion-sources.ts with 6 integration sources (ACTIVE/WARNING/ERROR)
- Update mockLeads with AI summaries on ~20 leads (new, contacted, spam cohorts)
- Expose calls, ingestionSources, and addCall() in DataContext

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 18:20:41 +05:30
50388dcad5 feat: switch sidebar icons to FontAwesome Pro duotone 2026-03-16 17:29:41 +05:30
a119fb1b67 fix: wire all modals and lead activity slideout into Lead Workspace and All Leads pages
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 16:20:27 +05:30
d98da9a1ea fix: wire role-based views — sidebar auth, user display, table tabs, card actions
- Sidebar: use useAuth() for isAdmin and pass auth user to NavAccountCard
- NavAccountCard: fix bug where items prop was ignored (used placeholderAccounts)
- TopBar: replace hardcoded "SM" initials with user.initials from auth
- All Leads: add "My Leads" tab filtering by assignedAgent matching user
- Lead Card: add role-aware action buttons (Call/Disposition for assigned leads)
- Lead Workspace: pass onLogCall/onUpdateStatus handlers to LeadCard

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 16:15:08 +05:30
8b796bf916 fix: add auth guard redirect and wire logout into NavAccountCard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 16:11:59 +05:30
3b68605561 chore: rename package to helix-engage v0.1.0 2026-03-16 15:09:50 +05:30
ed19657b94 feat: add Assign, WhatsApp Send, Mark Spam, Merge modals and Lead Activity slideout
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 15:08:28 +05:30
db2e88c1e7 feat: build Outreach page with template list, WhatsApp preview, and message history
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 15:06:42 +05:30
41eadad0b3 feat: build Campaigns list and Campaign Detail pages
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 15:01:00 +05:30
7970a34434 feat: build All Leads table page with bulk actions, filters, and pagination
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 14:59:56 +05:30
1bed4b7d08 feat: build Lead Workspace page with KPIs, source grid, lead cards, and sidebar widgets
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 14:49:59 +05:30
d36f9f39b5 feat: add shared StatusBadge, SourceTag, AgeIndicator components and format utilities
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 14:46:29 +05:30
5075fa3f04 feat: add split-screen login page with role selector and mock auth
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 14:45:56 +05:30
087c24d84a feat: wire AuthProvider and DataProvider into main.tsx 2026-03-16 14:43:33 +05:30
2984545dde feat: add app shell with sidebar navigation, routing, and placeholder pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 14:41:59 +05:30
dc68577477 feat: add auth and data providers with mock data hooks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 14:34:23 +05:30
15483c5542 feat: add mock data layer — 50 leads, 5 campaigns, ads, activities, templates, agents
Indian names, ₹ currency, healthcare campaign context for Helix Engage.
Includes factories.ts with nextId/randomFrom/daysAgo/createMockLead helpers,
50 leads across all statuses, 5 campaigns (3 active/1 paused/1 completed),
12 ads on active campaigns, 15 lead activities, 8 follow-ups, 5 WhatsApp
templates, and 3 agents. All cross-references are internally consistent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 14:31:53 +05:30
7ddadcf163 feat: define entity types for Lead, Campaign, Ad, LeadActivity, FollowUp, Message, WhatsAppTemplate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 14:26:13 +05:30
06c91ecc88 feat: override brand color to Material Blue and add General Sans + Satoshi fonts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 14:25:57 +05:30
3a338b33dd chore: initial Untitled UI Vite scaffold with FontAwesome Pro 2026-03-16 14:23:23 +05:30