From d113815403ef21b571ac0360813d1c2abde04905 Mon Sep 17 00:00:00 2001 From: Marko Djordjevic Date: Wed, 18 Feb 2026 20:28:46 +0100 Subject: [PATCH] code-review-fix task 10.3: add confirmation dialog before delete-all annotations --- src/app/page.tsx | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 36aa872..8033210 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -11,6 +11,15 @@ import TalibPatternPanel from '@/components/TalibPatternPanel'; import TrainingPanel from '@/components/TrainingPanel'; import { ThemeToggle } from '@/components/ThemeToggle'; import KeyboardShortcutsModal from '@/components/KeyboardShortcutsModal'; +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, + DialogDescription, + DialogFooter, + DialogClose, +} from '@/components/ui/dialog'; import { useTheme } from 'next-themes'; import { Settings, Tag, Layers } from 'lucide-react'; import type { PredictionState, PredictionSpan, PerCandlePrediction, ModelInfoResponse, Disagreement, DisagreementType, PredictionSummary } from '@/types/predictions'; @@ -195,6 +204,7 @@ export default function Home() { // Disagreement filter state const [showOnlyDisagreements, setShowOnlyDisagreements] = useState(false); + const [deleteAllDialogOpen, setDeleteAllDialogOpen] = useState(false); // Fetch charts list const fetchCharts = useCallback(async () => { @@ -877,7 +887,7 @@ export default function Home() { {/* Delete all annotations */}
+ {/* Confirmation dialog for delete-all annotations */} + + + + Delete All Annotations + + This will permanently delete all span and label annotations for the current chart. + This action cannot be undone. + + + + + + + + + + + {/* Export */}