From 1e2819eeff8c8f326540d9022f13218572b83000 Mon Sep 17 00:00:00 2001 From: Lukas May Date: Fri, 6 Mar 2026 10:43:36 +0100 Subject: [PATCH] fix: Request changes uses in-app confirmation, requires review comments - Replace window.prompt with in-app dropdown confirmation (matches merge dialog pattern) - Disable button when no unresolved comments exist (comments-only, no summary) - Remove initiative-level request changes button (no comment system there) --- .../components/review/InitiativeReview.tsx | 28 +------ .../src/components/review/ReviewHeader.tsx | 82 +++++++++++++++---- apps/web/src/components/review/ReviewTab.tsx | 4 +- 3 files changed, 68 insertions(+), 46 deletions(-) diff --git a/apps/web/src/components/review/InitiativeReview.tsx b/apps/web/src/components/review/InitiativeReview.tsx index 5f7a36b..fc0cd7a 100644 --- a/apps/web/src/components/review/InitiativeReview.tsx +++ b/apps/web/src/components/review/InitiativeReview.tsx @@ -1,6 +1,6 @@ import { useCallback, useMemo, useRef, useState } from "react"; import { toast } from "sonner"; -import { Loader2, GitBranch, ArrowRight, FileCode, Plus, Minus, Upload, GitMerge, RotateCcw } from "lucide-react"; +import { Loader2, GitBranch, ArrowRight, FileCode, Plus, Minus, Upload, GitMerge } from "lucide-react"; import { Button } from "@/components/ui/button"; import { trpc } from "@/lib/trpc"; import { parseUnifiedDiff } from "./parse-diff"; @@ -82,14 +82,6 @@ export function InitiativeReview({ initiativeId, onCompleted }: InitiativeReview onError: (err) => toast.error(`Failed to stop: ${err.message}`), }); - const requestChangesMutation = trpc.requestInitiativeChanges.useMutation({ - onSuccess: () => { - toast.success("Changes requested — review task created"); - onCompleted(); - }, - onError: (err) => toast.error(err.message), - }); - const approveMutation = trpc.approveInitiativeReview.useMutation({ onSuccess: (_data, variables) => { const msg = variables.strategy === "merge_and_push" @@ -197,24 +189,6 @@ export function InitiativeReview({ initiativeId, onCompleted }: InitiativeReview {/* Right: preview + action buttons */}
{previewState && } - + + {showRequestConfirm && ( +
+

+ Request changes? +

+
+
+ + + {unresolvedCount} unresolved {unresolvedCount === 1 ? "comment" : "comments"} will be sent + +
+
+
+ + +
+
)} - Request Changes - +