Commit History
-
fix(admin): replace vague Meta hints with direct clickable links in Direct Setup modal
CognxSafeTrack- WABA ID → business.facebook.com/settings/whatsapp-business-accounts - Meta Business ID → business.facebook.com/settings/info - Token → business.facebook.com/settings/system-users (new hint added) - Updated i18n labels in en/fr/pt295c327 -
feat(admin): add Direct Setup button for super admins on orgs without phone number
CognxSafeTrack- Add "Direct Setup" button (super admin only) on /clients for orgs without a WhatsApp number - Previously the setup modal was only reachable via the Reconfigure button (orgs with a phone) - Add i18n keys: clients.actions.direct_setup (en/fr/pt) - Add scratch scripts for org configuration and DB queries - Add doc: configurer-token-nouvelle-org.md — how to configure a Meta token on a new orga3df350 -
feat(i18n): complete super-admin i18n — all 11 pages fully translated
CognxSafeTrackAll 11 super-admin pages now use useTranslation for every visible string. Adds rel_today/rel_yesterday/rel_days_ago keys for WhatsAppProfiles relativeDate, tpl_cat_*_desc keys for template category descriptions, and fixes the SuperAdminLayout NAV_ITEMS destructuring (labelKey vs label).b92ea37 -
feat(i18n): complete admin app internationalization across all pages
CognxSafeTrackReplace all hardcoded French strings with t() calls on 14 pages and sync 130+ new keys across fr/en/pt locale files. Language switching now works everywhere in the admin interface. Pages covered: TrackDaysPage, TrackFormPage, TrackListPage, UserListPage, KnowledgeBasePage, SettingsPage, AnalyticsPage, AIAgentSetup, OnboardingWizard, ResetPasswordPage, ClientsManagementView, ContactsPage, TemplatesPage, TrainingLab.d80fec4
-
fix: restore Limite Quotidienne and complete admin i18n
CognxSafeTrackFix messaging_limit_tier disappearing in /clients page: - fetchMetaStatus was querying WhatsAppPhoneNumber separately, which is tenant-filtered by Prisma extension — returns null when called from another org's JWT context (super-admin viewing all orgs) - Fix: include phoneNumbers in the Organization query (excluded from tenant filtering) and use org.phoneNumbers[0].id directly i18n — pages fully translated (fr/en/pt): - LoginPage: org ID, email, password, subtitles, button, footer - ResetPasswordPage: all 4 states (request/sent/new/success) - BillingPage: 62 keys — wallet, transactions, chart, AI assistant, credit packs, QUICK_QUESTIONS, TX_LABELS, FEATURE_LABELS - ClientsManagementView (/clients): 20 key groups — status badges, WABA labels, tier/quality info, all modals (billing, credits, create org, personality, WA setup), validation errors, toasts Fix TemplatesPage status badges showing raw key strings: - Add 5 missing keys to all 3 locale files: status_approved, sta…4f90920 -
fix(audit): resolve remaining minor technical debt issues
CognxSafeTrack +1: Claude Sonnet 4.6AI/BYOK: - generateText now respects tenant BYOK keys via getProvidersForTenant() (was using global registry) - generateText now applies exponential backoff retry via AIService.withRetry() Backend: - notifications.ts: return 503 instead of 200+undefined when VAPID_PUBLIC_KEY absent - BillingPage: support WA number now reads from VITE_SUPPORT_WA_NUMBER env var (was hardcoded fake number) - KnowledgeBasePage: show toast.error on delete failure (was silently swallowed) DB: - Add @@index([organizationId, exerciseStatus]) on UserProgress for live-feed query performance - Add @@index([createdAt]) on AuditLog for time-range admin queries - Migration 20260513000005 applied to production DB i18n: - Add knowledge.delete_error translation key to all 4 locales (fr, en, es, pt) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>d74c1b3
-
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(admin): UX non-tech complète + i18n 4 langues
CognxSafeTrack +1: Claude Sonnet 4.6- Phases 1-5 : masquage JSON avancé, chat IA global (AdminChat), onboarding WhatsApp guidé, templates assistés IA, agent IA setup guidé - i18n exhaustif : ~70 nouvelles clés en FR/EN/ES/PT pour tous les composants ajoutés (AdminChat, AIAgentSetup, SettingsPage, TemplatesPage, OnboardingWizard) - Chat IA multilingue : l'assistant répond désormais dans la langue de l'utilisateur (FR/EN/ES/PT) sur toutes les pages Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>66ff7a1
-
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
-
fix(admin): sidebar active states, responsive mobile drawer, correct nav labels
CognxSafeTrack +1: Claude Sonnet 4.6- NavLink with isActive for proper active highlight (bg-white/15) - end={true} on home so "/" doesn't match all child routes - Added /conversations and /ai-setup to nav; fixed /kb and /content labels - Scrollable nav (overflow-y-auto) so it never clips on small screens - Desktop: sticky h-screen sidebar (hidden lg:flex) - Mobile: hamburger in sticky top bar + translate-x drawer + backdrop overlay - Better avatar initial fallback (name → email → 'U') - Shared sidebarInner JSX var avoids duplicate markup - Added nav.kb / nav.content / nav.conversations / nav.ai_setup keys to all 4 locales Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>785cec2
-
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 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
-
feat: implement whatsapp templates management with security hardening, audit logs, and crm integration
CognxSafeTrack0f2f80a