Commit History
-
feat(meta-status): store metaBusinessId for reliable business verification
CognxSafeTrack +1: Claude Sonnet 4.6Add optional `metaBusinessId` field to Organization (schema + shared-types). fetchMetaStatus now queries /{businessId}?fields=verification_status directly when metaBusinessId is stored — bypasses WABA edge permission restrictions that block test WABAs and certain system user token scopes. Direct setup form gains a "Business ID Meta" input that saves via PUT /organizations/:id. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>70a5a84 -
fix(meta-status): split combined Meta API call + fix business badge for test WABAs
CognxSafeTrack +1: Claude Sonnet 4.6Split `account_review_status,business{...}` into two independent calls so test WABAs (which forbid the `business` field) no longer poison WABA status. Business verification is now optional/non-fatal (wrapped in try/catch). BusinessBadge and BusinessVerificationCell now show "—" with neutral styling when `businessId` is undefined (field inaccessible) instead of misleading "Non vérifiée" amber warning + "Vérifier →" link. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7e2166c
-
feat(whatsapp-setup): direct config mode for platform-owner accounts
CognxSafeTrack +1: Claude Sonnet 4.6Backend: - accessToken now optional in /whatsapp-setup — falls back to WHATSAPP_ACCESS_TOKEN env var (for platform-owner self-setup) Frontend: - "Reconfigurer WhatsApp" button now opens a choice modal instead of launching Embedded Signup directly - Option A (Direct): enter WABA ID + optional token — for accounts already configured on Meta (token from env var used if field left empty) - Option B (Embedded Signup): Facebook login popup — for new client accounts - Phone Number ID pre-filled from existing DB record - Auto-refreshes Meta status after successful save Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2f67731 -
fix(admin): show Reconfigurer WhatsApp when phone exists but token/wabaId missing
CognxSafeTrack +1: Claude Sonnet 4.6Orgs migrated from single-tenant setup have a WhatsAppPhoneNumber record but no wabaId/systemUserToken in Organization table. Without the token the Meta status endpoint returns configured:false and WABA shows "Non connecté". When fetchMetaStatus returns configured:false on an org that already has a phone number, replace the "En ligne" indicator with an amber "Reconfigurer WhatsApp" button that re-triggers the Embedded Signup flow to store the correct wabaId and long-lived token. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4f87bfb -
feat(meta): live Meta verification status + WhatsApp setup fixes
CognxSafeTrack +1: Claude Sonnet 4.6- GET /v1/organizations/:id/meta-status — fetches WABA account_review_status and business verification_status live from Meta Graph API, cached 1h in Redis - POST /v1/organizations/:id/meta-status/refresh — force-invalidates the cache - ClientsManagementView: replaced static metaVerificationStatus field with live per-org Meta status (WABA badge, Business badge, derived daily limit) - launchEmbeddedSignup: fixed race condition — now waits for both the OAuth code (FB.login) and WABA/phone IDs (WA_EMBEDDED_SIGNUP_EVENT) before resolving - /whatsapp-setup: exchanges OAuth code for long-lived Meta token (60 days) before storing; bypasses exchange if token already starts with EAA - OnboardingWizard: removed broken WhatsApp step (3 steps: welcome, legal, AI) - OrganizationSchema: removed non-existent DB fields (contractSigned, contractSignedAt, contractSignerName, metaVerificationStatus, dailyMessageLimit) that caused prisma.organization.create() to throw Unknown arg at runtime Re…bd9eb5b -
feat: backlog P0→P3 — toast system, payments, tenant isolation, feedback handler, i18n parity
CognxSafeTrack +1: Claude Sonnet 4.6P0 — Critical fixes - Fix generate-feedback job silently dropped: register FeedbackHandler in worker index.ts - Wire FeedbackHandler: AI feedback, Day 11 TeamMember extraction, atomicity enforced P0 — Toast system (replace all alert()) - Add useToast hook + ToastContext + Toaster component - Replace every alert() across admin pages with toast.success/error/warning/info - Migrate all raw fetch() in pages to api.upload() / api.get() / api.post() P1 — Type safety - CrmAIAssistant: icon prop any → React.ElementType - useAudioRecorder: add onError callback instead of alert() - api.ts: add upload() method for multipart FormData P1 — Payment gateway - Add payment-gateway.ts: Orange Money + Wave initiation and webhook parsing - Rewrite payments.ts routes: initiate, status, webhook handlers with auto-enrollment on SUCCESS P1 — AI regression tests - Add apps/api/test/regression/ai-gold-standards.test.ts (12 tests, 5 suites) P2 — Visual recruitment (Day 11) - FeedbackHandler extracts TeamMem…6dd9bad
-
chore: update locale files
CognxSafeTrackc4ab07f -
feat: wire i18n to all remaining admin pages
CognxSafeTrack +1: Claude Sonnet 4.6AIAgentSetup, AnalyticsPage, CampaignHistoryPage, ContactsPage, KnowledgeBasePage, LiveFeed, TrackDaysPage, TrackFormPage, TrackListPage, TrainingLab now use useTranslation() throughout. STATUS_CONFIG labels migrated to labelKey pattern to stay compatible with the hook-only call site. Removed all fr-FR locale hardcoding in toLocaleDateString/toLocaleString calls. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6b2ad5a -
feat: wire i18n to dashboard, settings, users — complete locale files
CognxSafeTrack +1: Claude Sonnet 4.6DashboardPage, SettingsPage, UserListPage now use useTranslation(). fr/es/pt locale files expanded with dashboard, analytics, users, contacts, settings, crm, knowledge sections. Sidebar was already translated; main content pages now follow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>ab43d7b -
fix: resolve login 400 — auto-resolve organizationId from email when omitted
CognxSafeTrack +1: Claude Sonnet 4.6Backend now falls back to findUserByEmailOnly() when the frontend doesn't send organizationId (deployed admin still uses old build). Password verification still required — auth security unchanged. Also adds organizationId field to login form for first-time users, and removes last default-org-id references from tenant.tsx. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4e2a593
-
feat: implement whatsapp templates management with security hardening, audit logs, and crm integration
CognxSafeTrack0f2f80a -
chore: stabilization, audit fixes and project synchronization
CognxSafeTrack7b0c22b
-
feat: implement bulk whatsapp campaigns with BullMQ and modular activation refactor (isCrmActive/isEdTechActive)
CognxSafeTracke286845 -
fix: stabilize speech recognition logic and ignore aborted error
CognxSafeTrack5634afc -
feat: implement real-time streaming transcription using Web Speech API
CognxSafeTrack4fd3a34 -
feat(crm): optimize multimedia pipeline and harden contact schema
CognxSafeTrack- Refactored CrmConversationalDashboard into modular components and hooks (FileImporter, useAudioRecorder) - Centralized contact normalization and bulk import in ContactService - Implemented binary streaming for media proxy to reduce memory pressure - Hardened database schema with MediaType Enum for better data integrityc5fde49 -
feat: implement inbound audio/image transcription, secure media proxy, and client-side bulk contact import
CognxSafeTrack30d60ea -
feat: implement RoleGuard for centralized authorization
CognxSafeTrack- Created reusable RoleGuard component - Refactored MainLayout to use RoleGuard for admin features - Reduced manual role checks in the UI layout803f4c5 -
style: standardize frontend imports using @/ alias
CognxSafeTrack- Updated App.tsx, MainLayout.tsx, and core pages (Dashboard, CRM) - Standardized library imports in tenant.tsx and main.tsx - Improved codebase consistency by eliminating deep relative paths1ef1cda -
refactor: extract shell and sidebar to MainLayout
CognxSafeTrack- Improved component modularity by separating layout from routing - Cleaned up App.tsx (removed unused imports and complex UI logic) - Standardized navigation and organization selection in a dedicated Layout2c400a5 -
feat: implement premium animated smart chips in CRM Dashboard chat UI
CognxSafeTrack2f133f7
-
chore: CRM stabilization sprint completion
CognxSafeTrack- Refactor: Decomposed CrmConversationalDashboard into modular components (Inbox, AIAssistant, StatsHeader) - Fix: Centralized entity resolution with EntityResolver service (API & Worker) - Fix: Strict Prisma typing, removed 'as any' casts in organization and whatsapp routes - Fix: Implemented broadcast message persistence and accurate usage quota tracking - Schema: Added MessageStatus and status field to Message model4339e77 -
fix: implement GET organization by ID route and direct password setting for new tenants
CognxSafeTracke00083b -
feat: implement conditional dashboard routing and adaptive sidebar based on organization useCase
CognxSafeTrack3a9e766 -
feat: implement 1-to-1 CRM messaging with interactive reply bar
CognxSafeTrack7eaff31 -
feat: implement inbound message tracking and CRM inbox view
CognxSafeTracke01e314 -
feat: implement WhatsApp broadcast system with BullMQ worker and rate limiting
CognxSafeTrackf000fc9 -
feat: implement AI campaign generation logic and frontend integration
CognxSafeTrack9f0410f -
feat: implement CrmConversationalDashboard with drag-and-drop import
CognxSafeTrack6e7afa2 -
feat: add organization useCase selection to modal and backend
CognxSafeTrack55a1607 -
feat: push notifications, CRM analytics, Fastify v5 upgrades, schema updates
CognxSafeTrack +1: Claude Sonnet 4.6- Add web push notification service and admin endpoints - Add CRM analytics component and conversational dashboard - Extend Contacts page with campaign management - Update AI and whatsapp routes (Fastify v5 compat, webhook fixes) - Extend Prisma schema with new models and indexes - Add CRM campaign prompt template Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b43e552
-
fix: use path alias for ContactsPage import to resolve IDE sync issues
CognxSafeTrackc3a9ec5 -
chore: touch App.tsx to trigger TS re-index and confirm build success
CognxSafeTrackedbef9a -
fix: resolve stale type definitions and cleanup unused variables
CognxSafeTrack310a6bd -
feat: complete CRM module with ContactsPage and dynamic navigation
CognxSafeTrackcc6456d -
feat: implement PaaS modularity foundation (Contact model, modular OrganizationMode, and redesigned creation modal)
CognxSafeTrack3992613 -
fix: resolve missing API_URL and refactor payment portal call
CognxSafeTrack38123ba -
fix: resolve chart dimension warnings and block default-org-id ghost calls
CognxSafeTrack0c9a5b4 -
fix: ensure JWT token is consistently injected in organization fetch calls
CognxSafeTrackef6a2b7 -
fix: resolve 401/400 errors by centralizing API client and injecting organizationId in backend
CognxSafeTrackcfeac02 -
fix: resolve frontend API export and remove node-fetch dependency
CognxSafeTrack5220c27 -
feat: finalize Embedded Signup flow and add webhook simulator
CognxSafeTrackd3a9684
-
fix: build errors on netlify and shared-types synchronization
CognxSafeTrack295ae46
-
feat: migrate to multi-tenant SaaS architecture with JWT auth and BullMQ notifications
CognxSafeTrack2ab1980
-
feat: Premium Onboarding with Meta SDK and Technical Debt resolution
CognxSafeTrack6248bf4
-
fix: robust Meta SDK initialization for admin dashboard
CognxSafeTracka46dd3a
-
ux: clear messages for tenant selection in admin dashboard
CognxSafeTrackfe40cec -
feat: B2B SaaS Multi-tenant architecture & Tech Debt Resolution
CognxSafeTracke289c5c -
feat: implement end-to-end B2B client management with Meta Embedded Signup
CognxSafeTrackddc506d
-
feat: finalize multi-tenant WhatsApp architecture for Meta Tech Provider review
CognxSafeTrack3bf9adc