From 0069c600f2bd74a85e7430d78dc290261e4a25ab Mon Sep 17 00:00:00 2001 From: janpeter visser Date: Fri, 1 May 2026 12:51:14 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20TaskDetailDialog=20=E2=80=94=20verify?= =?UTF-8?q?=5Fresult=20display=20+=20verify=5Fonly=20checkbox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- components/solo/task-detail-dialog.tsx | 82 +++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 2 deletions(-) diff --git a/components/solo/task-detail-dialog.tsx b/components/solo/task-detail-dialog.tsx index d25975c..6da9f74 100644 --- a/components/solo/task-detail-dialog.tsx +++ b/components/solo/task-detail-dialog.tsx @@ -46,16 +46,25 @@ interface TaskDetailContentProps { onClose: () => void } +const VERIFY_RESULT_CONFIG: Record = { + aligned: { label: 'Aligned', className: 'text-status-done' }, + partial: { label: 'Gedeeltelijk', className: 'text-warning' }, + divergent: { label: 'Divergent', className: 'text-error' }, + empty: { label: 'Geen wijzigingen', className: 'text-muted-foreground' }, +} + type SaveState = 'idle' | 'saving' | 'saved' function TaskDetailContent({ task, productId, isDemo, repoUrl, onClose }: TaskDetailContentProps) { - const { updatePlan } = useSoloStore() + const { updatePlan, updateVerifyOnly } = useSoloStore() const job = useSoloStore(s => s.claudeJobsByTaskId[task.id]) const connectedWorkers = useSoloStore(s => s.connectedWorkers) const [localPlan, setLocalPlan] = useState(task.implementation_plan ?? '') + const [localVerifyOnly, setLocalVerifyOnly] = useState(task.verify_only) const [saveState, setSaveState] = useState('idle') const [, startTransition] = useTransition() const [jobPending, startJobTransition] = useTransition() + const [verifyOnlyPending, startVerifyOnlyTransition] = useTransition() const fadeTimer = useRef | null>(null) const savedPlanRef = useRef(task.implementation_plan ?? '') @@ -111,6 +120,31 @@ function TaskDetailContent({ task, productId, isDemo, repoUrl, onClose }: TaskDe }) } + function handleVerifyOnlyToggle() { + if (isDemo) return + const newValue = !localVerifyOnly + setLocalVerifyOnly(newValue) + startVerifyOnlyTransition(async () => { + try { + const res = await fetch(`/api/tasks/${task.id}`, { + method: 'PATCH', + headers: { 'Content-Type': 'application/json' }, + credentials: 'include', + body: JSON.stringify({ verify_only: newValue }), + }) + if (!res.ok) { + setLocalVerifyOnly(!newValue) + toast.error('Verify-only bijwerken mislukt') + return + } + updateVerifyOnly(task.id, newValue) + } catch { + setLocalVerifyOnly(!newValue) + toast.error('Verify-only bijwerken mislukt') + } + }) + } + return ( <> @@ -162,6 +196,30 @@ function TaskDetailContent({ task, productId, isDemo, repoUrl, onClose }: TaskDe +
+ + + + Alleen verifiëren (niet implementeren) +
+