From 85acaa0626dc096432a7db2e6831be42d2816f79 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Thu, 27 Aug 2026 10:38:13 +0200 Subject: [PATCH] ui: fix group checkbox sticking checked after disable Clicking a mixed-state group box let bits-ui optimistically flip its internal checked flag; the derived checked prop did not change across the transition (both mixed and off map to checked=false), so Svelte never applied the settled value and the check icon stuck while the count already read 0/7. Pass the parent flag as checked and the mix as indeterminate, so every group toggle changes checked; render the dash on top of a checked box for the mixed state. Assisted-by: pi --- .../ChatFormActionAdd/ChatFormActionAddSheet.svelte | 2 +- .../ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte | 2 +- tools/ui/src/lib/components/ui/checkbox/checkbox.svelte | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddSheet.svelte b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddSheet.svelte index 5fcacf4b85..3b665143d7 100644 --- a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddSheet.svelte +++ b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddSheet.svelte @@ -276,7 +276,7 @@ toolsPanel.toggleGroupByKey(group.key)} diff --git a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte index 89c05d17a8..f495441714 100644 --- a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte +++ b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte @@ -120,7 +120,7 @@ {#snippet child({ props })} toolsPanel.toggleGroupByKey(group.key)} diff --git a/tools/ui/src/lib/components/ui/checkbox/checkbox.svelte b/tools/ui/src/lib/components/ui/checkbox/checkbox.svelte index ec6d28826e..60ef646fc4 100644 --- a/tools/ui/src/lib/components/ui/checkbox/checkbox.svelte +++ b/tools/ui/src/lib/components/ui/checkbox/checkbox.svelte @@ -26,10 +26,10 @@ > {#snippet children({ checked, indeterminate })}
- {#if checked} - - {:else if indeterminate} + {#if indeterminate} + {:else if checked} + {/if}
{/snippet}