From 655aedbd2e43e590987f590568eb0ad372346071 Mon Sep 17 00:00:00 2001 From: Aaron Axvig Date: Thu, 2 Apr 2026 15:42:13 -0500 Subject: [PATCH] Start with tree collapsed --- web/js/tree.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/web/js/tree.js b/web/js/tree.js index 97d4fce..c00aed5 100644 --- a/web/js/tree.js +++ b/web/js/tree.js @@ -121,7 +121,7 @@ function createTreeNode(name, value, path) { childrenContainer.appendChild(childNode); }); - if (shouldStartCollapsed(name, value)) { + if (shouldStartCollapsed(value)) { childrenContainer.classList.add('collapsed'); toggle.textContent = '▶'; } @@ -150,22 +150,13 @@ function createTreeNode(name, value, path) { return container; } -function shouldStartCollapsed(name, value) { +function shouldStartCollapsed(value) { if (!value || typeof value !== 'object') { return false; } const childKeys = Object.keys(value).filter(key => key !== 'addressed' && key !== 'known'); - if (childKeys.length === 0) { - return false; - } - - const hotfixChildren = childKeys.filter(key => { - const match = key.match(/^(.*)-h\d+$/i); - return match && match[1] === name; - }); - - return hotfixChildren.length > 0; + return childKeys.length > 0; } function dedupeFileRefs(fileRefs) {