Feature: Notification Center & Alerts#13
Feature: Notification Center & Alerts#13google-labs-jules[bot] wants to merge 4 commits intomainfrom
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Added `notifications` collection and API routes (GET, PATCH, DELETE). - Implemented `milestoneService` to track watch time and trigger alerts every 100 hours. - Implemented `cronService` with `node-cron` to check for daily TV premieres. - Added `useNotificationStore` (Zustand) and real-time sync with Socket.IO. - Updated Frontend UI with a Notification Center modal and unread badge. - Verified with unit tests and Playwright.
…alerts - Added `notifications` collection with TTL index for auto-cleanup. - Implemented `milestoneService` with incremental watch time updates (performance optimization). - Implemented `cronService` with cached, batched, and duplicate-proof TMDB checks (performance optimization). - Added `useNotificationStore` (Zustand) and real-time sync with Socket.IO. - Updated Frontend UI with a Notification Center modal and unread badge. - Verified with unit tests and Playwright.
b4f0d10 to
ce179e5
Compare
- Replaces memory-heavy aggregation with streaming cursors - Fixes race conditions in milestone tracking using atomic updates - Adds cron resilience with startup checks and multi-run schedule
Implemented a comprehensive notification system for SceneStack.
Backend Changes:
notificationsto store user alerts./api/notificationsendpoints.milestoneService.js: Calculates total watch time on every watchlist update. Triggers a "Milestone Reached" notification every 100 hours.cronService.js: A daily cron job (running at 12:00 PM) that checks TMDB for new seasons/episodes of shows currently being watched.watchlistRoutes(for milestones) andserver.js(for cron and routes).Frontend Changes:
useNotificationStoreto manage state and real-time updates.NotificationsModalwith a list of notifications and actions (mark as read, delete).HeaderandSideNavBarto display a "pinging" badge when unread notifications exist.dbServiceandsocketServiceto handle notification data.Verification:
PR created automatically by Jules for task 9999344041690900380 started by @Alameen1433