From 4b51ba482adf2c8554f5f2697a9ae73710d9c70b Mon Sep 17 00:00:00 2001 From: amertensreplit <49614208-amertensreplit@users.noreply.replit.com> Date: Thu, 11 Jun 2026 05:04:53 +0000 Subject: [PATCH] Add collapse/expand to checked-files folder tree (Task #40) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make folder nodes in the "Geprüfte Dateien" tree on the scan report collapsible/expandable (artifacts/skillguard/src/pages/scan-report.tsx). Changes to the FilesTree component: - Track collapsed folders in a Set keyed by full folder path. - flattenFileTree now takes the collapsed set, computes each node's full path and depth, and skips children of collapsed folders. Folder rows carry a fileCount (via new countFiles helper) and a collapsed flag. - FlatFileRow became a discriminated union (file | dir) so folder rows expose path/fileCount/collapsed. - Folder rows are now ) : ( - + - {node.name} + {row.node.name} - {node.file.kind === "instruction" ? "Anweisung" : node.file.kind === "script" ? "Skript" : "Ressource"} + {row.node.file.kind === "instruction" ? "Anweisung" : row.node.file.kind === "script" ? "Skript" : "Ressource"} - {node.file.language || "-"} + {row.node.file.language || "-"} - {node.file.hash ? node.file.hash.slice(0, 12) : "-"} - {node.file.hash && ( + {row.node.file.hash ? row.node.file.hash.slice(0, 12) : "-"} + {row.node.file.hash && ( )} - {!node.file.hasContent && ( + {!row.node.file.hasContent && ( binär )} - {node.file.size} B + {row.node.file.size} B ), )