Skip to content

feat: notify token holders before governance voting deadline closes#1012

Open
sammajayi wants to merge 1 commit into
bakeronchain:mainfrom
sammajayi:feat/voting-deadline-reminders
Open

feat: notify token holders before governance voting deadline closes#1012
sammajayi wants to merge 1 commit into
bakeronchain:mainfrom
sammajayi:feat/voting-deadline-reminders

Conversation

@sammajayi

Copy link
Copy Markdown
Contributor

Summary

Add a scheduled worker that scans proposals approaching their deadline and sends reminders to governance participants who haven't voted yet.

What's included

  • Migration 024: adds deadline_reminder_level to proposals and voting_deadline_reminder / email_voting_deadline_reminder to notification_preferences
  • deadline-reminder.service.ts: core logic to find non-voters and send in-app/push/email notifications at 24h and 1h thresholds
  • deadline-reminder-worker.ts: setInterval worker (default 30min, configurable via DEADLINE_REMINDER_INTERVAL_MS)
  • ProposalCountdown: enhanced with urgent pulsing red style for <1h remaining
  • Notification preferences UI: added "Voting deadline approaching" toggle
  • Email template: new voting-deadline-reminder template

How it works

  1. Worker polls every 30 minutes for proposals with deadlines approaching
  2. At 24h before deadline: sends level-1 reminder to all governance participants (addresses from votes + proposal authors) who haven't voted
  3. At 1h before deadline: sends level-2 reminder with urgent styling
  4. deadline_reminder_level tracks what's been sent per proposal — no duplicate notifications
  5. Users see notifications in the NotificationBell dropdown and can toggle the event type in Settings

Closes #1002

Add a scheduled worker that scans proposals approaching their deadline
and sends reminders to governance participants who haven't voted yet.

- New migration 024: adds deadline_reminder_level to proposals and
  voting_deadline_reminder preference to notification_preferences
- deadline-reminder.service.ts: core logic to find non-voters and send
  in-app/push/email notifications at 24h and 1h thresholds
- deadline-reminder-worker.ts: setInterval worker (default 30min, configurable)
- Enhanced ProposalCountdown with urgent pulsing red style for <1h
- Added voting_deadline_reminder to notification preferences UI

Closes bakeronchain#1002
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.

feat: notify token holders before a governance proposal's voting deadline closes

1 participant