summaryrefslogtreecommitdiff
path: root/makima/migrations/20250122000000_add_task_hidden.sql
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-01-22 13:16:01 +0000
committersoryu <soryu@soryu.co>2026-01-22 13:16:01 +0000
commitc5cd9fe0515f024a6f442e6b7eca614a38aa6deb (patch)
tree3945da69ce346798b413d7063485aebfd5be3d11 /makima/migrations/20250122000000_add_task_hidden.sql
parent1b1b737006f9505b2a188a669c5a37671658ce3f (diff)
downloadsoryu-makima/task-task-5dde682c-5dde682c.tar.gz
soryu-makima/task-task-5dde682c-5dde682c.zip
Add dismiss functionality for completed standalone tasksmakima/task-task-5dde682c-5dde682c
## Changes ### Backend - Add 'hidden' field to Task model (models.rs) - Add database migration for hidden column (20250122000000_add_task_hidden.sql) - Update task listing queries to include hidden field and filter out hidden tasks - Update update_task_for_owner to handle hidden field ### Frontend - Add hidden field to TaskSummary interface (api.ts) - Add dismissTask API function (api.ts) - Add hideTask function to useTasks hook - Add Dismiss button to TaskList for completed standalone tasks - Wire up onDismiss handler in mesh.tsx route ## Behavior - Completed standalone tasks (tasks without a contract) show a "Dismiss" button - Dismissing a task sets hidden=true and removes it from the task list - Hidden tasks are filtered out by default in all task listing queries Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'makima/migrations/20250122000000_add_task_hidden.sql')
-rw-r--r--makima/migrations/20250122000000_add_task_hidden.sql5
1 files changed, 5 insertions, 0 deletions
diff --git a/makima/migrations/20250122000000_add_task_hidden.sql b/makima/migrations/20250122000000_add_task_hidden.sql
new file mode 100644
index 0000000..42eed52
--- /dev/null
+++ b/makima/migrations/20250122000000_add_task_hidden.sql
@@ -0,0 +1,5 @@
+-- Add hidden column to tasks table for dismissing completed standalone tasks
+ALTER TABLE tasks ADD COLUMN hidden BOOLEAN NOT NULL DEFAULT FALSE;
+
+-- Create index for filtering hidden tasks efficiently
+CREATE INDEX IF NOT EXISTS idx_tasks_hidden ON tasks(hidden) WHERE hidden = false;