Tree mode: show all children unfiltered once a node is expanded

Filters apply to roots only — expanding a node reveals full context
regardless of child status/priority/tag/search.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 23:15:20 +00:00
parent bad1467f0f
commit 5e3e30b64c

View File

@@ -424,8 +424,8 @@ function make_entry_row(entry, children_map) {
return row; return row;
} }
function render_tree_node(entry, children_map) { function render_tree_node(entry, children_map, is_child = false) {
if (!node_or_descendants_match(entry, children_map)) { return null; } if (!is_child && !node_or_descendants_match(entry, children_map)) { return null; }
const children = children_map.get(entry.id) ?? []; const children = children_map.get(entry.id) ?? [];
const node = document.createElement('div'); const node = document.createElement('div');
@@ -436,8 +436,7 @@ function render_tree_node(entry, children_map) {
const children_el = document.createElement('div'); const children_el = document.createElement('div');
children_el.className = 'task-children'; children_el.className = 'task-children';
for (const child of children) { for (const child of children) {
const child_node = render_tree_node(child, children_map); children_el.appendChild(render_tree_node(child, children_map, true));
if (child_node) { children_el.appendChild(child_node); }
} }
node.appendChild(children_el); node.appendChild(children_el);
} }