Collapse tasks folder by default on company export page

The tasks directory is now excluded from auto-expanded top-level
directories when the export page loads, keeping the tree cleaner.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
dotta
2026-03-18 21:31:38 -05:00
parent e28bcef4ad
commit 8be868f0ab

View File

@@ -587,11 +587,11 @@ export function CompanyExport() {
if (!isTaskPath(filePath)) checked.add(filePath);
}
setCheckedFiles(checked);
// Expand top-level dirs
// Expand top-level dirs (except tasks — collapsed by default)
const tree = buildFileTree(result.files);
const topDirs = new Set<string>();
for (const node of tree) {
if (node.kind === "dir") topDirs.add(node.path);
if (node.kind === "dir" && node.name !== "tasks") topDirs.add(node.path);
}
// If URL contains a deep-linked file path, select it and expand ancestors