diff --git a/web-ui/src/components/cases/agent-activity-feed.tsx b/web-ui/src/components/cases/agent-activity-feed.tsx index ab11c9a..45e73ab 100644 --- a/web-ui/src/components/cases/agent-activity-feed.tsx +++ b/web-ui/src/components/cases/agent-activity-feed.tsx @@ -10,6 +10,7 @@ import { useSendComment, useSubmitInteraction, useDismissInteraction, + useSetIssueStatus, } from "@/lib/api/agents"; import type { Interaction, @@ -772,31 +773,96 @@ function IssueGroup({ defaultOpen: boolean; }) { const [open, setOpen] = useState(defaultOpen); + const setStatus = useSetIssueStatus(caseNumber); const closed = issue.status === "done" || issue.status === "cancelled"; + // Show the parent run this issue hangs under (e.g. a "הרצה חדשה" nested under + // the live CEO root) so the hierarchy is visible, not flattened. + const parentIdentifier = issue.parent_id + ? issueMap.get(issue.parent_id) + : undefined; + + const close = (status: "done" | "cancelled") => + setStatus.mutate( + { issue_id: issue.id, status }, + { + onSuccess: () => + toast.success( + status === "done" ? "המשימה סומנה כהושלמה" : "המשימה בוטלה", + ), + onError: () => toast.error("שגיאה בעדכון סטטוס המשימה"), + }, + ); + return ( -