Skip to content

v0.5.5 - Pushover Notifications, BDT Currency, and Cancellation Reminders#93

Merged
bscott merged 4 commits intomainfrom
v0.5.5
Feb 2, 2026
Merged

v0.5.5 - Pushover Notifications, BDT Currency, and Cancellation Reminders#93
bscott merged 4 commits intomainfrom
v0.5.5

Conversation

@bscott
Copy link
Copy Markdown
Owner

@bscott bscott commented Feb 2, 2026

Summary

This release combines three significant features:

  1. Pushover mobile notifications (contributed by @Swe-HimelRana)
  2. BDT currency support (contributed by @Swe-HimelRana)
  3. Cancellation date email/Pushover notifications (new feature)

What's New

Pushover Notifications (#92)

  • Mobile push notifications for high-cost alerts and renewal reminders
  • Configuration UI in Settings with test connection button
  • Integration with existing notification system
  • Comprehensive test coverage (406 lines)

BDT Currency Support (#92)

  • Added Bangladeshi Taka (৳) to supported currencies
  • Updated currency dropdowns and settings

Cancellation Date Notifications (#88) ⚠️ NEEDS TESTING

  • Get notified before subscriptions end (cancelled services)
  • Email and Pushover notifications for upcoming cancellations
  • Configurable reminder days (1-30 days before cancellation)
  • Daily scheduler checks for subscriptions ending soon
  • Settings UI for preferences

🧪 Testing Needed: The cancellation reminder feature mirrors the renewal reminder system. Code structure is solid and tests pass, but needs real-world testing:

  1. Set up email/Pushover notifications in Settings
  2. Create a test subscription with a cancellation date 3-7 days out
  3. Verify notifications arrive as expected

Technical Changes

Models & Database:

  • Added CancellationReminders and CancellationReminderDays to NotificationSettings
  • Database migration for cancellation reminder tracking fields (LastCancellationReminderSent, LastCancellationReminderDate)
  • New repository method GetUpcomingCancellations()

Services:

  • New internal/service/pushover.go for Pushover integration
  • SendCancellationReminder() methods in email and pushover services
  • Cancellation reminder scheduler in main.go (runs 30s after startup, then daily)

API & UI:

  • Settings handlers for cancellation preferences (/api/settings/notifications/cancellation)
  • Settings UI with toggle and days input (matches renewal reminders design)

Test Plan

  • Code compiles
  • All existing tests pass
  • Pushover tests pass (10 tests)
  • API endpoints work (toggle, update days)
  • Settings persist correctly
  • Server starts without errors
  • Manual testing needed: Verify cancellation scheduler runs when enabled
  • Manual testing needed: Verify notifications sent with real subscription data

Contributors

Special thanks to @Swe-HimelRana for the excellent Pushover and BDT currency contributions!

Closes #88
Closes #92

Swe-HimelRana and others added 3 commits January 26, 2026 23:56
- 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
@claude
Copy link
Copy Markdown

claude Bot commented Feb 2, 2026

Code Review

Found 2 issues that need attention:

Issue 1: Missing template variables in Settings handler

Location: internal/handlers/subscription.go:412-429

The Settings handler renders settings.html but does not pass CancellationReminders or CancellationReminderDays in the gin.H map. The template references these at lines 467-468 and 479.

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:

c.HTML(http.StatusOK, "settings.html", gin.H{
"Title": "Settings",
"CurrentPage": "settings",
"Currency": h.settingsService.GetCurrency(),
"CurrencySymbol": h.settingsService.GetCurrencySymbol(),
"RenewalReminders": h.settingsService.GetBoolSettingWithDefault("renewal_reminders", false),
"HighCostAlerts": h.settingsService.GetBoolSettingWithDefault("high_cost_alerts", true),
"PushoverConfig": pushoverConfig,
"PushoverConfigured": pushoverConfigured,
"HighCostThreshold": h.settingsService.GetFloatSettingWithDefault("high_cost_threshold", 50.0),
"ReminderDays": h.settingsService.GetIntSettingWithDefault("reminder_days", 7),
"DarkMode": h.settingsService.IsDarkModeEnabled(),
"Version": version.GetVersion(),
"SMTPConfig": smtpConfig,
"SMTPConfigured": smtpConfigured,
"AuthEnabled": authEnabled,
"AuthUsername": authUsername,
})
}


Issue 2: TestPushoverConnection persists test credentials

Location: internal/handlers/settings.go:562-567

The TestPushoverConnection handler saves test credentials to the database but only restores the original config if originalConfig != nil. When no Pushover config previously exists, the test credentials remain permanently in the database even if the test fails.

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:

// Temporarily save config for testing
originalConfig, _ := h.service.GetPushoverConfig()
defer func() {
if originalConfig != nil {
h.service.SavePushoverConfig(originalConfig)
}
}()

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
@bscott bscott merged commit a12e2e2 into main Feb 2, 2026
2 checks passed
@bscott bscott deleted the v0.5.5 branch February 2, 2026 03:21
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.

Email Notifications only on Cancellation Date

2 participants