Conversation
- Add Pushover notification service for mobile push notifications - Support for high-cost alerts and renewal reminders - Configuration UI in Settings with test connection - Integration with existing notification settings - Add BDT (Bangladeshi Taka) currency support - Add BDT to supported currencies list - Add ৳ symbol mapping in settings service - Update subscription form currency dropdown - Update settings currency selection - Update documentation - Add Pushover setup instructions to README - Update AGENTS.md with new features and implementation details
- Add CancellationReminders and CancellationReminderDays to NotificationSettings - Add LastCancellationReminderSent/Date tracking fields to Subscription - Add database migration for cancellation reminder columns - Add GetUpcomingCancellations() repository method Part of #88 - Email notifications on cancellation date
Part 2: Service methods, scheduler, and UI - Add SendCancellationReminder() to EmailService and PushoverService - Add cancellation reminder scheduler in main.go - Add cancellation_reminders and cancellation_reminder_days settings handlers - Add cancellation reminder UI to settings page Implements GitHub issue #88
Code ReviewFound 2 issues that need attention: Issue 1: Missing template variables in Settings handlerLocation: internal/handlers/subscription.go:412-429 The Settings handler renders settings.html but does not pass Impact: The cancellation reminders toggle will always appear disabled (off) and the days field will show 0 or blank, regardless of actual settings. Users cannot see or manage their cancellation reminder preferences through the UI. Fix: Add these two entries to the gin.H map at line 412: "CancellationReminders": h.settingsService.GetBoolSettingWithDefault("cancellation_reminders", false),
"CancellationReminderDays": h.settingsService.GetIntSettingWithDefault("cancellation_reminder_days", 7),Reference: subtrackr/internal/handlers/subscription.go Lines 411 to 430 in cff307f Issue 2: TestPushoverConnection persists test credentialsLocation: internal/handlers/settings.go:562-567 The TestPushoverConnection handler saves test credentials to the database but only restores the original config if Impact: Clicking "Test Connection" without clicking "Save" will silently persist credentials. Invalid test credentials remain saved and will be used by the background scheduler, causing all Pushover notifications to fail silently. Fix: Either delete the config when originalConfig is nil, or avoid saving test credentials to the database entirely. Example: defer func() {
if originalConfig != nil {
h.service.SavePushoverConfig(originalConfig)
} else {
// Delete test config since there was no original
h.service.DeletePushoverConfig()
}
}()Reference: subtrackr/internal/handlers/settings.go Lines 561 to 568 in cff307f |
Issue 1: Add missing template variables for cancellation reminders - Add CancellationReminders and CancellationReminderDays to settings template - Fixes UI not displaying cancellation reminder preferences Issue 2: Fix TestPushoverConnection credential cleanup - Clean up test credentials when no original config exists - Prevents test credentials from persisting permanently
Summary
This release combines three significant features:
What's New
Pushover Notifications (#92)
BDT Currency Support (#92)
Cancellation Date Notifications (#88)⚠️ NEEDS TESTING
🧪 Testing Needed: The cancellation reminder feature mirrors the renewal reminder system. Code structure is solid and tests pass, but needs real-world testing:
Technical Changes
Models & Database:
CancellationRemindersandCancellationReminderDaysto NotificationSettingsLastCancellationReminderSent,LastCancellationReminderDate)GetUpcomingCancellations()Services:
internal/service/pushover.gofor Pushover integrationSendCancellationReminder()methods in email and pushover servicesAPI & UI:
/api/settings/notifications/cancellation)Test Plan
Contributors
Special thanks to @Swe-HimelRana for the excellent Pushover and BDT currency contributions!
Closes #88
Closes #92