From e64654c8203efbffc041d7cdb9ca93842160a63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Fri, 29 May 2026 14:34:40 -0300 Subject: [PATCH] Replace notifications with activity feed --- CONTEXT.md | 8 +- backend/index.js | 81 ++------------ backend/routes/activityRoutes.js | 30 +++++ backend/routes/authRoutes.js | 23 ++-- backend/routes/tenantsRoutes.js | 12 +- backend/routes/usersRoutes.js | 21 ++-- backend/services/activityService.js | 14 +++ src/assets/audio/notification.mp3 | Bin 16128 -> 0 bytes src/components/Layout.tsx | 158 ++++++--------------------- src/pages/UserProfile.tsx | 28 +---- src/services/activityService.ts | 23 ++++ src/services/dataService.ts | 2 +- src/services/notificationsService.ts | 66 ----------- src/types.ts | 1 - 14 files changed, 154 insertions(+), 313 deletions(-) create mode 100644 backend/routes/activityRoutes.js create mode 100644 backend/services/activityService.js delete mode 100644 src/assets/audio/notification.mp3 create mode 100644 src/services/activityService.ts delete mode 100644 src/services/notificationsService.ts diff --git a/CONTEXT.md b/CONTEXT.md index af37a0c..468ccb5 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -28,16 +28,16 @@ We have transitioned from a mock-based prototype to a **secure, multi-tenant pro - Super Admins can generate persistent `api_keys` for specific tenants. - `GET /api/integration/users`, `/funnels`, and `/origins` allow the n8n AI to dynamically map the tenant's actual agents and workflow stages before processing a chat. - `POST /api/integration/attendances` accepts the AI's final JSON payload (including the `full_summary` text) and injects it directly into the dashboard. -- **Real-Time Notification System:** - - Built a persistent notification tray (`/api/notifications`) with real-time polling (10s intervals) and a hidden HTML5 `