Description
Soft-deleted tasks accumulate locally (and remotely for premium subscribers) until they are permanently removed. This ticket adds a startup service that hard-deletes tasks whose soft-deletion is older than 30 days, respecting subscription status by only touching local data for free users.
Scope
- In scope: startup cleanup service, 30-day retention threshold, local database cleanup for all users, Supabase cleanup for subscribers, wiring to app launch.
- Out of scope: UI for retention settings, user-controlled deletion, sync conflict resolution.
Acceptance criteria
Description
Soft-deleted tasks accumulate locally (and remotely for premium subscribers) until they are permanently removed. This ticket adds a startup service that hard-deletes tasks whose soft-deletion is older than 30 days, respecting subscription status by only touching local data for free users.
Scope
Acceptance criteria
WHEN the cleanup service runs
THEN it queries local tasks where
isDeleted = trueandlastUpdatedAtis older than 30 daysWHEN the cleanup service runs
THEN the task is permanently deleted from the local database
WHEN the cleanup service runs
THEN it also queries Supabase for soft-deleted tasks older than 30 days and hard-deletes them
WHEN the cleanup service runs
THEN only the local database is checked and no remote calls are made
THEN soft-deleted tasks within the 30-day window are not deleted