Skip to content

feat(settings): build notification preferences page with validation and persistence - #220

Merged
mijinummi merged 1 commit into
MD-Creative-Production:mainfrom
SharifIbrahimDev:notifications-preferences-issue-105
Aug 20, 2026
Merged

feat(settings): build notification preferences page with validation and persistence#220
mijinummi merged 1 commit into
MD-Creative-Production:mainfrom
SharifIbrahimDev:notifications-preferences-issue-105

Conversation

@SharifIbrahimDev

Copy link
Copy Markdown

Summary

This PR implements the Notification Preferences Page inside apps/web/app/settings/notifications/, enabling users to configure alert delivery preferences across Discord, Telegram, and Webhook channels.

Closes #105

Key Changes

  1. Created Notification Preferences Page (page.tsx):
    • Toggles to enable/disable Discord, Telegram, and Webhook alerts.
    • Form fields for Discord (Webhook URL), Telegram (Bot Token, Chat ID), and Custom Webhooks (Endpoint URL, Signing Secret).
    • Client-side validation:
      • Discord Webhook URL matches standard Discord api webhook structures.
      • Telegram Bot Token matches \d+:[A-Za-z0-9_-]{35} format.
      • Telegram Chat ID is a valid integer.
      • Webhook URL has a valid URL format with HTTP/HTTPS protocols.
      • Webhook Signing Secret is non-empty and at least 8 characters.
    • LocalStorage persistence saving preferences and showing success alerts or input-level error messages.
  2. Custom Styles (notifications.css):
    • Modern cards, toggles, success status boxes, and input styles consistent with the overall Sentinel design system.
  3. Navigation Integration (SettingsNav.tsx):
    • Added a link to the Notifications preferences page.
  4. Comprehensive Unit Tests (page.spec.tsx):
    • Asserts initial state, interactive toggling visibility, form submission errors on invalid input, and successful persistence to localStorage.

Verification

  • Linting & Formatting: Verified clean run with npm run format:check and npm run lint specifically on modified files.
  • Unit Tests: Executed all frontend tests with npm run test:dashboard. All 10 suites (94 test cases) passed successfully.

@mijinummi

Copy link
Copy Markdown
Collaborator

LGTM

@mijinummi
mijinummi merged commit 0005d3d into MD-Creative-Production:main Aug 20, 2026
12 checks passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Aug 20, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build Notification Preferences Page

2 participants