From 265f8cf14fec9d7116d09af49e4b48b357faceda Mon Sep 17 00:00:00 2001 From: soryu Date: Thu, 22 Jan 2026 13:17:17 +0000 Subject: 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 * 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 --------- Co-authored-by: Claude Opus 4.5 --- makima/frontend/src/routes/mesh.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'makima/frontend/src/routes/mesh.tsx') diff --git a/makima/frontend/src/routes/mesh.tsx b/makima/frontend/src/routes/mesh.tsx index 425721d..fb366a2 100644 --- a/makima/frontend/src/routes/mesh.tsx +++ b/makima/frontend/src/routes/mesh.tsx @@ -81,7 +81,7 @@ export default function MeshPage() { const { id } = useParams<{ id: string }>(); const navigate = useNavigate(); const { isAuthenticated, isAuthConfigured, isLoading: authLoading } = useAuth(); - const { tasks, loading, error, conflict, clearConflict, fetchTask, fetchTasks, editTask, removeTask, saveTask } = useTasks(); + const { tasks, loading, error, conflict, clearConflict, fetchTask, fetchTasks, editTask, removeTask, hideTask, saveTask } = useTasks(); const { pendingQuestions, submitAnswer } = useSupervisorQuestions(); // Memoize pending question IDs for efficient lookup @@ -408,6 +408,13 @@ export default function MeshPage() { [removeTask, id, taskDetail, navigate] ); + const handleDismiss = useCallback( + async (taskId: string) => { + await hideTask(taskId); + }, + [hideTask] + ); + const handleStart = useCallback( async (taskId: string) => { try { @@ -868,6 +875,7 @@ export default function MeshPage() { loading={loading || creating} onSelect={handleSelectTask} onDelete={handleDelete} + onDismiss={handleDismiss} onCreate={handleCreate} /> -- cgit v1.2.3