feat: notification digest batching, creators search, postgres backup drill, rate-limit tests - #795
Merged
Conversation
- feat(notifications): digest batching to reduce noise (#740) - Add digest_count / digest_event_times columns + migration - foldIntoDigest / openDigestWindow in NotificationsService - Frontend badge + detail panel for batched notifications - feat(creators): search by handle/display name (#731) - Fix broken searchCreators (dead code, missing q filter, wrong pagination) - Add LOWER LIKE prefix match on display_name and username - Add PaginatedResponseDto total/page/totalPages fields - Frontend API client + DiscoverContent wired to real API - ops(postgres): backup/restore drill (#730) - scripts/pg-backup-restore.sh (backup | restore | drill subcommands) - docs/POSTGRES_BACKUP_RESTORE.md runbook - CI db-backup-drill job in .github/workflows/ci.yml - test(rate-limit): throttler guard integration tests (#728) - backend/test/rate-limit.e2e-spec.ts covering 429, health exemption, Retry-After header, and 429 response shape - Fix missing auth throttle tier in app.module.ts ThrottlerModule.forRoot
|
@kelly-musk Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
aji70
added a commit
that referenced
this pull request
Apr 30, 2026
feat: notification digest batching, creators search, postgres backup drill, rate-limit tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #740, #731, #730, #728
#740 — Notification digest batching
Reduces noise by collapsing repeated same-type events within a 5-minute window into a single notification instead of creating one per event.
Backend
NotificationsService: addedfoldIntoDigest/openDigestWindow— second enqueue within the window updates the existing notification's count/title/body in-placebuildSubscriptionLifecycleTemplateacceptsdigestCountand returns plural titles ("3 subscriptions renewed")Notificationentity: newdigest_count(int, default 1) anddigest_event_times(jsonb) columns1745100000000-AddDigestColumnsToNotificationsFrontend
NotificationItem: count pill badge whendigest_count > 1NotificationDetail: "N events batched" section with individual timestampsTests
#731 — Creators search by handle/display name
Backend
searchCreators(dead code after earlyreturn, noqfilter applied, wrong pagination shape)LOWER(display_name) LIKE :search OR LOWER(username) LIKE :searchprefix matchskip/takepagination, ordered byusername ASCPaginatedResponseDtoextended withtotal,page,totalPagesfieldsFrontend
frontend/src/lib/api/creators.ts—searchCreators({ q?, page?, limit? })DiscoverContentcalls real API whenNEXT_PUBLIC_USE_CREATORS_API=true, falls back to mock otherwiseTests
creators.service.spec.tstests now pass (they were written against the intended behavior)#730 — Postgres backup / restore drill
scripts/pg-backup-restore.sh:backup,restore, anddrillsubcommandsdrill: backup → restore into temp DB → row-count verification → auto-cleanupPGPASSWORD(never on CLI)docs/POSTGRES_BACKUP_RESTORE.md: runbook with pre-deploy checklist, restore decision tree, security notesdb-backup-drilljob in.github/workflows/ci.yml(runs afterbackend-migrations)#728 — Rate limit integration tests
backend/test/rate-limit.e2e-spec.ts: self-contained e2e suite using the realThrottlerGuardwith stub controllers and tiny limits (2–5) for fast, deterministic 429 triggeringstatusCode,message,Retry-Afterheaderauththrottle tier was used in@Throttle({ auth: ... })decorators but never registered inThrottlerModule.forRoot— added{ name: 'auth', ttl: 60000, limit: 5 }Files changed
backend/src/notifications/notifications.service.tsbackend/src/notifications/entities/notification.entity.tsbackend/src/notifications/dto/notification.dto.tsbackend/src/notifications/1745100000000-AddDigestColumnsToNotifications.tsbackend/src/notifications/notifications.service.spec.tsbackend/src/migration.datasource.tsfrontend/src/lib/notifications.tsfrontend/src/components/notifications/NotificationItem.tsxfrontend/src/components/notifications/NotificationDetail.tsxfrontend/e2e/notifications.spec.tsbackend/src/creators/creators.service.tsbackend/src/common/dto/paginated-response.dto.tsfrontend/src/lib/api/creators.tsfrontend/src/app/discover/DiscoverContent.tsxscripts/pg-backup-restore.shdocs/POSTGRES_BACKUP_RESTORE.md.github/workflows/ci.ymlbackend/test/rate-limit.e2e-spec.tsbackend/src/app.module.tsREADME.md