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

+21
View File
@@ -4,6 +4,8 @@ import {
DashboardStats,
Document,
TrashedDocument,
TrashedTask,
Retention,
JournalDay,
PushDevice,
BackupFile,
@@ -302,6 +304,7 @@ export const api = {
notificationSettings?: NotificationSettings;
doneRetentionDays?: number;
voiceInput?: '' | 'browser';
retention?: Retention;
}): Promise<User> {
return request<User>('/api/v1/auth/settings', {
method: 'PATCH',
@@ -479,6 +482,24 @@ export const api = {
return request<{ deleted: number }>('/api/v1/tasks/clear-done', { method: 'POST', body: JSON.stringify({ taskListId }) });
},
// Task trash: deleted tasks, cleared and automatically cleaned-up completed ones
async getTaskTrash(taskListId = ''): Promise<TrashedTask[]> {
const q = taskListId ? `?taskListId=${encodeURIComponent(taskListId)}` : '';
return request<TrashedTask[]>(`/api/v1/tasks/trash${q}`);
},
async restoreTrashedTask(id: string): Promise<Thought> {
return request<Thought>(`/api/v1/tasks/trash/${id}/restore`, { method: 'POST' });
},
async purgeTrashedTask(id: string): Promise<{ deleted: boolean }> {
return request<{ deleted: boolean }>(`/api/v1/tasks/trash/${id}`, { method: 'DELETE' });
},
async emptyTaskTrash(taskListId: string): Promise<{ deleted: number }> {
return request<{ deleted: number }>('/api/v1/tasks/trash/empty', { method: 'POST', body: JSON.stringify({ taskListId }) });
},
async purgeDiscarded(): Promise<{ purged: number }> {
return request<{ purged: number }>('/api/v1/thoughts/discarded/purge', { method: 'DELETE' });
},