diff options
Diffstat (limited to 'makima/frontend/src/components')
| -rw-r--r-- | makima/frontend/src/components/mesh/TaskList.tsx | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/makima/frontend/src/components/mesh/TaskList.tsx b/makima/frontend/src/components/mesh/TaskList.tsx index e3f2862..016fef5 100644 --- a/makima/frontend/src/components/mesh/TaskList.tsx +++ b/makima/frontend/src/components/mesh/TaskList.tsx @@ -6,6 +6,7 @@ interface TaskListProps { loading: boolean; onSelect: (id: string) => void; onDelete: (id: string) => void; + onDismiss: (id: string) => void; onCreate: () => void; } @@ -88,6 +89,7 @@ export function TaskList({ loading, onSelect, onDelete, + onDismiss, onCreate, }: TaskListProps) { // Filter state - default to 'active' to show only active contracts @@ -300,17 +302,31 @@ export function TaskList({ </div> </button> {/* Supervisor tasks cannot be deleted directly - they are deleted with the contract */} - {!task.isSupervisor && ( - <button - onClick={(e) => { - e.stopPropagation(); - onDelete(task.id); - }} - className="px-2 py-1 font-mono text-[10px] text-red-400 hover:bg-red-400/10 border border-red-400/30 hover:border-red-400/50 transition-colors uppercase" - > - Delete - </button> - )} + <div className="flex gap-2"> + {/* Show dismiss button for completed standalone tasks (tasks without a contract) */} + {!task.contractId && (task.status === "done" || task.status === "failed" || task.status === "merged") && ( + <button + onClick={(e) => { + e.stopPropagation(); + onDismiss(task.id); + }} + className="px-2 py-1 font-mono text-[10px] text-[#8b949e] hover:bg-[rgba(117,170,252,0.1)] border border-[rgba(117,170,252,0.25)] hover:border-[#3f6fb3] transition-colors uppercase" + > + Dismiss + </button> + )} + {!task.isSupervisor && ( + <button + onClick={(e) => { + e.stopPropagation(); + onDelete(task.id); + }} + className="px-2 py-1 font-mono text-[10px] text-red-400 hover:bg-red-400/10 border border-red-400/30 hover:border-red-400/50 transition-colors uppercase" + > + Delete + </button> + )} + </div> </div> </div> ))} |
