Description
Currently, tapping delete on the task detail permanently removes the task. To support future synchronization conflict resolution and provide a recovery window, tasks should be marked as deleted instead of being removed immediately. The existing hard-deletion path must remain available for future cleanup.
Scope
- In scope: add
isDeleted to Task, update the database migration with default false, add TaskRepository.markAsDeleted(id), wire TaskDetailViewModel.DeleteClicked to soft delete, keep existing hard delete methods.
- Out of scope: UI for permanent deletion, automatic hard-deletion cleanup, exposing deleted tasks to the user.
Acceptance criteria
Description
Currently, tapping delete on the task detail permanently removes the task. To support future synchronization conflict resolution and provide a recovery window, tasks should be marked as deleted instead of being removed immediately. The existing hard-deletion path must remain available for future cleanup.
Scope
isDeletedtoTask, update the database migration with defaultfalse, addTaskRepository.markAsDeleted(id), wireTaskDetailViewModel.DeleteClickedto soft delete, keep existing harddeletemethods.Acceptance criteria
WHEN the user taps delete on the task detail screen
THEN the task is marked as deleted and remains in the database
WHEN the app loads today's tasks or task detail
THEN the deleted task is not shown (unless explicitly requested by a future query)
THEN
TaskRepositoryexposes amarkAsDeleted(id: Uuid)method that setsisDeleted = trueand updateslastUpdatedAtWHEN the migration runs
THEN
isDeleteddefaults tofalseTHEN the existing hard
deletemethod remains available for permanent deletion