Message Center Module¶
Overview¶
Message Center is the unified thread workspace for SMS, calls, voicemail, follow-ups, and AI-assisted conversation workflows. Its route entrypoints are / and /message-center.
Main UI Structure¶
- Inbox list:
ContactCenterInboxList.tsx - Thread view:
ContactCenterThreadView.tsx - Details panel:
ContactCenterDetailsPanel.tsx - Mobile layout:
ContactCenterMobileView.tsx - Shared state orchestration:
useContactCenterState.ts
Communication Stack Today¶
- SMS delivery and most messaging workflows still run through Twilio-backed Edge Functions such as
message-send,message-inbound,message-delivery-status, andcampaign-lead-send - Call, voicemail, and PBX-specific integration points also exist, including
thread-call-dial,lead-pbx-actions,lead-pbx-sms-actions,thread-voicemail-open,call-missed-answered, and local PBX helper files underfreepbx/ - In other words, the current codebase is hybrid: Twilio remains primary for core messaging, while PBX integration is present for outbound calling and related operational flows
Insurance Follow-Up Categories¶
The older standalone insurance-category implementation doc is now part of Message Center behavior:
- Navbar entrypoint: src/components/layout/InsuranceFollowUpsNav.tsx
- Data hook: src/hooks/useInsuranceFollowUpsCategories.ts
- Priority update function: supabase/functions/insurance-followups-categories/index.ts
- Reactivation function: supabase/functions/insurance-followup-reactivation/index.ts
- Hold-time updates after message send: src/utils/updateHoldTimeFollowUps.ts
Current Category Model¶
white: scheduled insurance follow-ups matching the selected date rangeblue,green,yellow,red,inactive: derived from backendfollowup_priority- The frontend intentionally treats white as a separate date-filtered view and uses backend-calculated priorities for the other categories
- Active calls are excluded from the visible color buckets in the category hook
AI And OCR Touchpoints¶
- Yes Bot behavior is specified separately in
docs/features/yes-bot.md - Inbound messaging can trigger OCR and AI workflows from
message-inbound - VIN detection is already integrated into thread image previews through
VinImagePreviewGroupand theocr-visionfunction
What The Old Docs Got Wrong¶
- Voice call integration is not merely a future enhancement; there is active call, voicemail, transcript, and PBX/Twilio code in the repo today
- The telephony layer is not fully migrated to FreePBX/R2; the present implementation is mixed and provider-specific by workflow
- Insurance follow-up categorization is not just a business note; it is a first-class navbar workflow backed by Edge Functions, realtime updates, and thread actions