From 426d56571cd72e66671f49b382693b5ca0256d36 Mon Sep 17 00:00:00 2001 From: Andy <119136210+AndyMik90@users.noreply.github.com> Date: Sat, 24 Jan 2026 14:47:08 +0100 Subject: [PATCH] auto-claude: subtask-1-1 - Add metadata?.requireReviewBeforeCoding check (#1460) Fix bug where "Approve Plan" badge incorrectly displays when user has NOT checked the "need human review" checkbox. The plan_review reason is now only set when both planStatus === 'review' AND requireReviewBeforeCoding is true. Co-authored-by: Claude Opus 4.5 --- apps/frontend/src/main/project-store.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/frontend/src/main/project-store.ts b/apps/frontend/src/main/project-store.ts index cdb6bfcf..e4b619a1 100644 --- a/apps/frontend/src/main/project-store.ts +++ b/apps/frontend/src/main/project-store.ts @@ -616,7 +616,8 @@ export class ProjectStore { } // Plan review stage (human approval of spec before coding starts) - if (isPlanReviewStage && storedStatus === 'human_review') { + // Only show plan_review when user explicitly requested human review via checkbox + if (isPlanReviewStage && storedStatus === 'human_review' && metadata?.requireReviewBeforeCoding) { debugLog('[determineTaskStatusAndReason] Plan review stage detected:', { planStatus: plan.status, reason: 'Spec creation complete, awaiting user approval'