feat(tasks): B2a part 2 — task_lists CRUD + archive cmds + frontend wire

Storage: 5 task_lists CRUD functions (list/create/update/delete/
import) and 4 archive functions (list_archived_tasks/archive_task/
unarchive_task/archive_inbox_older_than). 8 new tests cover CRUD,
import idempotency, atomic-failure rollback, dependent-task null-out,
archive scope, archive_inbox_older_than Inbox-only invariant, and
unarchive round-trip.

Tauri: 9 new commands (5 task_lists + 4 archive) registered in the
invoke_handler. New file commands/task_lists.rs mirroring tasks.rs
structure. TaskDto extended with archived/archivedAt.

Frontend: loadTaskLists rewired to read from SQLite via
list_task_lists_cmd on Tauri runtime, with a one-time migration
that imports kon_task_lists localStorage into SQLite via
import_task_lists_cmd and clears localStorage only on success.
mapTaskRow handles the new archived fields. TasksPage gets an
Archived filter pill (hidden when empty) and a per-row archive
icon. moveTaskList/sortTaskLists kept local pending a future
order-column migration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-26 19:04:17 +01:00
parent 954ff22840
commit 0111fc9e08
9 changed files with 1133 additions and 85 deletions

View File

@@ -362,6 +362,17 @@ pub fn run() {
commands::tasks::list_subtasks_cmd,
commands::tasks::complete_subtask_cmd,
commands::tasks::list_recent_completions_cmd,
// B2a — archive surface (Inbox-only auto-sweep + per-row toggle)
commands::tasks::list_archived_tasks_cmd,
commands::tasks::archive_task_cmd,
commands::tasks::unarchive_task_cmd,
commands::tasks::archive_old_inbox_cmd,
// B2a — task_lists CRUD (replaces the localStorage source of truth)
commands::task_lists::list_task_lists_cmd,
commands::task_lists::create_task_list_cmd,
commands::task_lists::update_task_list_cmd,
commands::task_lists::delete_task_list_cmd,
commands::task_lists::import_task_lists_cmd,
// HITL feedback (Phase 2 roadmap)
commands::feedback::record_feedback,
commands::feedback::list_feedback_examples_cmd,