- Make TaskCard dependency badges clickable to open task detail - Make TaskDetailModal dependency links clickable for navigation - Wire onOpenDetail callback through Column and WorktreeGroup components - Add comprehensive tests for clickable dependency interactions - Simplify GitHubImportModal component and update related tests
50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
import type { Task, TaskDetail } from "@kb/core";
|
|
import { ClipboardList, GitBranch } from "lucide-react";
|
|
import { TaskCard } from "./TaskCard";
|
|
import type { ToastType } from "../hooks/useToast";
|
|
|
|
interface WorktreeGroupProps {
|
|
label: string;
|
|
activeTasks: Task[];
|
|
queuedTasks: Task[];
|
|
onOpenDetail: (task: TaskDetail) => void;
|
|
addToast: (message: string, type?: ToastType) => void;
|
|
globalPaused?: boolean;
|
|
tasks?: Task[]; // All tasks for dependency lookup
|
|
}
|
|
|
|
export function WorktreeGroup({
|
|
label,
|
|
activeTasks,
|
|
queuedTasks,
|
|
onOpenDetail,
|
|
addToast,
|
|
globalPaused,
|
|
tasks = [],
|
|
}: WorktreeGroupProps) {
|
|
return (
|
|
<div className="worktree-group">
|
|
<div className="worktree-group-header">
|
|
<span className="worktree-icon">
|
|
{label === "Up Next" || label === "Unassigned" ? <ClipboardList size={14} /> : <GitBranch size={14} />}
|
|
</span>
|
|
<span className="worktree-label">{label}</span>
|
|
</div>
|
|
{activeTasks.map((task) => (
|
|
<TaskCard key={task.id} task={task} onOpenDetail={onOpenDetail} addToast={addToast} globalPaused={globalPaused} tasks={tasks} />
|
|
))}
|
|
{queuedTasks.map((task) => (
|
|
<TaskCard
|
|
key={task.id}
|
|
task={task}
|
|
queued
|
|
onOpenDetail={onOpenDetail}
|
|
addToast={addToast}
|
|
globalPaused={globalPaused}
|
|
tasks={tasks}
|
|
/>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|