From bc61eb84dfa83f1076cfda2d074e484ae114c8a6 Mon Sep 17 00:00:00 2001 From: dotta Date: Sat, 28 Mar 2026 11:53:26 -0500 Subject: [PATCH] Remove comment composer interrupt checkbox Co-Authored-By: Paperclip --- ui/src/components/CommentThread.tsx | 32 ++--------------------------- ui/src/pages/IssueDetail.tsx | 8 +++----- 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/ui/src/components/CommentThread.tsx b/ui/src/components/CommentThread.tsx index 0204b94d..e2a0173a 100644 --- a/ui/src/components/CommentThread.tsx +++ b/ui/src/components/CommentThread.tsx @@ -40,12 +40,7 @@ interface CommentThreadProps { linkedRuns?: LinkedRunItem[]; companyId?: string | null; projectId?: string | null; - onAdd: ( - body: string, - reopen?: boolean, - reassignment?: CommentReassignment, - interrupt?: boolean, - ) => Promise; + onAdd: (body: string, reopen?: boolean, reassignment?: CommentReassignment) => Promise; issueStatus?: string; agentMap?: Map; imageUploadHandler?: (file: File) => Promise; @@ -58,7 +53,6 @@ interface CommentThreadProps { currentAssigneeValue?: string; suggestedAssigneeValue?: string; mentions?: MentionOption[]; - interruptAvailable?: boolean; onInterruptQueued?: (runId: string) => Promise; interruptingQueuedRunId?: string | null; } @@ -329,13 +323,11 @@ export function CommentThread({ currentAssigneeValue = "", suggestedAssigneeValue, mentions: providedMentions, - interruptAvailable = false, onInterruptQueued, interruptingQueuedRunId = null, }: CommentThreadProps) { const [body, setBody] = useState(""); const [reopen, setReopen] = useState(true); - const [interrupt, setInterrupt] = useState(false); const [submitting, setSubmitting] = useState(false); const [attaching, setAttaching] = useState(false); const effectiveSuggestedAssigneeValue = suggestedAssigneeValue ?? currentAssigneeValue; @@ -405,14 +397,6 @@ export function CommentThread({ setReassignTarget(effectiveSuggestedAssigneeValue); }, [effectiveSuggestedAssigneeValue]); - const interruptVisible = interruptAvailable && body.trim().length > 0; - - useEffect(() => { - if (!interruptVisible && interrupt) { - setInterrupt(false); - } - }, [interruptVisible, interrupt]); - // Scroll to comment when URL hash matches #comment-{id} useEffect(() => { const hash = location.hash; @@ -439,11 +423,10 @@ export function CommentThread({ setSubmitting(true); try { - await onAdd(trimmed, reopen ? true : undefined, reassignment ?? undefined, interrupt ? true : undefined); + await onAdd(trimmed, reopen ? true : undefined, reassignment ?? undefined); setBody(""); if (draftKey) clearDraft(draftKey); setReopen(true); - setInterrupt(false); setReassignTarget(effectiveSuggestedAssigneeValue); } catch { // Parent mutation handlers surface the failure and keep the draft intact. @@ -564,17 +547,6 @@ export function CommentThread({ /> Re-open - {interruptVisible && ( - - )} {enableReassign && reassignOptions.length > 0 && ( readIssueDetailBreadcrumb(location.state, location.search) ?? { label: "Issues", href: "/issues" }, [location.state, location.search], @@ -1246,17 +1245,16 @@ export function IssueDetail() { currentAssigneeValue={actualAssigneeValue} suggestedAssigneeValue={suggestedAssigneeValue} mentions={mentionOptions} - interruptAvailable={hasRunningIssueRun} onInterruptQueued={async (runId) => { await interruptQueuedComment.mutateAsync(runId); }} interruptingQueuedRunId={interruptQueuedComment.isPending ? runningIssueRun?.id ?? null : null} - onAdd={async (body, reopen, reassignment, interrupt) => { + onAdd={async (body, reopen, reassignment) => { if (reassignment) { - await addCommentAndReassign.mutateAsync({ body, reopen, reassignment, interrupt }); + await addCommentAndReassign.mutateAsync({ body, reopen, reassignment }); return; } - await addComment.mutateAsync({ body, reopen, interrupt }); + await addComment.mutateAsync({ body, reopen }); }} imageUploadHandler={async (file) => { const attachment = await uploadAttachment.mutateAsync(file);