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
perf(gallery): keep the date-board predicate in a module the launchpad already loads
Josh Corbett08b58b21a653
diff --git a/invokeai/frontend/webv2/src/features/gallery/core/boardLabels.ts b/invokeai/frontend/webv2/src/features/gallery/core/boardLabels.tsindex fad96a2d85..8ba9b97735 100644--- a/invokeai/frontend/webv2/src/features/gallery/core/boardLabels.ts+++ b/invokeai/frontend/webv2/src/features/gallery/core/boardLabels.ts@@ -5,8 +5,3 @@ export type GalleryBoardTranslate = (key: string) => string;/** Resolves the localized display label for synthesized and stored boards. */export const getGalleryBoardLabel = (board: GalleryBoard, t: GalleryBoardTranslate): string =>board.kind === 'uncategorized' ? t('widgets.gallery.uncategorized') : board.name;--/** Virtual "by date" boards (`by_date:<YYYY-MM-DD>`) list items but can never receive them. */-export const DATE_BOARD_ID_PREFIX = 'by_date:';--export const isDateBoardId = (boardId: string): boolean => boardId.startsWith(DATE_BOARD_ID_PREFIX);diff --git a/invokeai/frontend/webv2/src/features/gallery/core/items.ts b/invokeai/frontend/webv2/src/features/gallery/core/items.tsindex 44fb742bad..4af3efb8cb 100644--- a/invokeai/frontend/webv2/src/features/gallery/core/items.ts+++ b/invokeai/frontend/webv2/src/features/gallery/core/items.ts@@ -286,3 +286,8 @@ export const classifyGalleryUpload = (file: Pick<File, 'name' | 'type'>): { kindreturn null;};++/** Virtual "by date" boards (`by_date:<YYYY-MM-DD>`) list items but can never receive them. */+export const DATE_BOARD_ID_PREFIX = 'by_date:';++export const isDateBoardId = (boardId: string): boolean => boardId.startsWith(DATE_BOARD_ID_PREFIX);diff --git a/invokeai/frontend/webv2/src/features/gallery/data/backend.ts b/invokeai/frontend/webv2/src/features/gallery/data/backend.tsindex 80e0b09715..bf9f8048c3 100644--- a/invokeai/frontend/webv2/src/features/gallery/data/backend.ts+++ b/invokeai/frontend/webv2/src/features/gallery/data/backend.ts@@ -19,8 +19,7 @@ import type {GalleryView,} from '@features/gallery/core/types';-import { DATE_BOARD_ID_PREFIX, isDateBoardId } from '@features/gallery/core/boardLabels';-import { parseGalleryItemKey } from '@features/gallery/core/items';+import { DATE_BOARD_ID_PREFIX, isDateBoardId, parseGalleryItemKey } from '@features/gallery/core/items';import { getExternalImageFile, getImageCluster } from '@features/gallery/core/semanticImageQuery';import { isTimestampInRange } from '@platform/search/dateTokens';import {diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/galleryStateView.ts b/invokeai/frontend/webv2/src/features/gallery/ui/galleryStateView.tsindex 4c25f72a60..5865b11e55 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/galleryStateView.ts+++ b/invokeai/frontend/webv2/src/features/gallery/ui/galleryStateView.ts@@ -1,7 +1,7 @@import type { GalleryBoard, GalleryImage, GalleryOrderDir, GalleryView } from '@features/gallery/core/types';-import { isDateBoardId } from '@features/gallery/core/boardLabels';import {+ isDateBoardId,legacyGeneratedImageToGalleryItem,toGalleryItemKey,type GalleryItem,