From 0f77caad6963ac600bf08da3a2d9c3a9f89a3fe3 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 10 Jan 2026 09:40:19 +0200 Subject: [PATCH] feat(tree): hide items dragged into a subtreeHidden --- apps/client/src/widgets/note_tree.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/client/src/widgets/note_tree.ts b/apps/client/src/widgets/note_tree.ts index 1e4866b0f..a61c454b2 100644 --- a/apps/client/src/widgets/note_tree.ts +++ b/apps/client/src/widgets/note_tree.ts @@ -758,6 +758,16 @@ export default class NoteTreeWidget extends NoteContextAwareWidget { return; } + const parentNote = froca.getNoteFromCache(branch.parentNoteId); + if (parentNote?.hasLabel("subtreeHidden")) { + const parentNode = node.getParent(); + if (parentNode) { + parentNode.setActive(true); + } + node.remove(); + return; + } + const title = `${branch.prefix ? `${branch.prefix} - ` : ""}${note.title}`; node.data.isProtected = note.isProtected;