diff options
Diffstat (limited to 'makima/frontend')
| -rw-r--r-- | makima/frontend/src/components/mesh/TaskList.tsx | 8 | ||||
| -rw-r--r-- | makima/frontend/src/components/mesh/TaskTree.tsx | 10 | ||||
| -rw-r--r-- | makima/frontend/src/components/workflow/WorkflowContractCard.tsx | 26 | ||||
| -rw-r--r-- | makima/frontend/src/lib/api.ts | 2 |
4 files changed, 39 insertions, 7 deletions
diff --git a/makima/frontend/src/components/mesh/TaskList.tsx b/makima/frontend/src/components/mesh/TaskList.tsx index f829b29..80077b6 100644 --- a/makima/frontend/src/components/mesh/TaskList.tsx +++ b/makima/frontend/src/components/mesh/TaskList.tsx @@ -95,8 +95,8 @@ export function TaskList({ // Group tasks by contract and filter by status const groupedTasks = useMemo(() => { - // Separate root tasks (no parent) from subtasks - const rootTasks = tasks.filter((t) => !t.parentTaskId); + // Separate root tasks (no parent) from subtasks, and only show supervisor tasks + const rootTasks = tasks.filter((t) => !t.parentTaskId && t.isSupervisor); // Filter tasks based on contract status const filteredTasks = statusFilter === 'all' @@ -205,8 +205,8 @@ export function TaskList({ {totalTasks === 0 ? ( <div className="text-center text-[#9bc3ff] text-sm font-mono opacity-60 py-8"> {statusFilter === 'all' - ? 'No tasks yet. Create one to start orchestrating Claude Code instances.' - : `No ${statusFilter} tasks found.`} + ? 'No supervisor tasks yet. Create a contract to start orchestrating tasks.' + : `No ${statusFilter} supervisor tasks found.`} </div> ) : ( <div> diff --git a/makima/frontend/src/components/mesh/TaskTree.tsx b/makima/frontend/src/components/mesh/TaskTree.tsx index 46ae78d..296d3c6 100644 --- a/makima/frontend/src/components/mesh/TaskTree.tsx +++ b/makima/frontend/src/components/mesh/TaskTree.tsx @@ -165,6 +165,16 @@ function TreeNode({ task, isSupervisorTask, onSelect, depth, fetchSubtasks }: Tr P{task.priority} </span> )} + + {/* Open in full page button */} + <a + href={`/tasks/${task.id}`} + onClick={(e) => e.stopPropagation()} + className="font-mono text-[10px] text-[#555] opacity-0 group-hover:opacity-100 hover:text-[#75aafc] transition-all" + title="Open task page" + > + ↗ + </a> </div> {/* Children */} 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 ( <div draggable @@ -26,9 +35,20 @@ export function WorkflowContractCard({ onClick={onClick} className="p-3 bg-[rgba(9,13,20,0.8)] border border-[rgba(117,170,252,0.2)] hover:border-[rgba(117,170,252,0.4)] cursor-pointer transition-colors select-none" > - {/* Name */} - <div className="font-mono text-sm text-[#dbe7ff] truncate mb-1"> - {contract.name} + {/* Header row with name and supervisor button */} + <div className="flex items-center justify-between gap-2 mb-1"> + <div className="font-mono text-sm text-[#dbe7ff] truncate flex-1"> + {contract.name} + </div> + {contract.supervisorTaskId && ( + <button + onClick={handleSupervisorClick} + title="Open Supervisor Task" + className="flex-shrink-0 px-1.5 py-0.5 font-mono text-[10px] text-[#75aafc] hover:text-[#9bc3ff] border border-[rgba(117,170,252,0.25)] hover:border-[#3f6fb3] hover:bg-[rgba(117,170,252,0.1)] transition-colors" + > + ▶ + </button> + )} </div> {/* Status and counts row */} diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts index abf72b8..daa2b5c 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; |
