From a7670b20bfb44802b6b03b03065ab2817e3b9a44 Mon Sep 17 00:00:00 2001 From: soryu Date: Sun, 18 Jan 2026 19:13:51 +0000 Subject: Add supervisor task button to workflow board contract cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add supervisorTaskId field to ContractSummary type in backend and frontend - Update SQL queries in repository.rs to include supervisor_task_id - Add navigation button (▶) to WorkflowContractCard that links to /mesh/{supervisorTaskId} - Button only shows when contract has a supervisorTaskId - Button has tooltip "Open Supervisor Task" and stops propagation to avoid triggering card click Co-Authored-By: Claude Opus 4.5 --- .../components/workflow/WorkflowContractCard.tsx | 26 +++++++++++++++++++--- makima/frontend/src/lib/api.ts | 2 ++ 2 files changed, 25 insertions(+), 3 deletions(-) (limited to 'makima/frontend/src') diff --git a/makima/frontend/src/components/workflow/WorkflowContractCard.tsx b/makima/frontend/src/components/workflow/WorkflowContractCard.tsx index e6c8a1c..61e6d17 100644 --- a/makima/frontend/src/components/workflow/WorkflowContractCard.tsx +++ b/makima/frontend/src/components/workflow/WorkflowContractCard.tsx @@ -1,3 +1,4 @@ +import { useNavigate } from "react-router"; import type { ContractSummary, ContractStatus } from "../../lib/api"; interface WorkflowContractCardProps { @@ -17,8 +18,16 @@ export function WorkflowContractCard({ onClick, onDragStart, }: WorkflowContractCardProps) { + const navigate = useNavigate(); const status = statusConfig[contract.status] || statusConfig.active; + const handleSupervisorClick = (e: React.MouseEvent) => { + e.stopPropagation(); + if (contract.supervisorTaskId) { + navigate(`/mesh/${contract.supervisorTaskId}`); + } + }; + return (
- {/* Name */} -
- {contract.name} + {/* Header row with name and supervisor button */} +
+
+ {contract.name} +
+ {contract.supervisorTaskId && ( + + )}
{/* Status and counts row */} diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts index 4652347..8393d34 100644 --- a/makima/frontend/src/lib/api.ts +++ b/makima/frontend/src/lib/api.ts @@ -1462,6 +1462,8 @@ export interface ContractSummary { contractType: ContractType; phase: ContractPhase; status: ContractStatus; + /** Supervisor task ID for contract orchestration */ + supervisorTaskId: string | null; fileCount: number; taskCount: number; repositoryCount: number; -- cgit v1.2.3