From 5b8b9fd097d1b772dbb6512d8ca95b61c05345b2 Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Mon, 10 Aug 2026 09:33:29 +0800 Subject: [PATCH] Remove .DS_Store from version control and update .gitignore. Enhance BatchCaseDetailDrawer and BatchRunCompletedView components to support error handling and improved UI for displaying test case statuses. Add functionality for editing and rerunning test cases. Update TestCasesPage to handle initial case selection. Refactor related components for better maintainability. --- .DS_Store | Bin 8196 -> 0 bytes .gitignore | 4 + frontend/src/app/test/cases/[id]/page.tsx | 11 +- .../batch-test/batch-case-detail-drawer.tsx | 298 ++++- .../batch-test/batch-case-status.tsx | 19 +- .../batch-test/batch-run-completed.tsx | 312 ++++- .../batch-test/batch-run-running.tsx | 95 +- .../batch-test/test-scope-selector.tsx | 255 ++-- .../src/components/pages/BatchTestPage.tsx | 422 +++++-- .../src/components/pages/TestCasesPage.tsx | 134 +- .../test-cases/input-mode-picker.tsx | 7 +- .../test-cases/next-reply-editor.tsx | 1082 +++++++++-------- frontend/src/data/batch-run.ts | 360 +++++- frontend/src/data/test-suites.ts | 692 +++++------ 14 files changed, 2448 insertions(+), 1243 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 1ba0ef343162ff3b6e292233615e91b1d2c63df0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHMy>HV%6n_^Ai78N*worB`sYlgc<^Fzz>`#8Vf<(+*F0FdHJWei{#05aGF zw|lYs2?@PuU6j%z`;im$2bhNvj6xkMGeMWN888SK1PlTO0fT@+;BPi2S}f+<^|20ic43FsZI|>yAplG zAj%!}Sz(U6pm|eqYn|2y`PL&h8dmfN8i4*W1tU z+;ao&qE-}C5!>iDNhkrN!376ASOyAAoc24cUnQ*fKn3j@5CDhuPFr$3VLO1fTt^P! zG)f%5Cp55+FvcjXcKeqGX^7A^I?ge|Co{v3a!T(`E0jMGc+*Yqt^jQJl|z zAgNtFyZ5BiR=PKRxAcIom0~AeiHc5mTU^a^9=I*paTk2LR<;K(auz#2qoH*0D-=!c z-1J$6uNCRB3waRC@yL&T&X(>(2>47)>ocs%amG~yd$u7| z(E<%4j6VZBo-C;@`0pPgGjiKR|d4;IG`qg^VW zVR8Py{Oj-kJ1lFHjzPd6(2fA; + searchParams: Promise<{ case?: string }>; }) { const { id } = await params; - return ; + const { case: initialCaseId } = await searchParams; + return ( + + ); } diff --git a/frontend/src/components/batch-test/batch-case-detail-drawer.tsx b/frontend/src/components/batch-test/batch-case-detail-drawer.tsx index 91a1fee..3b9578c 100644 --- a/frontend/src/components/batch-test/batch-case-detail-drawer.tsx +++ b/frontend/src/components/batch-test/batch-case-detail-drawer.tsx @@ -11,40 +11,71 @@ import { Circle, Loader2, MessageSquareText, + Pencil, + RotateCcw, Target, TriangleAlert, + Wrench, X, } from "lucide-react"; +import { useEffect, useRef } from "react"; import { BatchCaseStatusBadge } from "@/components/batch-test/batch-case-status"; -import type { BatchRunCase } from "@/data/batch-run"; +import { Button } from "@/components/ui/button"; +import { + firstEvaluationFailureReason, + type BatchEvaluationResult, + type BatchRunCase, + type BatchToolCallRecord, + type BatchTurnResult, +} from "@/data/batch-run"; import { cn } from "@/lib/utils"; type BatchCaseDetailDrawerProps = { item: BatchRunCase; assistantName: string; onClose: () => void; + onEdit?: () => void; + onRerun?: () => void; }; export function BatchCaseDetailDrawer({ item, assistantName, onClose, + onEdit, + onRerun, }: BatchCaseDetailDrawerProps) { + const closeButtonRef = useRef(null); + const failureReason = firstEvaluationFailureReason(item); + + useEffect(() => { + closeButtonRef.current?.focus(); + }, [item.id]); + return ( -