Fix model install queue rendering and invalidate board cache on invocation

Co-authored-by: kent <kent@invoke.ai>
This commit is contained in:
Cursor Agent
2025-07-08 18:52:22 +00:00
parent cc93fa270f
commit 34ea9456e4
2 changed files with 7 additions and 3 deletions

View File

@@ -55,9 +55,7 @@ export const ModelInstallQueue = memo(() => {
<Box layerStyle="first" p={3} borderRadius="base" w="full" h="full">
<ScrollableContent>
<Flex flexDir="column-reverse" gap="2" w="full">
{data?.map((model) => (
<ModelInstallQueueItem key={model.id} installJob={model} />
))}
{data?.map((model) => <ModelInstallQueueItem key={model.id} installJob={model} />)}
</Flex>
</ScrollableContent>
</Box>

View File

@@ -71,6 +71,12 @@ export const buildOnInvocationComplete = (getState: AppGetState, dispatch: AppDi
}
dispatch(boardsApi.util.upsertQueryEntries(entries));
// Invalidate board cache to update image counts in the UI
const boardIds = Object.keys(boardTotalAdditions);
if (boardIds.length > 0) {
dispatch(boardsApi.util.invalidateTags(boardIds.map((boardId) => ({ type: 'Board' as const, id: boardId }))));
}
/**
* Optimistic update and cache invalidation for image names queries that match this image's board and categories.
* - Optimistic update for the cache that does not have a search term (we cannot derive the correct insertion