Skip to content

feat: add notifications & alert system for long-running tasks (closes…#430

Open
sudha09-git wants to merge 2 commits into
utksh1:mainfrom
sudha09-git:feat/337-notifications-alert-system
Open

feat: add notifications & alert system for long-running tasks (closes…#430
sudha09-git wants to merge 2 commits into
utksh1:mainfrom
sudha09-git:feat/337-notifications-alert-system

Conversation

@sudha09-git
Copy link
Copy Markdown

v## Summary
Implements a full notifications and alert system for SecuScan.
Closes #337


Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup

Changes Made

  • Added NotificationContext.tsx with NotificationProvider and useNotifications hook
  • Added NotificationBell component with unread badge counter in sidebar and mobile header
  • Notification dropdown panel with read/unread states, timestamps, and type icons
  • Actions: mark as read, mark all as read, remove single, clear all
  • Browser Web Notifications API integration with graceful permission handling
  • Persists up to 50 notifications in memory
  • Matches existing SecuScan brutalist UI design system

How to Test

  1. Open the app — bell icon appears in sidebar (desktop) and top bar (mobile)
  2. Trigger any scan/task — call addNotification() from useNotifications
  3. Unread badge appears on bell icon
  4. Click bell to open dropdown panel
  5. Click notification to mark as read
  6. Use "Mark all read" / "Clear all" actions
  7. Browser notification appears if permission granted

Checklist

  • Linked issue in summary
  • Build passes (npm run build)
  • Self-reviewed the diff
  • Matches existing UI patterns

…tksh1#337)

- Add NotificationContext with useNotifications hook
- Add NotificationBell component with unread badge counter
- Add notification dropdown panel with read/unread states
- Support mark as read, mark all as read, clear all actions
- Integrate browser Web Notifications API with permission handling
- Add bell icon to desktop sidebar and mobile header
- Persist up to 50 notifications with timestamps
- Match existing SecuScan brutalist UI design system
@sudha09-git
Copy link
Copy Markdown
Author

/as all the ci are passed so kindly merge this PR

@utksh1 utksh1 added level:advanced 55 pts difficulty label for advanced contributor PRs type:feature Feature work category bonus label area:frontend Frontend React/UI work area:backend Backend API, database, or service work labels May 31, 2026
Copy link
Copy Markdown
Owner

@utksh1 utksh1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the notification UI work. This currently adds a local notification center, but it is not wired to long-running task events or backend/task status changes, so it does not actually implement alerts for long-running tasks. It also requests browser notification permission on mount, before user intent. Please connect it to real task-duration/status signals and request browser permission from an explicit user action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend Backend API, database, or service work area:frontend Frontend React/UI work level:advanced 55 pts difficulty label for advanced contributor PRs type:feature Feature work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] [FEATURE] Add Notifications & Alert System for Long-Running Tasks

2 participants