Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

fix(models): keep select-all honest when the filter matches nothing

joshistoast41b696dd7b5e
diff --git a/invokeai/frontend/webv2/src/features/models/ui/manager/LibraryColumn.tsx b/invokeai/frontend/webv2/src/features/models/ui/manager/LibraryColumn.tsx
index 95e129cc87..ce2ee415c4 100644
--- a/invokeai/frontend/webv2/src/features/models/ui/manager/LibraryColumn.tsx
+++ b/invokeai/frontend/webv2/src/features/models/ui/manager/LibraryColumn.tsx
@@ -193,7 +193,11 @@ export const LibraryColumn = () => {
<HStack borderBottomWidth={1} flexShrink={0} gap="2" minH="8" px="3" py="1.5">
<Checkbox.Root
aria-label={t('models.selectAll')}
- checked={hasSelection ? (hasUnselectedFiltered ? 'indeterminate' : true) : false}
+ // A filter matching nothing must not read "all selected" — with a
+ // selection held entirely out of view, indeterminate is the honest
+ // state, and the click clears it (the only act left with nothing
+ // visible to add).
+ checked={hasSelection ? (hasUnselectedFiltered || filteredKeys.length === 0 ? 'indeterminate' : true) : false}
colorPalette="accent"
disabled={!canSelectAll}
size="xs"