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.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
feat(ui): sort, filter, and health signals for the pack library
joshistoastb1be72a26c93
diff --git a/invokeai/frontend/webv2/public/locales/en.json b/invokeai/frontend/webv2/public/locales/en.jsonindex 34d1dde99f..fb8709659c 100644--- a/invokeai/frontend/webv2/public/locales/en.json+++ b/invokeai/frontend/webv2/public/locales/en.json@@ -1177,6 +1177,7 @@"details": "Node Pack Details","fieldName": "Field: {{name}}","fieldType": "Type: {{type}}",+ "filterAndSort": "Filter and sort node packs","gitUrl": "Git URL","gitUrlHelp": "Paste a public Git repository URL. InvokeAI clones it into your custom nodes directory.","input": "Input",@@ -1202,6 +1203,8 @@"nodeVersion": "Version: {{version}}","nodesDirectory": "Nodes Directory","nodesInPack": "Nodes in this pack",+ "noNodesRegistered": "No nodes registered",+ "noNodesRegisteredHint": "This pack registered no nodes — reload nodes or restart InvokeAI, and check its dependencies.","noPacks": "No custom node packs","noPacksDescription": "Install from a Git URL or place packs in your custom nodes directory, then reload.","noPacksMatch": "No packs match",@@ -1213,6 +1216,7 @@"recentActivitySummary_one": "{{count}} recent activity","recentActivitySummary_other": "{{count}} recent activities","pathCopied": "Path copied",+ "problemPacksOnly": "Packs with no nodes","refreshFailed": "Refresh failed","refreshList": "Refresh pack list","reloadFailed": "Reload failed",@@ -1222,6 +1226,12 @@"searchPacks": "Search node packs","searchPacksPlaceholder": "Search packs…","selectPack": "Select a node pack",+ "sort": {+ "name": "Name",+ "nodeCount": "Node count",+ "path": "Path"+ },+ "sortBy": "Sort By","selectPackDescription": "Choose a pack from the library to see its path, manage it, and preview every node it adds.","status": "Status","trustWarning": "Custom nodes execute Python code. Only install packs from authors you trust.",diff --git a/invokeai/frontend/webv2/src/features/models/ui/manager/layoutConstants.ts b/invokeai/frontend/webv2/src/features/models/ui/manager/layoutConstants.tsindex efba7857af..0b9da7d015 100644--- a/invokeai/frontend/webv2/src/features/models/ui/manager/layoutConstants.ts+++ b/invokeai/frontend/webv2/src/features/models/ui/manager/layoutConstants.ts@@ -1,3 +1,6 @@+// Keep both values in sync with src/features/nodes/ui/manager/layoutConstants.ts —+// the two managers share their layout rhythm, but cross-feature imports are+// forbidden, so the values are duplicated by convention.export const LIBRARY_WIDTH = 'clamp(22rem, 32vw, 28rem)';// Both column headers share a min height so the library title bar lines up withdiff --git a/invokeai/frontend/webv2/src/features/nodes/core/library.test.ts b/invokeai/frontend/webv2/src/features/nodes/core/library.test.tsnew file mode 100644index 0000000000..c9a65ce2d9--- /dev/null+++ b/invokeai/frontend/webv2/src/features/nodes/core/library.test.ts@@ -0,0 +1,53 @@+import { describe, expect, it } from 'vitest';++import type { NodePackInfo } from './catalog';++import { DEFAULT_NODE_PACK_FILTERS, filterNodePacks, isProblemPack } from './library';++const pack = (name: string, nodeCount: number, path = `/custom_nodes/${name}`): NodePackInfo => ({+ name,+ nodeCount,+ nodeTypes: [],+ path,+});++const library: NodePackInfo[] = [pack('zeta-pack', 5), pack('alpha-pack', 0), pack('midway', 12, '/elsewhere/midway')];++describe('filterNodePacks', () => {+ it('searches name and path case-insensitively', () => {+ expect(+ filterNodePacks(library, { ...DEFAULT_NODE_PACK_FILTERS, searchTerm: 'ZETA' }).map((entry) => entry.name)+ ).toEqual(['zeta-pack']);+ expect(+ filterNodePacks(library, { ...DEFAULT_NODE_PACK_FILTERS, searchTerm: 'elsewhere' }).map((entry) => entry.name)+ ).toEqual(['midway']);+ });++ it('isolates problem packs', () => {+ expect(+ filterNodePacks(library, { ...DEFAULT_NODE_PACK_FILTERS, problemsOnly: true }).map((entry) => entry.name)+ ).toEqual(['alpha-pack']);+ });++ it('sorts by every field in both directions', () => {+ const names = (filters: Partial<typeof DEFAULT_NODE_PACK_FILTERS>) =>+ filterNodePacks(library, { ...DEFAULT_NODE_PACK_FILTERS, ...filters }).map((entry) => entry.name);++ expect(names({ sortField: 'name' })).toEqual(['alpha-pack', 'midway', 'zeta-pack']);+ expect(names({ sortDirection: 'desc', sortField: 'name' })).toEqual(['zeta-pack', 'midway', 'alpha-pack']);+ expect(names({ sortField: 'nodeCount' })).toEqual(['alpha-pack', 'zeta-pack', 'midway']);+ expect(names({ sortDirection: 'desc', sortField: 'nodeCount' })).toEqual(['midway', 'zeta-pack', 'alpha-pack']);+ expect(names({ sortField: 'path' })).toEqual(['alpha-pack', 'zeta-pack', 'midway']);+ });++ it('handles an empty library', () => {+ expect(filterNodePacks([], DEFAULT_NODE_PACK_FILTERS)).toEqual([]);+ });+});++describe('isProblemPack', () => {+ it('flags only zero-node packs', () => {+ expect(isProblemPack({ nodeCount: 0 })).toBe(true);+ expect(isProblemPack({ nodeCount: 3 })).toBe(false);+ });+});diff --git a/invokeai/frontend/webv2/src/features/nodes/core/library.ts b/invokeai/frontend/webv2/src/features/nodes/core/library.tsnew file mode 100644index 0000000000..8fdc74be73--- /dev/null+++ b/invokeai/frontend/webv2/src/features/nodes/core/library.ts@@ -0,0 +1,55 @@+import type { NodePackInfo } from './catalog';++/**+ * Pure filter/sort policy for the pack library, mirroring the model manager's+ * `core/library`. Kept out of the components so it is unit-testable and the+ * list stays presentational.+ */++export type NodePackSortField = 'name' | 'nodeCount' | 'path';++export interface NodePackFilters {+ searchTerm: string;+ /** Only packs that registered no nodes — import failed or a restart is pending. */+ problemsOnly: boolean;+ sortField: NodePackSortField;+ sortDirection: 'asc' | 'desc';+}++export const DEFAULT_NODE_PACK_FILTERS: NodePackFilters = {+ problemsOnly: false,+ searchTerm: '',+ sortDirection: 'asc',+ sortField: 'name',+};++/**+ * The backend derives nodeCount from the live invocation registry, so zero+ * means the pack's import failed or a reload/restart is pending — the+ * strongest health signal the catalog carries.+ */+export const isProblemPack = (pack: Pick<NodePackInfo, 'nodeCount'>): boolean => pack.nodeCount === 0;++const compareBySortField = (a: NodePackInfo, b: NodePackInfo, field: NodePackSortField): number => {+ switch (field) {+ case 'name':+ return a.name.localeCompare(b.name, undefined, { sensitivity: 'base' });+ case 'nodeCount':+ return a.nodeCount - b.nodeCount;+ case 'path':+ return a.path.localeCompare(b.path);+ }+};++export const filterNodePacks = (packs: NodePackInfo[], filters: NodePackFilters): NodePackInfo[] => {+ const query = filters.searchTerm.trim().toLowerCase();+ const directionFactor = filters.sortDirection === 'desc' ? -1 : 1;++ return packs+ .filter(+ (pack) =>+ (query === '' || pack.name.toLowerCase().includes(query) || pack.path.toLowerCase().includes(query)) &&+ (!filters.problemsOnly || isProblemPack(pack))+ )+ .sort((a, b) => compareBySortField(a, b, filters.sortField) * directionFactor);+};diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/detail/NodePackDetail.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/detail/NodePackDetail.tsxindex 52458f9cfd..7de2ef8129 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/detail/NodePackDetail.tsx+++ b/invokeai/frontend/webv2/src/features/nodes/ui/detail/NodePackDetail.tsx@@ -2,6 +2,7 @@import type { NodePackInfo } from '@features/nodes/core/catalog';import { Badge, Box, Flex, HStack, Icon, Spinner, Stack, Text } from '@chakra-ui/react';+import { isProblemPack } from '@features/nodes/core/library';import { useNodePackActions } from '@features/nodes/ui/shared/useNodePackActions';import { ensureInvocationTemplatesLoaded, useInvocationTemplatesSelector } from '@features/workflow/react';import { Button, ConfirmDialog } from '@platform/ui';@@ -49,10 +50,21 @@ export const NodePackDetail = ({ onUninstalled, pack }: { onUninstalled: () => v{pack.path}</Text><HStack gap="1.5" wrap="wrap">- <Badge colorPalette="blue" fontSize="2xs" variant="surface">- {t('nodes.nodeCount', { count: pack.nodeCount })}- </Badge>+ {isProblemPack(pack) ? (+ <Badge colorPalette="orange" fontSize="2xs" variant="surface">+ {t('nodes.noNodesRegistered')}+ </Badge>+ ) : (+ <Badge colorPalette="blue" fontSize="2xs" variant="surface">+ {t('nodes.nodeCount', { count: pack.nodeCount })}+ </Badge>+ )}</HStack>+ {isProblemPack(pack) ? (+ <Text color="fg.muted" fontSize="2xs">+ {t('nodes.noNodesRegisteredHint')}+ </Text>+ ) : null}</Stack><UninstallButton onUninstalled={onUninstalled} pack={pack} /></HStack>diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackFilterMenu.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackFilterMenu.tsxnew file mode 100644index 0000000000..fb241e6c88--- /dev/null+++ b/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackFilterMenu.tsx@@ -0,0 +1,106 @@+/* eslint-disable react-perf/jsx-no-jsx-as-prop, react-perf/jsx-no-new-function-as-prop, react-perf/jsx-no-new-object-as-prop */+import { Icon, Menu, Portal, Text } from '@chakra-ui/react';+import { DEFAULT_NODE_PACK_FILTERS, type NodePackFilters, type NodePackSortField } from '@features/nodes/core/library';+import { IconButton } from '@platform/ui/Button';+import { MenuContent } from '@platform/ui/Menu';+import { CheckIcon, SlidersHorizontalIcon } from 'lucide-react';+import { useTranslation } from 'react-i18next';++const SORT_FIELDS: readonly { field: NodePackSortField; labelKey: string }[] = [+ { field: 'name', labelKey: 'nodes.sort.name' },+ { field: 'nodeCount', labelKey: 'nodes.sort.nodeCount' },+ { field: 'path', labelKey: 'nodes.sort.path' },+];++/** Filter + sort menu for the pack library — the models filter menu's shape, scoped to pack axes. */+export const NodePackFilterMenu = ({+ filters,+ onChange,+}: {+ filters: NodePackFilters;+ onChange: (next: NodePackFilters) => void;+}) => {+ const { t } = useTranslation();+ const isActive =+ filters.problemsOnly ||+ filters.sortField !== DEFAULT_NODE_PACK_FILTERS.sortField ||+ filters.sortDirection !== DEFAULT_NODE_PACK_FILTERS.sortDirection;++ // Reselecting the active field flips direction (models menu behavior).+ const reportSort = (field: NodePackSortField) => {+ if (filters.sortField === field) {+ onChange({ ...filters, sortDirection: filters.sortDirection === 'asc' ? 'desc' : 'asc' });+ } else {+ onChange({ ...filters, sortDirection: 'asc', sortField: field });+ }+ };++ return (+ <Menu.Root closeOnSelect={false} positioning={{ placement: 'bottom-end' }}>+ <Menu.Trigger asChild>+ <IconButton+ aria-label={t('nodes.filterAndSort')}+ color={isActive ? 'accent.solid' : 'fg.muted'}+ size="xs"+ variant="outline"+ >+ <Icon as={SlidersHorizontalIcon} boxSize="4" />+ </IconButton>+ </Menu.Trigger>+ <Portal>+ <Menu.Positioner>+ <MenuContent minW="13rem">+ <Menu.ItemGroup>+ <FilterItem+ isChecked={filters.problemsOnly}+ label={t('nodes.problemPacksOnly')}+ value="problems-only"+ onSelect={() => onChange({ ...filters, problemsOnly: !filters.problemsOnly })}+ />+ </Menu.ItemGroup>+ <Menu.Separator />+ <Menu.ItemGroup>+ <Menu.ItemGroupLabel color="fg.subtle" fontSize="2xs" textTransform="uppercase">+ {t('nodes.sortBy')}+ </Menu.ItemGroupLabel>+ {SORT_FIELDS.map(({ field, labelKey }) => (+ <FilterItem+ key={field}+ isChecked={filters.sortField === field}+ label={t(labelKey)}+ trailing={filters.sortField === field ? t(`common.${filters.sortDirection}`) : undefined}+ value={field}+ onSelect={() => reportSort(field)}+ />+ ))}+ </Menu.ItemGroup>+ </MenuContent>+ </Menu.Positioner>+ </Portal>+ </Menu.Root>+ );+};++const FilterItem = ({+ isChecked,+ label,+ onSelect,+ trailing,+ value,+}: {+ isChecked: boolean;+ label: string;+ onSelect: () => void;+ trailing?: string;+ value: string;+}) => (+ <Menu.Item aria-checked={isChecked} closeOnSelect={false} role="menuitemcheckbox" value={value} onClick={onSelect}>+ <Icon as={CheckIcon} boxSize="3" opacity={isChecked ? 1 : 0} />+ <Menu.ItemText fontSize="xs">{label}</Menu.ItemText>+ {trailing ? (+ <Text color="fg.subtle" fontSize="2xs" ms="auto">+ {trailing}+ </Text>+ ) : null}+ </Menu.Item>+);diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackList.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackList.tsxindex ff6cd71192..6a1f2f6870 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackList.tsx+++ b/invokeai/frontend/webv2/src/features/nodes/ui/library/NodePackList.tsx@@ -2,15 +2,17 @@import type { NodePackInfo } from '@features/nodes/core/catalog';import { Badge, Flex, Icon, Input, InputGroup, Spinner, Stack, Text } from '@chakra-ui/react';+import { filterNodePacks, isProblemPack, type NodePackFilters } from '@features/nodes/core/library';import { refreshCustomNodePacks } from '@features/nodes/data/nodesStore';import { openNodesManagerTab } from '@features/nodes/ui/nodesUiStore';-import { Button, Row, Scrollable } from '@platform/ui';+import { Button, Row, Scrollable, Tooltip } from '@platform/ui';import { EmptyState } from '@platform/ui/EmptyState';import { ArrowRightIcon, BlocksIcon, PackageOpenIcon, SearchIcon, TriangleAlertIcon } from 'lucide-react';import { useDeferredValue, useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';import { NodePackContextMenu, type NodePackContextMenuTarget } from './NodePackContextMenu';+import { NodePackFilterMenu } from './NodePackFilterMenu';/*** Master list for the nodes manager: a search box over a scrollable column of@@ -21,34 +23,26 @@ import { NodePackContextMenu, type NodePackContextMenuTarget } from './NodePackCexport const NodePackList = ({activePackName,error,- onSearchChange,+ filters,+ onFiltersChange,onSelect,onUninstalled,packs,- searchTerm,status,}: {activePackName: string | null;error: string | null;- onSearchChange: (value: string) => void;+ filters: NodePackFilters;+ onFiltersChange: (next: NodePackFilters) => void;onSelect: (packName: string) => void;onUninstalled: (packName: string) => void;packs: NodePackInfo[];- searchTerm: string;status: 'idle' | 'loading' | 'loaded' | 'error';}) => {const { t } = useTranslation();const [contextMenuTarget, setContextMenuTarget] = useState<NodePackContextMenuTarget | null>(null);- const deferredSearchTerm = useDeferredValue(searchTerm);- const filtered = useMemo(() => {- const query = deferredSearchTerm.trim().toLowerCase();-- if (!query) {- return packs;- }-- return packs.filter((pack) => pack.name.toLowerCase().includes(query) || pack.path.toLowerCase().includes(query));- }, [deferredSearchTerm, packs]);+ const deferredFilters = useDeferredValue(filters);+ const filtered = useMemo(() => filterNodePacks(packs, deferredFilters), [deferredFilters, packs]);if (status === 'error') {return (@@ -69,15 +63,18 @@ export const NodePackList = ({return (<Stack flex="1" gap="2" minH="0" pt="3">- <InputGroup px="3" startElement={<Icon as={SearchIcon} boxSize="3.5" color="fg.subtle" />}>- <Input- aria-label={t('nodes.searchPacks')}- placeholder={t('nodes.searchPacksPlaceholder')}- size="xs"- value={searchTerm}- onChange={(event) => onSearchChange(event.currentTarget.value)}- />- </InputGroup>+ <Flex gap="1.5" px="3">+ <InputGroup startElement={<Icon as={SearchIcon} boxSize="3.5" color="fg.subtle" />}>+ <Input+ aria-label={t('nodes.searchPacks')}+ placeholder={t('nodes.searchPacksPlaceholder')}+ size="xs"+ value={filters.searchTerm}+ onChange={(event) => onFiltersChange({ ...filters, searchTerm: event.currentTarget.value })}+ />+ </InputGroup>+ <NodePackFilterMenu filters={filters} onChange={onFiltersChange} />+ </Flex><Scrollable h="full" label={t('nodes.installedPacks')} minH="0">{status === 'idle' || status === 'loading' ? (<Flex align="center" justify="center" py="10">@@ -112,6 +109,7 @@ export const NodePackList = ({key={pack.name}isActive={pack.name === activePackName}pack={pack}+ problemHint={t('nodes.noNodesRegisteredHint')}onContextMenu={(targetPack, x, y) => setContextMenuTarget({ pack: targetPack, x, y })}onSelect={() => onSelect(pack.name)}/>@@ -132,11 +130,14 @@ const PackRow = ({isActive,onContextMenu,onSelect,+ problemHint,pack,}: {isActive: boolean;onContextMenu: (pack: NodePackInfo, x: number, y: number) => void;onSelect: () => void;+ /** Tooltip for the zero-node warning badge. */+ problemHint: string;pack: NodePackInfo;}) => (<Row@@ -165,15 +166,25 @@ const PackRow = ({<Text fontSize="xs" fontWeight="600" maxW="full" truncate>{pack.name}</Text>- <Badge- colorPalette={isActive ? undefined : 'gray'}- flexShrink={0}- fontSize="2xs"- variant={isActive ? 'solid' : 'surface'}- ms="auto"- >- {pack.nodeCount}- </Badge>+ {isProblemPack(pack) ? (+ // Zero nodes is the strongest health signal the catalog carries: the+ // pack's import failed or a reload/restart is pending.+ <Tooltip content={problemHint}>+ <Badge colorPalette="orange" flexShrink={0} fontSize="2xs" ms="auto" variant="surface">+ {pack.nodeCount}+ </Badge>+ </Tooltip>+ ) : (+ <Badge+ colorPalette={isActive ? undefined : 'gray'}+ flexShrink={0}+ fontSize="2xs"+ variant={isActive ? 'solid' : 'surface'}+ ms="auto"+ >+ {pack.nodeCount}+ </Badge>+ )}</Row>);/* eslint-disable react-perf/jsx-no-jsx-as-prop, react-perf/jsx-no-new-array-as-prop, react-perf/jsx-no-new-function-as-prop, react-perf/jsx-no-new-object-as-prop */diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/manager/LibraryColumn.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/manager/LibraryColumn.tsxindex 94e80a41f2..a13edc70d6 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/manager/LibraryColumn.tsx+++ b/invokeai/frontend/webv2/src/features/nodes/ui/manager/LibraryColumn.tsx@@ -5,7 +5,7 @@ import { NodePackList } from '@features/nodes/ui/library/NodePackList';import { openNodePackDetail, updateNodesUi, useNodesUiSelector } from '@features/nodes/ui/nodesUiStore';import { useTranslation } from 'react-i18next';-import { HEADER_MIN_HEIGHT, PACK_LIBRARY_WIDTH } from './layoutConstants';+import { HEADER_MIN_HEIGHT, LIBRARY_WIDTH } from './layoutConstants';import { NodesMaintenanceMenu } from './NodesMaintenanceMenu';import { ReloadNodesButton } from './ReloadNodesButton';@@ -13,21 +13,13 @@ import { ReloadNodesButton } from './ReloadNodesButton';export const LibraryColumn = () => {const { t } = useTranslation();const activePackName = useNodesUiSelector((snapshot) => snapshot.activePackName);- const searchTerm = useNodesUiSelector((snapshot) => snapshot.searchTerm);+ const filters = useNodesUiSelector((snapshot) => snapshot.filters);const error = useCustomNodesSelector((snapshot) => snapshot.error);const nodePacks = useCustomNodesSelector((snapshot) => snapshot.nodePacks);const status = useCustomNodesSelector((snapshot) => snapshot.status);return (- <Flex- borderEndWidth={1}- direction="column"- flexShrink={0}- h="full"- minH="0"- position="relative"- w={PACK_LIBRARY_WIDTH}- >+ <Flex borderEndWidth={1} direction="column" flexShrink={0} h="full" minH="0" position="relative" w={LIBRARY_WIDTH}><HStack align="center" borderBottomWidth={1} flexShrink={0} gap="2" minH={HEADER_MIN_HEIGHT} px="3"><Text fontSize="sm" fontWeight="700">{t('nodes.nodePacks')}@@ -44,10 +36,10 @@ export const LibraryColumn = () => {<NodePackListactivePackName={activePackName}error={error}+ filters={filters}packs={nodePacks}- searchTerm={searchTerm}status={status}- onSearchChange={(value) => updateNodesUi({ searchTerm: value })}+ onFiltersChange={(next) => updateNodesUi({ filters: next })}onSelect={openNodePackDetail}onUninstalled={(packName) => {if (activePackName === packName) {diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/manager/layoutConstants.ts b/invokeai/frontend/webv2/src/features/nodes/ui/manager/layoutConstants.tsindex b2df20068d..42457dd045 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/manager/layoutConstants.ts+++ b/invokeai/frontend/webv2/src/features/nodes/ui/manager/layoutConstants.ts@@ -1,2 +1,5 @@-export const PACK_LIBRARY_WIDTH = '22rem';+// Keep both values in sync with src/features/models/ui/manager/layoutConstants.ts —+// the two managers share their layout rhythm, but cross-feature imports are+// forbidden, so the values are duplicated by convention.+export const LIBRARY_WIDTH = 'clamp(22rem, 32vw, 28rem)';export const HEADER_MIN_HEIGHT = '2.75rem';diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/nodesUiStore.ts b/invokeai/frontend/webv2/src/features/nodes/ui/nodesUiStore.tsindex e87d8b3c88..8b3516ac52 100644--- a/invokeai/frontend/webv2/src/features/nodes/ui/nodesUiStore.ts+++ b/invokeai/frontend/webv2/src/features/nodes/ui/nodesUiStore.ts@@ -1,3 +1,4 @@+import { DEFAULT_NODE_PACK_FILTERS, type NodePackFilters } from '@features/nodes/core/library';import { registerAccountOwnedResource } from '@platform/state/accountLifecycle';import { createExternalStore } from '@platform/state/externalStore';@@ -14,9 +15,9 @@ export interface NodesUiSnapshot {activeTab: NodesManagerTab;activePackName: string | null;activityExpanded: boolean;+ filters: NodePackFilters;/** Typed install source; survives the detail tabs unmounting their content. */installSource: string;- searchTerm: string;}const INITIAL_NODES_UI_SNAPSHOT: NodesUiSnapshot = {@@ -25,8 +26,8 @@ const INITIAL_NODES_UI_SNAPSHOT: NodesUiSnapshot = {activeTab: 'add',activePackName: null,activityExpanded: false,+ filters: { ...DEFAULT_NODE_PACK_FILTERS },installSource: '',- searchTerm: '',};const store = createExternalStore<NodesUiSnapshot>(INITIAL_NODES_UI_SNAPSHOT);