feat: add data retention with auto-delete, pin exemption, and warning emails#109
Merged
alexneamtu merged 13 commits intomainfrom Mar 5, 2026
Merged
feat: add data retention with auto-delete, pin exemption, and warning emails#109alexneamtu merged 13 commits intomainfrom
alexneamtu merged 13 commits intomainfrom
Conversation
- Add RetentionDays field to userResponse and updateUserRequest - Include retention_days in GetUser SELECT query - Add validation (0, 30, 60, 90, 180, 365) in UpdateUser handler - Add 2 tests for valid and invalid retention_days updates
- Add RetentionDays field to orgListItem, orgDetailResponse, updateOrgRequest - Include retention_days in List, Get, and Update SELECT queries - Add validation (0, 30, 60, 90, 180, 365) and dynamic SET clause in Update - Add 2 tests for valid and invalid retention_days updates
Resolve effective retention for current context: org retention_days for workspace videos, user retention_days for personal videos.
Listmonk transactional email for 7-day retention warning. Bypasses allowlist. Template ID via LISTMONK_RETENTION_WARNING_TEMPLATE_ID.
Daily ticker warns users 7 days before deletion, then soft-deletes videos after grace period. Cleans up playlist_videos on delete.
…e Settings Select from Off/30/60/90/180/365 days. Personal and workspace scopes. Pinned videos excluded (noted in description).
…ibrary Pin/Unpin button in video actions bar with filled/outline icon. Pinned badge in metadata. Pin indicator overlay on library video cards.
Add PUT /videos/{id}/pin, retentionDays to user/org/limits responses,
pinned + retentionWarnedAt to video schema, org endpoints with retention.
|
Preview deployed: https://pr-109.app.sendrec.eu |
Use flexbox on video cards so the Copy link footer aligns at the bottom regardless of metadata height. Add Pin/Unpin option to the three-dot menu on library video cards.
Without this, the Library page couldn't show pin indicators and VideoDetail lost pinned state on refresh.
Column is share_token, not share_id.
|
Preview environment cleaned up. |
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
Changes
Backend
retention_dayson users/organizations,pinned+retention_warned_aton videosPUT /api/videos/{id}/pin— toggle pin statusretentionDaysadded to user profile, org settings, and limits APISendRetentionWarningemail method (bypasses allowlist)StartRetentionWorker— daily ticker, processes warnings then deletions in batches of 100LISTMONK_RETENTION_WARNING_TEMPLATE_IDenv varFrontend
Docs
Test plan
retentionDays: 30retentionDays