From 9c3b3a41047b74d4dc0e63de48e9180191748947 Mon Sep 17 00:00:00 2001 From: DhanushSantosh Date: Sat, 17 Jan 2026 20:32:10 +0530 Subject: [PATCH] fix: make dynamic models select-all checkbox respect search filters The "Select all" checkbox for dynamic models was using the unfiltered models list, causing the checkbox state to not reflect what users see when searching. Now it correctly operates on the filtered models list so: - Checkbox state matches the visible filtered models - "Select all" only toggles models the user can see - Indeterminate state shows if some filtered models are selected This ensures the checkbox has a meaningful purpose when filtering/searching models. Co-Authored-By: Claude Haiku 4.5 --- .../providers/opencode-model-configuration.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/ui/src/components/views/settings-view/providers/opencode-model-configuration.tsx b/apps/ui/src/components/views/settings-view/providers/opencode-model-configuration.tsx index a2b11381..3d2d0fb6 100644 --- a/apps/ui/src/components/views/settings-view/providers/opencode-model-configuration.tsx +++ b/apps/ui/src/components/views/settings-view/providers/opencode-model-configuration.tsx @@ -611,16 +611,16 @@ export function OpencodeModelConfiguration({ Dynamic - {models.length > 0 && ( + {filteredModels.length > 0 && (
model.id), + filteredModels.map((model) => model.id), enabledDynamicModelIds )} onCheckedChange={(checked) => toggleProviderDynamicModels( - models.map((model) => model.id), + filteredModels.map((model) => model.id), checked ) }