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(webv2): don't error-toast video board attach for virtual destinations

Lincoln Stein3c2af13ad695
diff --git a/invokeai/frontend/webv2/performance/architecture-baseline.json b/invokeai/frontend/webv2/performance/architecture-baseline.json
index 16825e6173..381cedb0df 100644
--- a/invokeai/frontend/webv2/performance/architecture-baseline.json
+++ b/invokeai/frontend/webv2/performance/architecture-baseline.json
@@ -305,7 +305,7 @@
"initialRawBytes": 2500067,
"largestAssetRawBytes": 746314,
"otherAssetRawBytes": 0,
- "ownedRawBytes": 106089,
+ "ownedRawBytes": 106186,
"requestCount": 85,
"scriptRequestCount": 69,
"sourceOwners": [
@@ -821,7 +821,7 @@
"initialRawBytes": 2525068,
"largestAssetRawBytes": 753778,
"otherAssetRawBytes": 0,
- "ownedRawBytes": 106089,
+ "ownedRawBytes": 106186,
"requestCount": 85,
"scriptRequestCount": 69
},
diff --git a/invokeai/frontend/webv2/src/app/QueueRuntimeAdapter.tsx b/invokeai/frontend/webv2/src/app/QueueRuntimeAdapter.tsx
index 02d3d729b9..8e5221dce0 100644
--- a/invokeai/frontend/webv2/src/app/QueueRuntimeAdapter.tsx
+++ b/invokeai/frontend/webv2/src/app/QueueRuntimeAdapter.tsx
@@ -29,7 +29,14 @@ export const QueueRuntimeAdapter = () => {
},
addVideosToGalleryBoard: async (boardId, videoNames) => {
assertAccountScopeCurrent(owner);
- const { galleryItemOrganization } = await import('@features/gallery');
+ const { galleryItemOrganization, isGalleryBoardAttachable } = await import('@features/gallery');
+
+ // Virtual destinations (date buckets, `generated`/`assets`) cannot hold
+ // attachments: the transport no-ops for them, which would otherwise read
+ // back as every video failing. The image path ignores this the same way.
+ if (!isGalleryBoardAttachable(boardId)) {
+ return;
+ }
assertAccountScopeCurrent(owner);
const result = await galleryItemOrganization.moveToBoard(
diff --git a/invokeai/frontend/webv2/src/features/gallery/data/backend.ts b/invokeai/frontend/webv2/src/features/gallery/data/backend.ts
index 6a220b3ffe..5b25426f77 100644
--- a/invokeai/frontend/webv2/src/features/gallery/data/backend.ts
+++ b/invokeai/frontend/webv2/src/features/gallery/data/backend.ts
@@ -1032,7 +1032,7 @@ const emptyGalleryItemOrganizationTransportResult = (): GalleryItemOrganizationT
succeededNames: [],
});
-const isInvalidGalleryBoardDestination = (boardId: string): boolean =>
+export const isInvalidGalleryBoardDestination = (boardId: string): boolean =>
boardId === 'generated' || boardId === 'assets' || isDateBoardId(boardId);
export const addGalleryImageItemsToBoard = async (
diff --git a/invokeai/frontend/webv2/src/features/gallery/data/organization.test.ts b/invokeai/frontend/webv2/src/features/gallery/data/organization.test.ts
index 89f00c45b5..e8f5c12ee6 100644
--- a/invokeai/frontend/webv2/src/features/gallery/data/organization.test.ts
+++ b/invokeai/frontend/webv2/src/features/gallery/data/organization.test.ts
@@ -1,6 +1,6 @@
import type { GalleryItemRef } from '@features/gallery/core/items';
-import { galleryItemOrganization } from '@features/gallery/index';
+import { galleryItemOrganization, isGalleryBoardAttachable } from '@features/gallery/index';
import { accountLifecycle } from '@platform/state/accountLifecycle';
import { beforeEach, describe, expect, it, vi } from 'vitest';
@@ -535,4 +535,26 @@ describe('galleryItemOrganization transport and confirmed outcomes', () => {
});
expect(mocks.apiFetchJson).not.toHaveBeenCalled();
});
+
+ it.each(['by_date:2026-08-14', 'generated', 'assets'])(
+ 'reports every ref as failed when moving to the virtual board %s',
+ async (boardId) => {
+ await expect(galleryItemOrganization.moveToBoard([videoRef('clip.mp4')], boardId)).resolves.toEqual({
+ affectedBoardIds: [],
+ failed: [videoRef('clip.mp4')],
+ succeeded: [],
+ });
+ expect(mocks.apiFetchJson).not.toHaveBeenCalled();
+ }
+ );
+});
+
+describe('isGalleryBoardAttachable', () => {
+ it.each(['by_date:2026-08-14', 'generated', 'assets', 'none'])('rejects the virtual destination %s', (boardId) => {
+ expect(isGalleryBoardAttachable(boardId)).toBe(false);
+ });
+
+ it.each(['board-1', 'some-uuid'])('accepts the real board %s', (boardId) => {
+ expect(isGalleryBoardAttachable(boardId)).toBe(true);
+ });
});
diff --git a/invokeai/frontend/webv2/src/features/gallery/index.ts b/invokeai/frontend/webv2/src/features/gallery/index.ts
index 154cf09f49..1958787cb4 100644
--- a/invokeai/frontend/webv2/src/features/gallery/index.ts
+++ b/invokeai/frontend/webv2/src/features/gallery/index.ts
@@ -50,6 +50,7 @@ import {
getGalleryVideoMetadata,
getGalleryVideoWorkflow,
isDateBoardId,
+ isInvalidGalleryBoardDestination,
listGalleryBoards,
makeImageCanvasAsset,
makeImageDurable,
@@ -251,3 +252,11 @@ export const galleryDestinations = {
} as const;
export const isGalleryVirtualBoard = isDateBoardId;
+
+/**
+ * Whether a board id can actually receive item attachments. Virtual destinations
+ * (date buckets, `generated`/`assets`) and `none` cannot: the organization
+ * transports no-op for them rather than calling the backend.
+ */
+export const isGalleryBoardAttachable = (boardId: string): boolean =>
+ boardId !== 'none' && !isInvalidGalleryBoardDestination(boardId);