Commit History
-
chore: add api/worker docker-compose services and route validation tests
CognxSafeTrack- docker-compose.yml: add `api` (port 7860) and `whatsapp-worker` (port 8082) services with healthchecks on postgres/redis, SERVICES env var to select PM2 process, and RAILWAY_INTERNAL_URL wired between containers - test/routes.test.ts: 31 tests covering campaign schema validation (send, broadcast, generate), analytics SQL injection pattern guard, and auth route unauthenticated access — all pure logic, no DB required862b2b1 -
feat(settings): expose branding logoUrl and primaryColor fields
CognxSafeTrackAdds a Branding section to SettingsPage that reads/writes org.brandingData.logoUrl and org.brandingData.primaryColor. Includes a live logo preview and a color picker + hex input. test(security): add 15 SQL injection and auth tests Pure unit checks for the DANGEROUS_PATTERNS set used in the text-to-SQL guard (UNION, DELETE, DROP, comments, stacked queries). Integration auth checks for super-admin JWT enforcement.ec1b111
-
feat: gold standards tests (15 days + STT + vision) & botName editable in AI setup
CognxSafeTrack +1: Claude Sonnet 4.6- ai-gold-standards: 40 test cases covering all 15 lesson days, STT smoke, vision (day 11 imageUrl), CRM broadcast/conversation, curriculum (FR+EN), pitch deck EN, business profile extraction days 1-6 with quality assertions - AIAgentSetup: botName field now editable (was hardcoded 'Agent IA'); loaded from personality API on mount, saved with PATCH; falls back to 'Agent IA' if blank - i18n: add bot_name_label/placeholder/hint keys to FR, EN, ES, PT locales Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1c602ea
-
feat(billing): complete billing system, push notifications, and tech debt fixes
CognxSafeTrack +1: Claude Sonnet 4.6- Usage tracking: instrument pedagogy, audio transcription, AI Agent mode (was silently untracked) - EmailHandler: implement templates 2 (password reset), 3 (quota alert), 4 (monthly report) - Quota alert: auto-queue email + push at 85% threshold via maybeQueueQuotaAlert - Push notifications: PushHandler + send-push BullMQ job; sendPushToUser scoped by organizationId to prevent cross-tenant reads - BillingPage: add credit recharge modal with 3 packs, null guard for missing orgId - i18n: add nav.billing key in fr/en/es/pt locales - Tests: billing.test.ts (10 tests), payments.test.ts (13 tests) - Tech debt: fix empty catch blocks in ai-pedagogy.ts, exclude usage tokens from CRM API response, pass organizationId to generateChat in AIAgentHandler - Docs: add backlog and business model to docs/business/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>8280d7d
-
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: stabilization, audit fixes and project synchronization
CognxSafeTrack7b0c22b
-
fix: correct StripeService constructor call in tests
CognxSafeTrack9da8695 -
feat: complete final technical debt polishing (structured logs, stripe tests, and automated migrations)
CognxSafeTrack86731f4 -
fix: resolve test import errors and export AIService class
CognxSafeTrack459f379 -
chore: optimize Dockerfile and PM2 config for independent scaling and better performance
CognxSafeTrack34c79d1 -
chore: implement Phase 3 initial setup (TypeScript cleanup and health test)
CognxSafeTrackdf5c8fa
-
Chore: Added AI regression test framework and enhanced Mock provider
CognxSafeTrackd95a6d7