feat: task trash, triage trash and retention settings for every area; admin can forbid keeping things for good
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m39s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sandrodachandClaude Opus 5.5 committed 2026-11-01 15:44:34 +01:00
1 parent a927a94a95
commit 5a9c5bac37
36 files changed
+1356 -175

No files matched your search

+6
View File
@@ -523,6 +523,8 @@ func (s *Store) UpdateThoughtDetails(userID, thoughtID string, content *string,
return thought, nil
}
// DeleteThought: a task goes to the task trash (task_trash.go); anything else (a thought from the inbox
// or the triage trash) is deleted for good.
func (s *Store) DeleteThought(userID, thoughtID string) error {
thought, err := s.GetThoughtByID(userID, thoughtID)
if err != nil {
@@ -531,6 +533,10 @@ func (s *Store) DeleteThought(userID, thoughtID string) error {
if err := s.ensureTaskListWritable(userID, thought.TaskListID); err != nil {
return err
}
// Tasks as in completedTaskSQL: kept, or converted into a task
if thought.Status == domain.StatusKept || (thought.Status == domain.StatusConverted && thought.ConvertedType == "task") {
return s.trashTask(thought.ID, userID)
}
_, err = s.db.Exec(`DELETE FROM thoughts WHERE id = ?`, thought.ID)
return err
}