diff options
| author | soryu <soryu@soryu.co> | 2026-01-22 13:17:17 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-22 13:17:17 +0000 |
| commit | 265f8cf14fec9d7116d09af49e4b48b357faceda (patch) | |
| tree | c98ff8be7dd5f01692446e01c7b568279b0635ac /makima/frontend/src/components/mesh/TaskList.tsx | |
| parent | a363bfdd7a3e81b75bf230e45d001b80f759ca57 (diff) | |
| download | soryu-265f8cf14fec9d7116d09af49e4b48b357faceda.tar.gz soryu-265f8cf14fec9d7116d09af49e4b48b357faceda.zip | |
Fix completion actions: default to PR and support remote repos (#21)
* Fix completion actions: default to PR and support remote repos
- Change default completion action from 'branch' to 'pr' for tasks
using daemon working directory
- Allow PR completion action to work without target_repo_path if the
worktree already has an origin remote configured (e.g., when cloned
from a remote URL)
- Update create_pull_request to accept optional target_repo parameter
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add dismiss functionality for completed standalone tasks
## 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>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'makima/frontend/src/components/mesh/TaskList.tsx')
| -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> ))} |
