From 04b36f0563a30025f452b9ad146572ffa5063a54 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 20 Oct 2026 15:04:19 -0400 Subject: [PATCH] =?UTF-8?q?fix(filters):=20builder=20UX=20round=20one=20?= =?UTF-8?q?=E2=80=94=20incomplete=20rules,=20group=20removal,=20field=20me?= =?UTF-8?q?nu=20(user=20report)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Root bug: incomplete rules (the ready rule, every new group's first rule) were sent to the server — the live-count fetch toasted a 400 and every suggestion fetch failed silently (why author typing showed no dropdown). Fix: completedTree() prunes incomplete rules and empty groups; the count fetch skips when nothing is complete, suggestion fetches send only the other COMPLETED rules, and serialization wires only completed rules (an unfinished rule was never a filter). - Group remove button was x-show'd away on depth-0 groups — exactly where user groups live. Always visible now. - Field menu: filter input at the top (Enter prevented), no-match state; group headers restyled as flush-left tinted sticky bands with options tabbed in beneath (user's layout pick). - toast.ts: filter-count fetches join the suggestion-fetch exemption (a failed background hint never interrupts). --- templates/bookshelf.templ | 8 +++- templates/bookshelf_templ.go | 10 ++-- web/src/filter_builder.ts | 91 ++++++++++++++++++++++++++++++++---- web/src/toast.ts | 7 ++- web/static/input.css | 39 ++++++++++++++-- web/static/style.css | 2 +- 6 files changed, 134 insertions(+), 23 deletions(-) diff --git a/templates/bookshelf.templ b/templates/bookshelf.templ index cc94451d..35a56f29 100644 --- a/templates/bookshelf.templ +++ b/templates/bookshelf.templ @@ -189,7 +189,7 @@ templ BookShelf( - +