From 45299ff69e7b048ddea8a599c2e4c26375899862 Mon Sep 17 00:00:00 2001 From: Rostyslav Hnatyshyn Date: Tue, 16 Jun 2026 21:03:21 -0700 Subject: [PATCH] hide tags that only have completed tasks unless show completed is selected --- main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 69dc3bd..4fdbf35 100644 --- a/main.js +++ b/main.js @@ -127,6 +127,7 @@ class OrgTodoListView extends ItemView { cb.addEventListener("change", () => { this.showDone = cb.checked; this.renderList(); + this.renderTagBar(); }); this.tagBarEl = root.createDiv({ cls: "org-todo-tagbar" }); @@ -224,7 +225,10 @@ class OrgTodoListView extends ItemView { // Every tag in the vault — the chip bar is a stable, complete palette. const all = new Set(); - for (const t of this.tasks) t.tags.forEach((x) => all.add(x)); + for (const t of this.tasks) { + if (!this.showDone && t.done) continue; + t.tags.forEach((x) => all.add(x)); + } // Prune active filters whose tag no longer exists (the ghost-filter fix). for (const tag of [...this.activeTags]) {