diff --git a/frontend/src/components/audit/FileSelectionDialog.tsx b/frontend/src/components/audit/FileSelectionDialog.tsx index 0a99204..9329261 100644 --- a/frontend/src/components/audit/FileSelectionDialog.tsx +++ b/frontend/src/components/audit/FileSelectionDialog.tsx @@ -31,6 +31,8 @@ import { RotateCcw, RefreshCw, Terminal, + ChevronsUpDown, + ChevronsDownUp, } from "lucide-react"; import { api } from "@/shared/config/database"; import { toast } from "sonner"; @@ -251,6 +253,21 @@ export default function FileSelectionDialog({ }); }, []); + const handleExpandAll = useCallback(() => { + const folders = new Set(); + filteredFiles.forEach((f) => { + const parts = f.path.split("/"); + for (let i = 1; i < parts.length; i++) { + folders.add(parts.slice(0, i).join("/")); + } + }); + setExpandedFolders(folders); + }, [filteredFiles]); + + const handleCollapseAll = useCallback(() => { + setExpandedFolders(new Set()); + }, []); + const handleSelectAll = () => { setSelectedFiles(new Set(filteredFiles.map((f) => f.path))); }; @@ -485,7 +502,7 @@ export default function FileSelectionDialog({