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
fix(gallery): preserve progress tiles and expose their status
Josh Corbett8b7379c51c97
diff --git a/invokeai/frontend/webv2/src/features/gallery/contracts.ts b/invokeai/frontend/webv2/src/features/gallery/contracts.tsindex 21e0890ad7..4695193757 100644--- a/invokeai/frontend/webv2/src/features/gallery/contracts.ts+++ b/invokeai/frontend/webv2/src/features/gallery/contracts.ts@@ -57,7 +57,6 @@ export {getGallerySelectedImagePage,getGallerySelectedImageQuery,getGallerySemanticImageQuery,- type GalleryCurrentItem,type GallerySelectedImageQuery,} from './ui/galleryStateView';export {diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryBoardsPanel.browser.test.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryBoardsPanel.browser.test.tsxindex b257010d22..0e35d5552b 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryBoardsPanel.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryBoardsPanel.browser.test.tsx@@ -73,7 +73,6 @@ const createGallery = (settings: Partial<GallerySettings> = {}): GalleryStateVieanchoredWindowPage: 0,boards,compareImageKey: null,- currentItem: null,galleryView: 'images',isComparisonActive: false,isLoading: false,diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.browser.test.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.browser.test.tsxindex 3d1b725e34..8136600bb2 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.browser.test.tsx@@ -44,6 +44,7 @@ import { GalleryWidgetContext } from './GalleryWidgetContext';import { EMPTY_GALLERY_STARRED_STRIP } from './useGalleryStarredStrip';const mocks = vi.hoisted(() => ({+ itemProgress: null as { percentage: number; message: string } | null,progressFrame: null as { dataUrl: string; width: number; height: number } | null,fetchNames: vi.fn(),measure: vi.fn(),@@ -105,7 +106,7 @@ vi.mock('react-hook-tanstack-virtual', async (importOriginal) => {});vi.mock('@features/queue/react', () => ({- useItemProgress: () => null,+ useItemProgress: () => mocks.itemProgress,useQueueItemProgressImage: () => mocks.progressFrame,}));@@ -241,7 +242,6 @@ const createGallery = (overrides: Partial<GalleryStateView> = {}): GalleryStateVanchoredWindowPage: 0,boards: [board],compareImageKey: null,- currentItem: { itemKey: 'image:first.png', kind: 'item' },galleryView: 'images',isComparisonActive: false,isLoading: false,@@ -517,6 +517,7 @@ beforeEach(() => {vi.clearAllMocks();registeredCommands.clear();currentGallery = createGallery();+ mocks.itemProgress = null;currentProgressSessions = [];currentLiveFollowEnabled = false;mocks.progressFrame = null;@@ -1418,9 +1419,9 @@ describe('shared gallery progress section', () => {{ page: 5, anchoredWindowPage: 5 },]) {await renderGallery(createGallery(boardState));- expect(host?.querySelector('button[title="Workflow A"]')).not.toBeNull();+ expect(host?.querySelector('button[title^="Workflow A ·"]')).not.toBeNull();}- await click(host!.querySelector<HTMLButtonElement>('button[title="Workflow A"]')!);+ await click(host!.querySelector<HTMLButtonElement>('button[title^="Workflow A ·"]')!);expect(followProgressSession).toHaveBeenCalledWith('run:1');expect(host?.querySelectorAll('[role="listitem"]')).toHaveLength(currentGallery.items.length);});@@ -1456,6 +1457,52 @@ describe('shared gallery progress section', () => {await renderGallery(createGallery({ settings: { ...DENSE_SETTINGS, progressSectionCollapsed: true } }));expect(tiles()).toHaveLength(0);});+ it('keeps surviving tile nodes and focus through resizing, reflow and earlier completion', async () => {+ mocks.progressFrame = {+ dataUrl: 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="64" height="64"/%3E',+ width: 64,+ height: 64,+ };+ currentProgressSessions = Array.from({ length: 6 }, (_, index) => ({+ ...session,+ id: `run:${index + 1}`,+ itemIndex: index + 1,+ label: `Slot ${index + 1}`,+ }));+ await renderGallery();+ const tile = host!.querySelector<HTMLButtonElement>('button[title^="Slot 4 ·"]')!;+ const image = tile.querySelector('img');+ expect(image).not.toBeNull();+ tile.focus();+ host!.style.width = '520px';+ await renderGallery(createGallery({ settings: { ...DENSE_SETTINGS, imageDensityPercent: 100 } }));+ expect(host!.querySelector('button[title^="Slot 4 ·"]')).toBe(tile);+ expect(tile.querySelector('img')).toBe(image);+ expect(document.activeElement).toBe(tile);+ currentProgressSessions = currentProgressSessions.slice(1);+ await renderGallery();+ expect(host!.querySelector('button[title^="Slot 4 ·"]')).toBe(tile);+ expect(tile.querySelector('img')).toBe(image);+ expect(document.activeElement).toBe(tile);+ });+ it('shows per-session progress and distinct queued and finishing indicators without captions', async () => {+ mocks.itemProgress = { percentage: 0.42, message: 'Denoising' };+ currentProgressSessions = [+ session,+ { ...session, id: 'run:2', state: 'queued' },+ { ...session, id: 'run:3', state: 'settling' },+ ];+ await renderGallery();+ const region = host!.querySelector('[aria-label="In progress"]')!;+ expect(region.querySelector('[role="progressbar"]')?.getAttribute('aria-valuenow')).toBe('42');+ expect(region.querySelector('svg[aria-label="Queued"]')).not.toBeNull();+ expect(region.querySelector('svg[aria-label="Finishing"]')).not.toBeNull();+ const finishing = region.querySelector<HTMLButtonElement>('button[aria-label$="Finishing"]')!;+ finishing.focus();+ await click(finishing);+ expect(followProgressSession).not.toHaveBeenCalled();+ expect(finishing.getAttribute('aria-disabled')).toBe('true');+ });it('updates tile spacing when density changes without changing the batch', async () => {currentProgressSessions = [session, { ...session, id: 'run:2', itemIndex: 2 }];for (const imageDensityPercent of [100, 0, 100]) {@@ -1479,7 +1526,8 @@ describe('shared gallery progress section', () => {expect(tiles[2]!.getBoundingClientRect().left).toBeCloseTo(tiles[0]!.getBoundingClientRect().left, 0);expect(tiles[0]!.disabled).toBe(false);for (const tile of [tiles[1]!, tiles[2]!]) {- expect(tile.disabled).toBe(true);+ expect(tile.getAttribute('aria-disabled')).toBe('true');+ expect(tile.disabled).toBe(false);expect(tile.textContent).toBe('');expect(tile.getAttribute('aria-label')).toContain('Queued');}@@ -1492,12 +1540,13 @@ describe('shared gallery progress section', () => {await renderGallery(createGallery({ settings: { ...DENSE_SETTINGS, progressSectionCollapsed: true } }));expect(host?.querySelector('[data-progress-disclosure]')?.getAttribute('aria-expanded')).toBe('false');await renderGallery(createGallery());- host!.querySelector<HTMLButtonElement>('button[title="Workflow A"]')!.focus();+ host!.querySelector<HTMLButtonElement>('button[title^="Workflow A ·"]')!.focus();currentProgressSessions = [];mocks.progressFrame = null;await renderGallery();expect(host?.querySelector('[data-progress-disclosure]')).toBeNull();- expect(host?.contains(document.activeElement)).toBe(true);+ expect(host?.querySelector('[aria-label="In progress"]')).toBeNull();+ expect(document.activeElement?.closest('[role="listitem"]')).not.toBeNull();});it('keeps concurrent progress separate from starred and saved items at narrow widths', async () => {await page.viewport(760, 580);diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsxindex a046274709..6ff9f6bb81 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsx@@ -35,6 +35,7 @@ import {getGalleryColumnCount,getGalleryGridRowHeightPx,getGalleryGridRowIndexForItem,+ getGalleryProgressLayout,} from './galleryGridLayout';import { GalleryProgressSection } from './GalleryProgressSection';import { GalleryThumbnailCell } from './GalleryThumbnail';@@ -177,7 +178,7 @@ export const GalleryImageGrid = () => {const columnCount = getGalleryColumnCount({ imageDensityPercent, widthPx: viewportWidth });const isFollowingLive = liveFollowEnabled && progressSessions.some((session) => session.state !== 'queued');- const isComparisonActive = gallery.isComparisonActive;+ const isComparisonActive = gallery.isComparisonActive && !isFollowingLive;const selectedBoard = gallery.boards.find((board) => board.id === gallery.selectedBoardId);const selectedBoardName = selectedBoard? getGalleryBoardLabel(selectedBoard, t)@@ -224,13 +225,14 @@ export const GalleryImageGrid = () => {const getRowKey = useCallback((index: number) => rows[index]?.key ?? index, [rows]);const getScrollElement = useCallback(() => viewportRef.current, []);- const progressHeight =- gallery.settings.showPendingItems && progressSessions.length > 0- ? GALLERY_STARRED_HEADER_HEIGHT_PX +- (gallery.settings.progressSectionCollapsed- ? 0- : Math.ceil(progressSessions.length / columnCount) * rowHeightPx + 8)- : 0;+ const progressLayout = getGalleryProgressLayout({+ columns: columnCount,+ tileSize: cellSizePx,+ sessionCount: progressSessions.length,+ visible: gallery.settings.showPendingItems,+ collapsed: gallery.settings.progressSectionCollapsed,+ });+ const progressHeight = progressLayout.height;const virtualizer = useVirtualizer({count: rowCount,scrollMargin: progressHeight,@@ -498,7 +500,7 @@ export const GalleryImageGrid = () => {<ScrollArea.Root h="full" minH="0" size="xs" variant="hover" w="full"><ScrollArea.Viewport ref={viewportRef} h="full" outline="none" w="full"><ScrollArea.Content display="flex" flexDirection="column" minH="full">- <GalleryProgressSection columns={columnCount} tileSize={cellSizePx} getScrollElement={getScrollElement} />+ <GalleryProgressSection layout={progressLayout} getScrollElement={getScrollElement} />{isEmpty ? (gallery.isLoading || hasActiveSearch || isVirtualBoard || gallery.starredOnly ? (<Flex align="center" color="fg.muted" flex="1" justify="center" minH="8rem">diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryLayout.browser.test.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryLayout.browser.test.tsxindex 80de4a88ba..366bfc1d31 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryLayout.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryLayout.browser.test.tsx@@ -66,7 +66,6 @@ const createGallery = (overrides: Partial<GalleryStateView> = {}) =>({boards: [board],compareImageKey: null,- currentItem: null,galleryView: 'images',isLoading: false,items: [createItem('a.png'), createItem('b.png')],diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryProgressSection.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryProgressSection.tsxindex 32d3b2fbed..0119938f02 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryProgressSection.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryProgressSection.tsx@@ -1,26 +1,26 @@+import type { GalleryThumbnailFit } from '@features/gallery/core/settings';import type { QueueProgressSession } from '@features/queue/contracts';-import { Box, chakra, Icon, Skeleton, Text } from '@chakra-ui/react';+import { Box, chakra, Icon, ProgressCircle, Skeleton, Text } from '@chakra-ui/react';import { getDeterminateProgressPercent } from '@features/queue/contracts';import { useItemProgress, useQueueItemProgressImage } from '@features/queue/react';import { StreamingImageFrame } from '@platform/ui/streaming-image/StreamingImageFrame';import { progressImageToStreamingSource } from '@platform/ui/streaming-image/streamingImageSource';-import { ChevronRightIcon, HourglassIcon } from 'lucide-react';-import { useCallback, useId, useRef } from 'react';+import { CheckIcon, ChevronRightIcon, HourglassIcon } from 'lucide-react';+import { useCallback, useEffectEvent, useId, useLayoutEffect, useRef } from 'react';import { useVirtualizer } from 'react-hook-tanstack-virtual';import { useTranslation } from 'react-i18next';-import { GALLERY_GRID_GAP_PX, GALLERY_STARRED_HEADER_HEIGHT_PX } from './galleryGridLayout';+import type { GalleryProgressLayout } from './galleryGridLayout';+import { useGalleryUi } from './GalleryUiContext';import { useGalleryWidget } from './GalleryWidgetContext';export const GalleryProgressSection = ({- columns,- tileSize,+ layout,getScrollElement,}: {- columns: number;- tileSize: number;+ layout: GalleryProgressLayout;getScrollElement(): HTMLDivElement | null;}) => {const { t } = useTranslation();@@ -31,8 +31,13 @@ export const GalleryProgressSection = ({const contentId = useId();const restoreFocus = useCallback(() => {const root = rootRef.current;- (root?.querySelector<HTMLButtonElement>('[data-progress-disclosure]') ?? root)?.focus({ preventScroll: true });- }, []);+ const viewport = getScrollElement();+ const target =+ root?.querySelector<HTMLButtonElement>('[data-progress-disclosure]') ??+ viewport?.querySelector<HTMLElement>('button[aria-current="true"], [role="listitem"] button, [role="button"]') ??+ viewport;+ target?.focus({ preventScroll: true });+ }, [getScrollElement]);const disclosureRef = useCallback((element: HTMLButtonElement | null) => {if (!element) {@@ -52,8 +57,12 @@ export const GalleryProgressSection = ({);const visible = showPendingItems && progressSessions.length > 0;+ if (!visible) {+ return null;+ }+return (- <Box ref={rootRef} aria-label={t('widgets.gallery.inProgress')} flexShrink={0} minW="0" role="region" tabIndex={-1}>+ <Box ref={rootRef} aria-label={t('widgets.gallery.inProgress')} flexShrink={0} minW="0" role="region">{visible ? (<><chakra.button@@ -66,7 +75,7 @@ export const GalleryProgressSection = ({focusVisibleRing="inside"data-progress-disclosuregap="1"- h={`${GALLERY_STARRED_HEADER_HEIGHT_PX}px`}+ h={`${layout.headerHeight}px`}py="0"px="1"textAlign="start"@@ -90,10 +99,9 @@ export const GalleryProgressSection = ({<Box id={contentId} hidden={progressSectionCollapsed}>{!progressSectionCollapsed ? (<GalleryProgressGrid- key={`${columns}:${tileSize}`}sessions={progressSessions}- size={tileSize}- columns={columns}+ layout={layout}+ fit={gallery.settings.thumbnailFit}getScrollElement={getScrollElement}pinnedSessionId={pinnedProgressSessionId}liveFollowEnabled={liveFollowEnabled}@@ -110,8 +118,8 @@ export const GalleryProgressSection = ({const GalleryProgressGrid = ({sessions,- size,- columns,+ layout,+ fit,getScrollElement,pinnedSessionId,liveFollowEnabled,@@ -119,52 +127,49 @@ const GalleryProgressGrid = ({restoreFocus,}: {sessions: QueueProgressSession[];- size: number;- columns: number;+ layout: GalleryProgressLayout;+ fit: GalleryThumbnailFit;getScrollElement(): HTMLDivElement | null;pinnedSessionId: string | null;liveFollowEnabled: boolean;onFollow(id: string): void;restoreFocus(): void;}) => {- const rowHeight = size + GALLERY_GRID_GAP_PX;- const rowCount = Math.ceil(sessions.length / columns);+ const { columns, tileSize, headerHeight, paddingBottom, rowCount, rowHeight } = layout;const estimateSize = useCallback(() => rowHeight, [rowHeight]);- const getItemKey = useCallback((index: number) => sessions[index * columns]!.id, [sessions, columns]);const virtualizer = useVirtualizer({count: rowCount,getScrollElement,estimateSize,- getItemKey,- scrollMargin: GALLERY_STARRED_HEADER_HEIGHT_PX,+ scrollMargin: headerHeight,overscan: 2,});+ const measure = useEffectEvent(() => virtualizer.measure());+ useLayoutEffect(() => {+ measure();+ }, [rowHeight, columns]);return (- <Box minW="0" pb="2">+ <Box minW="0" pb={`${paddingBottom}px`}><Box position="relative" h={`${virtualizer.totalSize}px`} w="full">- {virtualizer.virtualItems.map((row) => (- <Box- key={row.key}- position="absolute"- top={`${row.start - GALLERY_STARRED_HEADER_HEIGHT_PX}px`}- left="0"- display="grid"- gridTemplateColumns={`repeat(${columns}, minmax(0, 1fr))`}- gap={`${GALLERY_GRID_GAP_PX}px`}- w="full"- >- {sessions.slice(row.index * columns, (row.index + 1) * columns).map((session) => (+ {virtualizer.virtualItems.flatMap((row) =>+ sessions.slice(row.index * columns, (row.index + 1) * columns).map((session, column) => (+ <Box+ key={session.id}+ position="absolute"+ top={`${row.start - headerHeight}px`}+ left={`${column * rowHeight}px`}+ ><GalleryProgressTile- key={session.id}session={session}- size={size}+ size={tileSize}+ fit={fit}selected={liveFollowEnabled && (pinnedSessionId === null || pinnedSessionId === session.id)}onFollow={onFollow}restoreFocus={restoreFocus}/>- ))}- </Box>- ))}+ </Box>+ ))+ )}</Box></Box>);@@ -173,12 +178,14 @@ const GalleryProgressGrid = ({const GalleryProgressTile = ({session,size,+ fit,selected,onFollow,restoreFocus,}: {session: QueueProgressSession;size: number;+ fit: GalleryThumbnailFit;selected: boolean;onFollow(id: string): void;restoreFocus(): void;@@ -204,7 +211,11 @@ const GalleryProgressTile = ({: percentage !== null? `${percentage}%`: progress?.message || t('widgets.gallery.progressPreparing');- const follow = useCallback(() => onFollow(session.id), [onFollow, session.id]);+ const follow = useCallback(() => {+ if (session.state === 'running') {+ onFollow(session.id);+ }+ }, [onFollow, session.id, session.state]);const buttonRef = useCallback((element: HTMLButtonElement | null) => {if (!element) {@@ -226,7 +237,7 @@ const GalleryProgressTile = ({focusVisibleRing="inside"aria-label={`${label} · ${status}`}aria-pressed={selected && session.state !== 'queued'}- disabled={session.state === 'queued'}+ aria-disabled={session.state !== 'running'}borderColor={selected && session.state !== 'queued' ? 'accent.solid' : 'border.subtle'}borderWidth="1px"flexShrink={0}@@ -234,19 +245,41 @@ const GalleryProgressTile = ({overflow="hidden"rounded="md"textAlign="start"- title={label}+ title={`${label} · ${status}`}+ position="relative"w={`${size}px`}onClick={follow}><StreamingImageFrameaspectRatio={1}- fit="contain"+ fit={fit === 'aspect' ? 'contain' : 'cover'}liveImage={progressImageToStreamingSource(image)}shouldAntialiasLiveImage={antialiasProgressImages}w="full">- <Skeleton h="full" w="full" />+ {session.state === 'queued' ? <Box bg="bg.subtle" h="full" w="full" /> : <Skeleton h="full" w="full" />}</StreamingImageFrame>+ <Box+ position="absolute"+ bottom="1"+ right="1"+ pointerEvents="none"+ bg="bg/85"+ rounded="full"+ p="0.5"+ display="flex"+ >+ {session.state === 'running' ? (+ <ProgressCircle.Root aria-label={status} size="xs" value={percentage}>+ <ProgressCircle.Circle>+ <ProgressCircle.Track />+ <ProgressCircle.Range />+ </ProgressCircle.Circle>+ </ProgressCircle.Root>+ ) : (+ <Icon as={session.state === 'queued' ? HourglassIcon : CheckIcon} boxSize="4" aria-label={status} />+ )}+ </Box></chakra.button>);};diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GallerySelectionBar.browser.test.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GallerySelectionBar.browser.test.tsxindex 17eb3421dd..e417878fa2 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GallerySelectionBar.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GallerySelectionBar.browser.test.tsx@@ -78,7 +78,6 @@ const createGallery = (overrides: Partial<GalleryStateView> = {}): GalleryStateVcreateBoard({ id: 'by_date:2026-07-30', kind: 'date', name: '30 July' }),],compareImageKey: null,- currentItem: null,galleryView: 'images',isLoading: false,items: [createItem('a.png', false), createItem('b.png', true)],diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/galleryGridLayout.ts b/invokeai/frontend/webv2/src/features/gallery/ui/galleryGridLayout.tsindex 6b7990cc78..7ca0673166 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/galleryGridLayout.ts+++ b/invokeai/frontend/webv2/src/features/gallery/ui/galleryGridLayout.ts@@ -253,3 +253,32 @@ export const getGalleryGridRowIndexForItem = (rows: GalleryGridRow[], itemIndex:rows.findIndex((row) => row.kind === 'cells' && row.cells.some((cell) => cell.kind === 'item' && cell.itemIndex === itemIndex));++export const getGalleryProgressLayout = ({+ columns,+ tileSize,+ sessionCount,+ visible,+ collapsed,+}: {+ columns: number;+ tileSize: number;+ sessionCount: number;+ visible: boolean;+ collapsed: boolean;+}) => {+ const headerHeight = GALLERY_STARRED_HEADER_HEIGHT_PX;+ const paddingBottom = 8;+ const rowCount = Math.ceil(sessionCount / columns);+ const rowHeight = tileSize + GALLERY_GRID_GAP_PX;+ return {+ columns,+ tileSize,+ headerHeight,+ paddingBottom,+ rowCount,+ rowHeight,+ height: visible && sessionCount > 0 ? headerHeight + (collapsed ? 0 : rowCount * rowHeight + paddingBottom) : 0,+ };+};+export type GalleryProgressLayout = ReturnType<typeof getGalleryProgressLayout>;diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/galleryStateView.ts b/invokeai/frontend/webv2/src/features/gallery/ui/galleryStateView.tsindex 2734acd4d1..cccfa8b4ee 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/galleryStateView.ts+++ b/invokeai/frontend/webv2/src/features/gallery/ui/galleryStateView.ts@@ -35,8 +35,6 @@ const UNCATEGORIZED_BOARD: GalleryBoard = {videoCount: 0,};-export type GalleryCurrentItem = { kind: 'item'; itemKey: GalleryItemKey } | null;-export interface GalleryStateView {/*** Page the infinite window starts at, when a reveal has anchored it@@ -47,7 +45,6 @@ export interface GalleryStateView {anchoredWindowPage: number;boards: GalleryBoard[];compareImageKey: GalleryItemKey | null;- currentItem: GalleryCurrentItem;galleryView: GalleryView;/** A compare image is set and differs from the visible image selection. */isComparisonActive: boolean;@@ -238,9 +235,6 @@ export const getGalleryStateView = (const semanticImageQuery = getGallerySemanticImageQuery(values);const page = getGalleryPage(values);const isAnchoredInfiniteWindow = settings.paginationMode === 'infinite' && page > 0;- const currentItem: GalleryCurrentItem = visibleSelectedItemKey- ? { kind: 'item', itemKey: visibleSelectedItemKey }- : null;const selectedImageQuery = getGallerySelectedImageQuery(values);const revealTargetPage =settings.paginationMode === 'paginated' &&@@ -261,7 +255,6 @@ export const getGalleryStateView = (anchoredWindowPage: isAnchoredInfiniteWindow ? page : 0,boards,compareImageKey,- currentItem,galleryView,isComparisonActive,items,