feat(notifications): add subscription preferences per notification type #22

Closed
Gravity Bot wants to merge 0 commits from feature/166-notification-subscriptions into release/v0.3.1
Contributor

Summary

  • Add notification_preferences table (migration 00012) for per-type email subscription settings
  • Add NotificationPreference model and service CRUD methods (list/upsert)
  • Add subscription settings UI on the Notifications page with per-type email toggles
  • Email toggles only visible when SMTP is configured by the admin
  • POST handler saves preferences via upsert

Changes

  • internal/database/migrations/00012_notification_preferences.sql — new table
  • internal/models/models.goNotificationPreference struct
  • internal/services/sharing.goListNotificationPreferences, SaveNotificationPreference
  • internal/handlers/settings.go — updated Notifications handler, new NotificationPrefsUpdate
  • cmd/gashy/main.go — route POST to NotificationPrefsUpdate
  • components/partials/user_dashboards.templNotificationsPageFull template with subscription settings

Closes OP#166

## Summary - Add `notification_preferences` table (migration 00012) for per-type email subscription settings - Add `NotificationPreference` model and service CRUD methods (list/upsert) - Add subscription settings UI on the Notifications page with per-type email toggles - Email toggles only visible when SMTP is configured by the admin - POST handler saves preferences via upsert ## Changes - `internal/database/migrations/00012_notification_preferences.sql` — new table - `internal/models/models.go` — `NotificationPreference` struct - `internal/services/sharing.go` — `ListNotificationPreferences`, `SaveNotificationPreference` - `internal/handlers/settings.go` — updated `Notifications` handler, new `NotificationPrefsUpdate` - `cmd/gashy/main.go` — route POST to `NotificationPrefsUpdate` - `components/partials/user_dashboards.templ` — `NotificationsPageFull` template with subscription settings Closes OP#166
refactor: rename invites to notifications
All checks were successful
CI / lint (pull_request) Successful in 1m37s
CI / security (pull_request) Successful in 1m53s
CI / build (pull_request) Successful in 1m57s
CI / test (pull_request) Successful in 2m10s
0162b51642
Rename all "invites" references to "notifications" throughout:
- DB migration: dashboard_invites table → notifications
- Models: DashboardInvite → Notification, InviteView → NotificationView
- Services: SendInvite → SendNotification, etc.
- Handlers: Invites → Notifications, RespondInvite → RespondNotification
- Routes: /invites → /notifications (with legacy redirects)
- Templates: updated sidebar label, icons, and component names
- Tests: updated route assertions

Closes OP#211

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(notifications): extend notification system with multiple types
All checks were successful
CI / security (pull_request) Successful in 1m7s
CI / build (pull_request) Successful in 2m1s
CI / test (pull_request) Successful in 2m13s
CI / lint (pull_request) Successful in 2m47s
58e2249469
Add notification types (invite, dashboard_shared, dashboard_updated,
system) with type-specific icons/colors, read/unread tracking, and
generic notification creation. Update notifications page with
type-aware rendering, unread indicators, and status badges.

New service methods: CreateNotification, ListNotifications,
UnreadNotificationCount, MarkNotificationRead, MarkAllNotificationsRead.

Closes OP#824

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(notifications): add bell icon with unread badge in navbar
All checks were successful
CI / security (pull_request) Successful in 2m3s
CI / build (pull_request) Successful in 2m11s
CI / test (pull_request) Successful in 2m24s
CI / lint (pull_request) Successful in 2m54s
74ae2940b5
Show notification bell between edit toggle and user dropdown. Red badge
displays unread count, hidden when 0. Links to notifications settings
page. Count queried via UnreadNotificationCount service method.

Closes OP#825

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(notifications): add subscription preferences per notification type
All checks were successful
CI / lint (pull_request) Successful in 1m30s
CI / security (pull_request) Successful in 1m50s
CI / build (pull_request) Successful in 1m53s
CI / test (pull_request) Successful in 2m7s
993a267222
Add notification_preferences table and UI for users to control email
notifications per type (invite, shared, updated, system). Email toggles
are only shown when SMTP is configured by the admin.

Closes OP#166

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gravity Bot closed this pull request 2026-02-17 21:20:21 +00:00
All checks were successful
CI / lint (pull_request) Successful in 1m30s
CI / security (pull_request) Successful in 1m50s
CI / build (pull_request) Successful in 1m53s
CI / test (pull_request) Successful in 2m7s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mike/gashy!22
No description provided.