From e0da93a20a965125ba4cbb46e3e0e179f06c2a08 Mon Sep 17 00:00:00 2001 From: soryu Date: Sun, 18 Jan 2026 18:02:08 +0000 Subject: Improve Mesh Tab: Organize by contract with status filter (#5) * Add status filter toggle to Mesh Tab TaskList component Add a filter toggle at the top of the TaskList that allows filtering by contract status (All, Active, Completed, Archive) with Active as the default. Changes: - Backend: Add contract_status field to TaskSummary struct in models.rs - Backend: Update all SQL queries returning TaskSummary to include c.status as contract_status from the contracts table join - Frontend: Add contractStatus to TaskSummary TypeScript type - Frontend: Add useState for statusFilter with 'active' as default - Frontend: Add filter button group in header area next to '+ New Task' - Frontend: Update groupedTasks useMemo to filter based on contract status - Frontend: Update empty state message to reflect current filter Co-Authored-By: Claude Opus 4.5 * Task completion checkpoint * feat(mesh): show all contract tasks for supervisor tasks When viewing a supervisor task (task.isSupervisor === true), the TaskDetail component now shows all tasks in the contract instead of showing the subtasks tree. Changes: - Add contractTasks prop to TaskDetailProps for passing contract tasks - Add displayTasks computed value that uses contractTasks for supervisors - Change section header from "Subtasks" to "Contract Tasks" for supervisors - Hide the "+ Add Subtask" button for supervisor tasks - Update empty state message for supervisors - Fetch contract tasks in mesh.tsx when viewing a supervisor task - Filter out the supervisor itself from the contract tasks list Co-Authored-By: Claude Opus 4.5 * Task completion checkpoint * Task completion checkpoint --------- Co-authored-by: Claude Opus 4.5 --- makima/src/db/models.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'makima/src/db/models.rs') diff --git a/makima/src/db/models.rs b/makima/src/db/models.rs index 99c8b8e..3e6997f 100644 --- a/makima/src/db/models.rs +++ b/makima/src/db/models.rs @@ -544,6 +544,8 @@ pub struct TaskSummary { pub contract_name: Option, /// Contract phase (joined from contracts table) pub contract_phase: Option, + /// Contract status (joined from contracts table): 'active', 'completed', 'archived' + pub contract_status: Option, pub parent_task_id: Option, /// Depth in task hierarchy: 0=orchestrator (top-level), 1=subtask (max) pub depth: i32, @@ -568,6 +570,7 @@ impl From for TaskSummary { contract_id: task.contract_id, contract_name: None, // Not available from Task directly contract_phase: None, // Not available from Task directly + contract_status: None, // Not available from Task directly parent_task_id: task.parent_task_id, depth: task.depth, name: task.name, -- cgit v1.2.3