Skip to content

Feat/438 notification preferences toggle groups, send gate, and one click unsubscribe - #139

Merged
RamRamez merged 7 commits into
stagingfrom
feat/438-Notification-preferences--toggle-groups,-send-gate,-and-one-click-unsubscribe
Aug 29, 2026
Merged

RamRamez merged 7 commits into
stagingfrom
feat/438-Notification-preferences--toggle-groups,-send-gate,-and-one-click-unsubscribe

Conversation

@RamRamez

@RamRamez RamRamez commented Aug 29, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added email notifications when users become eligible for GIVbacks.
    • Added supporter notifications when a project publishes a new update, including the update title and project details.
    • Added tracking for GIVbacks eligibility separately from standard project verification.
  • Improvements

    • Project update notifications are now enabled by default and can be managed through email notification settings.
    • Expanded notification data validation for more consistent project and update information.

This migration introduces two new notification types for event-triggered emails in the v6 system: a GIVbacks-eligible badge type and an emailable supporters-update type. The GIVbacks-eligible badge type allows users to receive distinct notifications for their project's GIVbacks eligibility, while the supporters-update type enables users to control email notifications for project updates. The migration also updates existing user settings to ensure proper notification delivery and user preferences are respected. The down method reverts these changes if necessary.
This update introduces a new notification type, GIVBACKS_ELIGIBILITY_GRANTED, to the notification schema. This addition aligns with the ongoing enhancements for GIVbacks-related notifications, ensuring users are informed about their eligibility status. The change is part of the broader effort to improve user engagement and notification accuracy.
This update introduces a new notification case for when a project supported by a user posts an update, ensuring that supporters receive relevant information. Additionally, it clarifies the distinction between GIVbacks eligibility and project verification by introducing a separate `verified-status` attribute for GIVbacks notifications. These changes enhance user engagement and improve the accuracy of notifications related to project activities.
This commit introduces the GIVBACKS_ELIGIBILITY_GRANTED notification type to the general types schema. This change clarifies the distinction between project verification and GIVbacks eligibility, enhancing the notification system to better inform users about their eligibility status. This update is part of ongoing improvements to user engagement and notification accuracy.
This update adds the mapping for the new GIVBACKS_ELIGIBILITY_GRANTED notification type to the Ortto event names, ensuring it is properly integrated into the project-verification activity. This change enhances the notification system by allowing users to receive relevant updates regarding their GIVbacks eligibility status, further improving user engagement and notification accuracy.
This update introduces a new segment validation for the GIVbacks eligibility granted notification type, ensuring it aligns with the existing project-related tracker schema. Additionally, it modifies the project update notification to include a segment, enhancing the notification system's accuracy and user engagement.
This update introduces comprehensive tests for the new v6 event-triggered email notifications, including GIVbacks eligibility and project update notifications. It ensures that the activity creator functions correctly for various notification types and validates the associated segment schemas, enhancing the reliability and accuracy of the notification system.
@RamRamez
RamRamez merged commit 0b4b7aa into staging Aug 29, 2026
1 of 2 checks passed
@RamRamez
RamRamez deleted the feat/438-Notification-preferences--toggle-groups,-send-gate,-and-one-click-unsubscribe branch August 29, 2026 18:38
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 72f60d05-9864-48e3-b47d-fd0164f348f6

📥 Commits

Reviewing files that changed from the base of the PR and between a9fc4c6 and 1eb286d.

📒 Files selected for processing (7)
  • migrations/1756000000000-v6EventTriggeredEmails.ts
  • src/entities/notificationType.ts
  • src/services/notificationService.test.ts
  • src/services/notificationService.ts
  • src/types/general.ts
  • src/types/notifications.ts
  • src/utils/validators/segmentAndMetadataValidators.ts

Walkthrough

Adds GIVbacks eligibility and supporter project update email events. It adds notification contracts, Ortto activity mappings, segment validators, tests, and a migration for notification types and user settings.

Changes

V6 event-triggered emails

Layer / File(s) Summary
Notification contracts and validators
src/types/general.ts, src/types/notifications.ts, src/entities/notificationType.ts, src/utils/validators/segmentAndMetadataValidators.ts
Adds the GIVbacks eligibility notification identifiers, Ortto activity mapping, validator name, and project payload validators. Adds project payload validation for supporter update notifications.
Activity creation and coverage
src/services/notificationService.ts, src/services/notificationService.test.ts
Creates Ortto activities for GIVbacks eligibility and supporter project updates. Tests the new activities, payload attributes, validators, and nine existing events.
Notification settings migration
migrations/1756000000000-v6EventTriggeredEmails.ts
Creates the GIVbacks eligibility notification type and user settings. Enables email defaults for project updates. The rollback restores seeded project update flags but does not restore prior per-user values.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant NotificationEvent
  participant activityCreator
  participant OrttoActivity
  participant SegmentValidator
  NotificationEvent->>activityCreator: Send event and payload
  activityCreator->>OrttoActivity: Create mapped activity attributes
  activityCreator->>SegmentValidator: Resolve and validate segment payload
  SegmentValidator-->>activityCreator: Return validation result
Loading

Suggested reviewers: ae2079

Poem

A rabbit hops through settings bright

And maps new badges into flight
Project updates bloom with cheer
Validators guard each payload near
Emails thump: the path is clear

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/438-Notification-preferences--toggle-groups,-send-gate,-and-one-click-unsubscribe

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.

1 participant