From b520daf9a719123745de7b5558f0828deffbdbf9 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Thu, 27 Aug 2026 09:50:58 +0200 Subject: [PATCH] ui: let indeterminate state win over checked in group checkboxes The checkbox indicator snippet renders the check icon whenever checked, so the mixed state never showed. Pass the checked prop as false while indeterminate. Assisted-by: pi --- .../ChatFormActionAdd/ChatFormActionAddSheet.svelte | 2 +- .../ChatFormActionAdd/ChatFormActionAddToolsSubmenu.svelte | 4 ++-- 2 files changed, 3 insertions(+), 3 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 c78b42ea88..6b4f12376f 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 @@ -281,7 +281,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 b6e539b345..6f32ad0920 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 @@ -79,7 +79,7 @@ {@const isExpanded = toolsPanel.expandedGroups.has(group.key)} {@const checked = toolsPanel.isGroupChecked(group)} {@const enabledCount = toolsPanel.getEnabledToolCount(group)} - // parent on but nothing under it enabled, or partially enabled: show mixed state + {@const indeterminate = group.tools.length > 0 && (enabledCount === 0 ? checked : enabledCount < group.tools.length)} {@const favicon = toolsPanel.getFavicon(group)} @@ -124,7 +124,7 @@ {#snippet child({ props })} toolsPanel.toggleGroupByKey(group.key)}