summaryrefslogtreecommitdiff
path: root/makima/src/db/models.rs
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/src/db/models.rs
parent1b1b737006f9505b2a188a669c5a37671658ce3f (diff)
downloadsoryu-c5cd9fe0515f024a6f442e6b7eca614a38aa6deb.tar.gz
soryu-c5cd9fe0515f024a6f442e6b7eca614a38aa6deb.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/src/db/models.rs')
-rw-r--r--makima/src/db/models.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/makima/src/db/models.rs b/makima/src/db/models.rs
index bf95a3a..6ede268 100644
--- a/makima/src/db/models.rs
+++ b/makima/src/db/models.rs
@@ -525,6 +525,12 @@ pub struct Task {
/// Used to track the origin of "what if" explorations.
#[serde(skip_serializing_if = "Option::is_none")]
pub branched_from_task_id: Option<Uuid>,
+
+ // UI visibility
+ /// Whether this task is hidden from the UI (user dismissed it).
+ /// Standalone completed tasks can be dismissed by the user.
+ #[serde(default)]
+ pub hidden: bool,
}
impl Task {
@@ -564,6 +570,9 @@ pub struct TaskSummary {
/// True for contract supervisor tasks
#[serde(default)]
pub is_supervisor: bool,
+ /// Whether this task is hidden from the UI (user dismissed it)
+ #[serde(default)]
+ pub hidden: bool,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}
@@ -586,6 +595,7 @@ impl From<Task> for TaskSummary {
subtask_count: 0, // Would need separate query
version: task.version,
is_supervisor: task.is_supervisor,
+ hidden: task.hidden,
created_at: task.created_at,
updated_at: task.updated_at,
}
@@ -670,6 +680,8 @@ pub struct UpdateTaskRequest {
/// Explicitly clear daemon_id (set to NULL)
#[serde(default)]
pub clear_daemon_id: bool,
+ /// Whether this task is hidden from the UI (user dismissed it)
+ pub hidden: Option<bool>,
/// Version for optimistic locking
pub version: Option<i32>,
}