Skip to content

feat: Add stream notification preferences UI - #938

Open
raymondidahor-bot wants to merge 1 commit into
ritik4ever:mainfrom
raymondidahor-bot:stream-notification
Open

feat: Add stream notification preferences UI#938
raymondidahor-bot wants to merge 1 commit into
ritik4ever:mainfrom
raymondidahor-bot:stream-notification

Conversation

@raymondidahor-bot

Copy link
Copy Markdown

Summary

This PR adds a complete notification preferences UI to the Settings page, allowing users to configure which stream events trigger notifications and through which delivery channels. Closes #746.

What's New

New Files

File Purpose
frontend/src/types/notifications.ts TypeScript types for notification events, channels, preference maps, and channel status
frontend/src/services/notifications.ts API service layer for fetching, updating, and sending test notifications (with localStorage fallback)
frontend/src/pages/Settings.tsx Full Settings page component with notification preferences grid
frontend/src/settings.css Styles for the settings page, toggle switches, preference table, channel cards, and dark mode

Modified Files

File Change
frontend/src/App.tsx Added /settings route, "Settings" nav tab, and CSS import

Features

Per-Event Notification Toggles

Toggle notifications for each stream event type:

  • Created – when a new stream is created
  • Claimed – when a recipient claims vested funds
  • Canceled – when a stream is canceled
  • Paused – when a stream is paused
  • Resumed – when a paused stream is resumed
  • Completed – when a stream reaches full vesting

Per-Channel Delivery

Each event type can be configured for three delivery channels:

  • Email – email notifications
  • Webhook – HTTP webhook callbacks
  • Browser Push – browser push notifications

Preview / Test Notifications

Each event-type + channel combination has a preview button that sends a test notification, allowing users to verify their notification setup is working correctly.

Channel Status Indicators

The top section shows the current status of each notification channel:

  • 🟢 Active channels with connection details
  • Inactive channels with "Not connected" status

Smart Persistence

  • Preferences are optimistically updated in the UI for instant feedback
  • Changes are saved to the backend via API call
  • If the backend endpoint isn't available yet, preferences are saved to localStorage as a graceful fallback
  • On API failure, the UI rolls back the toggle and shows an error toast

Dark Mode

Full dark mode support with appropriate color overrides for all new components.

Acceptance Criteria

  • Preferences saved to backend on toggle
  • Preview triggers test notification
  • Current channel status shown
  • Toggle per event type (created, claimed, canceled, paused, resumed, completed)
  • Per channel (email, webhook, browser push)
  • Preview notification button per type

Testing

  1. Navigate to the Settings tab in the nav bar
  2. Verify all 6 event types × 3 channels = 18 toggle switches are displayed
  3. Toggle a preference on/off and verify it persists on page refresh
  4. Click a preview button and verify a toast notification appears
  5. Verify channel status cards show correct connected/disconnected state
  6. Test in dark mode to verify styling

Screenshots

The settings page features a clean table layout with:

  • Channel status cards at the top
  • A preferences grid (events × channels) with toggle switches
  • Preview buttons for each combination

🤖 Generated with Codebuff
Co-Authored-By: Codebuff noreply@codebuff.com

Add a full notification preferences page to the Settings section that lets
users control which stream events trigger notifications and through which
delivery channels.

**New files:**
- `frontend/src/types/notifications.ts` – TypeScript types for notification
  events, channels, preference maps, and channel status indicators.
- `frontend/src/services/notifications.ts` – API service layer for fetching,
  updating, and sending test notifications with localStorage fallback.
- `frontend/src/pages/Settings.tsx` – Settings page component with:
  - Per-event toggles (created, claimed, canceled, paused, resumed, completed)
  - Per-channel toggles (email, webhook, browser push)
  - Channel status indicators (active/inactive with detail text)
  - Preview/test notification buttons per event-type and channel
  - Optimistic UI updates with rollback on failure
- `frontend/src/settings.css` – Styles for the settings page including toggle
  switches, preference table layout, channel status cards, and dark mode
  overrides.

**Modified files:**
- `frontend/src/App.tsx` – Added `/settings` route, Settings nav tab, and
  CSS import.

**Acceptance criteria met:**
- ✅ Preferences saved to backend on toggle (with localStorage fallback)
- ✅ Preview triggers test notification per event/channel combination
- ✅ Current channel status shown with connected/disconnected indicators
- ✅ Toggle per event type across all delivery channels
- ✅ Dark mode support

Close ritik4ever#746

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@raymondidahor-bot is attempting to deploy a commit to the ritik4ever's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@raymondidahor-bot Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f179e71-b529-4245-8b85-b96099a6564e


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

[FEATURE] Add stream notification preferences UI

1 participant