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.

feat(ui): add a built-in Video layout preset

Lincoln Stein9bfd0f4357de
diff --git a/invokeai/frontend/webv2/performance/architecture-baseline.json b/invokeai/frontend/webv2/performance/architecture-baseline.json
index f94c80c4b1..fc41f1298c 100644
--- a/invokeai/frontend/webv2/performance/architecture-baseline.json
+++ b/invokeai/frontend/webv2/performance/architecture-baseline.json
@@ -10,7 +10,7 @@
"initialRawBytes": 1947147,
"largestAssetRawBytes": 746355,
"otherAssetRawBytes": 0,
- "ownedRawBytes": 69114,
+ "ownedRawBytes": 69121,
"requestCount": 41,
"scriptRequestCount": 25,
"sourceOwners": [
@@ -295,7 +295,7 @@
"initialRawBytes": 1966619,
"largestAssetRawBytes": 753819,
"otherAssetRawBytes": 0,
- "ownedRawBytes": 69114,
+ "ownedRawBytes": 69121,
"requestCount": 41,
"scriptRequestCount": 25
},
diff --git a/invokeai/frontend/webv2/src/workbench/hotkeys/catalog.test.ts b/invokeai/frontend/webv2/src/workbench/hotkeys/catalog.test.ts
index cf1f857846..194fb5b108 100644
--- a/invokeai/frontend/webv2/src/workbench/hotkeys/catalog.test.ts
+++ b/invokeai/frontend/webv2/src/workbench/hotkeys/catalog.test.ts
@@ -6,9 +6,9 @@ describe('firstPartyHotkeyCatalog', () => {
it('keeps legacy default hotkey parity', () => {
// 91 legacy-parity entries + `canvas.newSession` (webv2 new-canvas command,
// no default keys — Task 46) + `app.openCommandPalette` (webv2-only, mod+k)
- // + the six top-bar redesign commands (alt+mod+enter, mod+p, an unbound save,
- // and alt+1..3) + `app.openSettings` (mod+,).
- expect(firstPartyHotkeyCatalog).toHaveLength(100);
+ // + the seven top-bar redesign commands (alt+mod+enter, mod+p, an unbound
+ // save, and alt+1..4) + `app.openSettings` (mod+,).
+ expect(firstPartyHotkeyCatalog).toHaveLength(101);
expect(firstPartyHotkeyCatalog.map((hotkey) => hotkey.id)).toContain('app.invoke');
expect(firstPartyHotkeyCatalog.map((hotkey) => hotkey.id)).toContain('app.openCommandPalette');
expect(firstPartyHotkeyCatalog.map((hotkey) => hotkey.id)).toContain('canvas.mergeDown');
@@ -21,6 +21,7 @@ describe('firstPartyHotkeyCatalog', () => {
expect(firstPartyHotkeyCatalog.map((hotkey) => hotkey.id)).toContain('app.openProjectSwitcher');
expect(firstPartyHotkeyCatalog.map((hotkey) => hotkey.id)).toContain('app.saveLayoutPreset');
expect(firstPartyHotkeyCatalog.map((hotkey) => hotkey.id)).toContain('app.selectComposePreset');
+ expect(firstPartyHotkeyCatalog.map((hotkey) => hotkey.id)).toContain('app.selectVideoPreset');
});
it('uses the exported command-palette definition as the catalog entry', () => {
diff --git a/invokeai/frontend/webv2/src/workbench/hotkeys/catalog.ts b/invokeai/frontend/webv2/src/workbench/hotkeys/catalog.ts
index 9a6219a105..51d172c157 100644
--- a/invokeai/frontend/webv2/src/workbench/hotkeys/catalog.ts
+++ b/invokeai/frontend/webv2/src/workbench/hotkeys/catalog.ts
@@ -31,6 +31,7 @@ const implemented = new Set([
'app.selectGenerateTab',
'app.selectModelsTab',
'app.selectQueueTab',
+ 'app.selectVideoPreset',
'app.selectWorkflowsTab',
'app.toggleLeftPanel',
'app.togglePanels',
@@ -152,7 +153,8 @@ export const firstPartyHotkeyCatalog: HotkeyDefinition[] = [
hotkey('app', 'saveLayoutPreset', []),
hotkey('app', 'selectComposePreset', ['alt+1']),
hotkey('app', 'selectEditPreset', ['alt+2']),
- hotkey('app', 'selectAutomatePreset', ['alt+3']),
+ hotkey('app', 'selectVideoPreset', ['alt+3']),
+ hotkey('app', 'selectAutomatePreset', ['alt+4']),
hotkey('app', 'cancelQueueItem', ['shift+x']),
hotkey('app', 'clearQueue', ['mod+shift+x']),
hotkey('app', 'selectGenerateTab', ['1']),
diff --git a/invokeai/frontend/webv2/src/workbench/launchpad/intents.ts b/invokeai/frontend/webv2/src/workbench/launchpad/intents.ts
index e53e049d3e..96a5511fa2 100644
--- a/invokeai/frontend/webv2/src/workbench/launchpad/intents.ts
+++ b/invokeai/frontend/webv2/src/workbench/launchpad/intents.ts
@@ -40,7 +40,7 @@ const INTENTS: Record<LaunchpadIntentId, LaunchpadIntent> = {
canvas: { id: 'canvas', presetId: 'edit', sourceId: 'canvas' },
generate: { id: 'generate', presetId: 'compose', sourceId: 'generate' },
upscale: { id: 'upscale', presetId: 'compose', sourceId: 'upscale' },
- video: { id: 'video', presetId: 'compose', sourceId: 'video' },
+ video: { id: 'video', presetId: 'video', sourceId: 'video' },
workflow: { id: 'workflow', presetId: 'automate', sourceId: 'workflow' },
};
@@ -52,12 +52,12 @@ export const isLaunchpadIntentId = (value: unknown): value is LaunchpadIntentId
* presets live in the account state that only the mounted workbench holds, and
* the Launchpad renders outside that provider.
*/
-export const LAUNCHPAD_LAYOUT_IDS: readonly BuiltInLayoutPresetId[] = ['compose', 'edit', 'automate'];
+export const LAUNCHPAD_LAYOUT_IDS: readonly BuiltInLayoutPresetId[] = ['compose', 'edit', 'video', 'automate'];
/**
* Display names for the built-in arrangements, kept here rather than read off
* `layoutPresets` so the Launchpad can name them without pulling that table —
- * which carries three full widget-region snapshots — onto its route chunk.
+ * which carries a full widget-region snapshot per preset — onto its route chunk.
* `layoutPresets` builds its own labels from this map, so there is still one
* definition.
*/
@@ -65,6 +65,7 @@ export const BUILT_IN_LAYOUT_PRESET_LABELS: Record<BuiltInLayoutPresetId, string
automate: 'Automate',
compose: 'Compose',
edit: 'Edit',
+ video: 'Video',
};
export const isLaunchpadLayoutId = (value: unknown): value is BuiltInLayoutPresetId =>
diff --git a/invokeai/frontend/webv2/src/workbench/launchpad/projects/NewProjectButton.tsx b/invokeai/frontend/webv2/src/workbench/launchpad/projects/NewProjectButton.tsx
index b879ae4132..7079678e68 100644
--- a/invokeai/frontend/webv2/src/workbench/launchpad/projects/NewProjectButton.tsx
+++ b/invokeai/frontend/webv2/src/workbench/launchpad/projects/NewProjectButton.tsx
@@ -9,7 +9,7 @@ import { Group } from '@platform/ui/Group';
import { MenuContent } from '@platform/ui/Menu';
import { Link } from '@tanstack/react-router';
import { BUILT_IN_LAYOUT_PRESET_LABELS, LAUNCHPAD_LAYOUT_IDS } from '@workbench/launchpad/intents';
-import { ChevronDownIcon, LayersIcon, PlusIcon, TypeIcon, WorkflowIcon } from 'lucide-react';
+import { ChevronDownIcon, ClapperboardIcon, LayersIcon, PlusIcon, TypeIcon, WorkflowIcon } from 'lucide-react';
import { useTranslation } from 'react-i18next';
/**
@@ -17,14 +17,14 @@ import { useTranslation } from 'react-i18next';
*
* The plain click keeps the old behaviour — a draft in whatever preset the
* account last used — because most of the time the arrangement is not the
- * decision being made. The caret is for when it is: it names the three shipped
+ * decision being made. The caret is for when it is: it names the shipped
* layouts so starting from "Edit" does not mean opening a draft and then
* rearranging it.
*
* Labels come from the shared id/label map that `layoutPresets` also builds
* from, so the menu and the editor's preset strip cannot disagree about what a
* layout is called — without the Launchpad having to load the preset table's
- * three full widget-region snapshots. Icons are mapped locally for the same
+ * full widget-region snapshots. Icons are mapped locally for the same
* reason: `resolveLayoutPresetIcon` exists for the custom-preset picker and
* carries its whole curated catalogue.
*/
@@ -36,6 +36,7 @@ const LAYOUT_ICONS: Record<BuiltInLayoutPresetId, LucideIcon> = {
automate: WorkflowIcon,
compose: TypeIcon,
edit: LayersIcon,
+ video: ClapperboardIcon,
};
interface NewProjectLayoutItem {
diff --git a/invokeai/frontend/webv2/src/workbench/layoutContracts.ts b/invokeai/frontend/webv2/src/workbench/layoutContracts.ts
index 3eb72ee686..1b0bad985f 100644
--- a/invokeai/frontend/webv2/src/workbench/layoutContracts.ts
+++ b/invokeai/frontend/webv2/src/workbench/layoutContracts.ts
@@ -2,12 +2,12 @@ import type { InvocationSourceId, ResultDestination } from './invocationContract
import type { WidgetInstanceId, WidgetTypeId } from './widgetContracts';
/**
- * The three shipped layout presets. A preset names an *arrangement*, never a
+ * The shipped layout presets. A preset names an *arrangement*, never a
* widget — `edit` opens Canvas but is not "the Canvas view", and a preset may
* have several graph widgets open at once. Source resolution is a separate
* concern (see `graphWidgets.ts`).
*/
-export type BuiltInLayoutPresetId = 'compose' | 'edit' | 'automate';
+export type BuiltInLayoutPresetId = 'compose' | 'edit' | 'automate' | 'video';
export type LayoutPresetId = BuiltInLayoutPresetId | (string & {});
diff --git a/invokeai/frontend/webv2/src/workbench/layoutPresetCollection.test.ts b/invokeai/frontend/webv2/src/workbench/layoutPresetCollection.test.ts
index 5a6fe10164..119e7b2f7f 100644
--- a/invokeai/frontend/webv2/src/workbench/layoutPresetCollection.test.ts
+++ b/invokeai/frontend/webv2/src/workbench/layoutPresetCollection.test.ts
@@ -15,25 +15,61 @@ const customPreset: LayoutPreset = {
const account: AccountState = {
activeLayoutPresetId: 'compose',
customLayoutPresets: [customPreset],
- layoutPresetOrder: ['custom-1', 'compose', 'edit', 'automate'],
+ layoutPresetOrder: ['custom-1', 'compose', 'edit', 'video', 'automate'],
};
describe('layout preset collection', () => {
- it('drops stale and duplicate ids before appending missing presets', () => {
+ it('drops stale and duplicate ids before slotting in missing presets', () => {
expect(normalizeLayoutPresetOrder(['automate', 'bogus', 'automate'], [...layoutPresets, customPreset])).toEqual([
- 'automate',
'compose',
'edit',
+ 'video',
+ 'automate',
'custom-1',
]);
});
+ it('slots a newly shipped built-in beside its neighbour instead of appending it', () => {
+ // The order every account persisted before Video shipped. Appending would
+ // pin Video to the end of the strip for all of them.
+ expect(normalizeLayoutPresetOrder(['compose', 'edit', 'automate'], layoutPresets)).toEqual([
+ 'compose',
+ 'edit',
+ 'video',
+ 'automate',
+ ]);
+ });
+
+ it('leaves a reordered strip reordered when it slots one in', () => {
+ expect(
+ normalizeLayoutPresetOrder(['custom-1', 'compose', 'edit', 'automate'], [...layoutPresets, customPreset])
+ ).toEqual(['custom-1', 'compose', 'edit', 'video', 'automate']);
+ });
+
+ it('still appends a custom preset the order has never seen', () => {
+ expect(
+ normalizeLayoutPresetOrder(['compose', 'edit', 'video', 'automate'], [...layoutPresets, customPreset])
+ ).toEqual(['compose', 'edit', 'video', 'automate', 'custom-1']);
+ });
+
it('resolves built-in and custom presets through the account order', () => {
- expect(getOrderedLayoutPresets(account).map(({ id }) => id)).toEqual(['custom-1', 'compose', 'edit', 'automate']);
+ expect(getOrderedLayoutPresets(account).map(({ id }) => id)).toEqual([
+ 'custom-1',
+ 'compose',
+ 'edit',
+ 'video',
+ 'automate',
+ ]);
});
it('moves a preset relative to the drop target without losing ids', () => {
- expect(reorderLayoutPresetIds(account, 'compose', 'automate')).toEqual(['custom-1', 'edit', 'automate', 'compose']);
+ expect(reorderLayoutPresetIds(account, 'compose', 'automate')).toEqual([
+ 'custom-1',
+ 'edit',
+ 'video',
+ 'automate',
+ 'compose',
+ ]);
});
it('returns null for invalid and unchanged moves', () => {
diff --git a/invokeai/frontend/webv2/src/workbench/layoutPresetCollection.ts b/invokeai/frontend/webv2/src/workbench/layoutPresetCollection.ts
index aeeaa54679..129ad9f86e 100644
--- a/invokeai/frontend/webv2/src/workbench/layoutPresetCollection.ts
+++ b/invokeai/frontend/webv2/src/workbench/layoutPresetCollection.ts
@@ -4,6 +4,19 @@ import type { AccountState } from './projectContracts';
import { layoutPresets } from './layoutPresets';
import { resolveSavedLayoutPreset } from './layoutPresetSnapshots';
+/**
+ * The account's saved order, with anything it has never seen slotted in.
+ *
+ * A preset the order has never recorded is placed next to its canonical
+ * neighbour rather than appended. Appending looks the same on a fresh account —
+ * nothing is stored, so every preset is "new" and they land in `presets` order
+ * — but it is wrong the moment a *shipped* preset is added later: every
+ * existing account would pin it to the end of the strip no matter where the
+ * built-in list puts it, and there is no schema version to hang a migration on.
+ *
+ * The saved order still wins for everything it does name: ids already stored
+ * keep their relative positions, so a dragged tab stays dragged.
+ */
export const normalizeLayoutPresetOrder = (value: unknown, presets: readonly LayoutPreset[]): LayoutPresetId[] => {
const knownIds = new Set(presets.map(({ id }) => id));
const seenIds = new Set<LayoutPresetId>();
@@ -18,12 +31,27 @@ export const normalizeLayoutPresetOrder = (value: unknown, presets: readonly Lay
}
}
- for (const { id } of presets) {
- if (!seenIds.has(id)) {
- orderedIds.push(id);
- seenIds.add(id);
+ presets.forEach(({ id }, presetIndex) => {
+ if (seenIds.has(id)) {
+ return;
}
- }
+
+ // The nearest preset that canonically precedes this one and is already
+ // placed. Nothing before it means it belongs at the front.
+ let insertAt = 0;
+
+ for (let index = presetIndex - 1; index >= 0; index -= 1) {
+ const precedingIndex = orderedIds.indexOf(presets[index]!.id);
+
+ if (precedingIndex >= 0) {
+ insertAt = precedingIndex + 1;
+ break;
+ }
+ }
+
+ orderedIds.splice(insertAt, 0, id);
+ seenIds.add(id);
+ });
return orderedIds;
};
diff --git a/invokeai/frontend/webv2/src/workbench/layoutPresets.test.ts b/invokeai/frontend/webv2/src/workbench/layoutPresets.test.ts
index 8e1a0e8acd..af7bf06008 100644
--- a/invokeai/frontend/webv2/src/workbench/layoutPresets.test.ts
+++ b/invokeai/frontend/webv2/src/workbench/layoutPresets.test.ts
@@ -32,6 +32,14 @@ describe('built-in layout preset descriptors', () => {
},
{
defaultKeys: ['alt+3'],
+ defaultRoute: { destination: 'gallery', sourceId: 'video' },
+ hotkeyId: 'selectVideoPreset',
+ iconId: 'clapperboard',
+ label: 'Video',
+ presetId: 'video',
+ },
+ {
+ defaultKeys: ['alt+4'],
defaultRoute: { destination: 'gallery', sourceId: 'workflow' },
hotkeyId: 'selectAutomatePreset',
iconId: 'workflow',
@@ -91,6 +99,16 @@ describe('built-in layout preset descriptors', () => {
panels: { isBottomOpen: false, isLeftOpen: true, isRightOpen: true },
right: ['layers', 'preview', 'gallery', 'image-map', 'queue'],
},
+ video: {
+ active: { bottom: 'gallery:bottom', center: 'preview', left: 'video', right: 'gallery' },
+ bottom: ['server-status', 'queue-status', 'gallery:bottom', 'notifications', 'autosave-status'],
+ center: ['preview'],
+ // Video leads the rail; Generate and Upscale stay behind it so a still
+ // can be set up without leaving the arrangement.
+ left: ['video', 'generate', 'upscale'],
+ panels: { isBottomOpen: false, isLeftOpen: true, isRightOpen: true },
+ right: ['gallery', 'image-map', 'queue'],
+ },
});
});
});
diff --git a/invokeai/frontend/webv2/src/workbench/layoutPresets.ts b/invokeai/frontend/webv2/src/workbench/layoutPresets.ts
index 88c3b70522..c9f8d13470 100644
--- a/invokeai/frontend/webv2/src/workbench/layoutPresets.ts
+++ b/invokeai/frontend/webv2/src/workbench/layoutPresets.ts
@@ -140,9 +140,9 @@ const createPresetDescriptor = ({
});
/**
- * The three shipped presets. Each combines an arrangement with an editable
- * default route. The route is explicit preset data rather than something
- * inferred from whichever graph widgets happen to be placed in the layout.
+ * The shipped presets. Each combines an arrangement with an editable default
+ * route. The route is explicit preset data rather than something inferred from
+ * whichever graph widgets happen to be placed in the layout.
*/
export const builtInLayoutPresetDescriptors: BuiltInLayoutPresetDescriptor[] = [
createPresetDescriptor({
@@ -218,8 +218,43 @@ export const builtInLayoutPresetDescriptors: BuiltInLayoutPresetDescriptor[] = [
},
}),
createPresetDescriptor({
- centerViewId: 'workflow',
+ centerViewId: 'preview',
defaultKeys: ['alt+3'],
+ defaultRoute: { destination: 'gallery', sourceId: 'video' },
+ hotkeyId: 'selectVideoPreset',
+ id: 'video',
+ iconId: 'clapperboard',
+ label: BUILT_IN_LAYOUT_PRESET_LABELS.video,
+ panels: { isBottomOpen: false, isLeftOpen: true, isRightOpen: true },
+ widgetRegions: {
+ bottom: createRegion({
+ activeInstanceId: 'gallery:bottom',
+ instanceIds: defaultBottomInstanceIds,
+ isCollapsed: true,
+ sizePx: 180,
+ }),
+ center: createRegion({
+ activeInstanceId: 'preview',
+ instanceIds: ['preview'],
+ sizePx: 0,
+ }),
+ // Video leads the rail, with the other two graph widgets behind it so a
+ // still can be set up without leaving the arrangement.
+ left: createRegion({
+ activeInstanceId: 'video',
+ instanceIds: ['video', 'generate', 'upscale'],
+ sizePx: 450,
+ }),
+ right: createRegion({
+ activeInstanceId: 'gallery',
+ instanceIds: ['gallery', 'image-map', 'queue'],
+ sizePx: 450,
+ }),
+ },
+ }),
+ createPresetDescriptor({
+ centerViewId: 'workflow',
+ defaultKeys: ['alt+4'],
defaultRoute: { destination: 'gallery', sourceId: 'workflow' },
hotkeyId: 'selectAutomatePreset',
id: 'automate',
diff --git a/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetManagerDialogBody.browser.test.tsx b/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetManagerDialogBody.browser.test.tsx
index c462ccf5c0..933280515c 100644
--- a/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetManagerDialogBody.browser.test.tsx
+++ b/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetManagerDialogBody.browser.test.tsx
@@ -88,7 +88,7 @@ describe('LayoutPresetManagerDialogBody', () => {
it('renders one account-ordered list without preset descriptions', async () => {
await renderManager();
- expect(presetRowIds()).toEqual(['compose', 'custom-1', 'edit', 'automate']);
+ expect(presetRowIds()).toEqual(['compose', 'custom-1', 'edit', 'video', 'automate']);
expect(document.body.textContent).toContain('Writing');
expect(document.body.textContent).not.toContain('Text to image');
expect(document.body.textContent).not.toContain('Canvas editing');
@@ -111,7 +111,7 @@ describe('LayoutPresetManagerDialogBody', () => {
await act(() => pointer('pointermove', handle!.ownerDocument, startX, endY));
await act(() => pointer('pointerup', handle!.ownerDocument, startX, endY));
- expect(store.getSnapshot().account.layoutPresetOrder).toEqual(['custom-1', 'edit', 'compose', 'automate']);
+ expect(store.getSnapshot().account.layoutPresetOrder).toEqual(['custom-1', 'edit', 'compose', 'video', 'automate']);
});
it('reorders presets from a focused row handle with the keyboard', async () => {
@@ -137,6 +137,6 @@ describe('LayoutPresetManagerDialogBody', () => {
);
await act(() => userEvent.keyboard('{Enter}'));
- expect(store.getSnapshot().account.layoutPresetOrder).toEqual(['compose', 'edit', 'custom-1', 'automate']);
+ expect(store.getSnapshot().account.layoutPresetOrder).toEqual(['compose', 'edit', 'custom-1', 'video', 'automate']);
});
});
diff --git a/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetStrip.browser.test.tsx b/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetStrip.browser.test.tsx
index c4e1e5dcaf..6f0265bb44 100644
--- a/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetStrip.browser.test.tsx
+++ b/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetStrip.browser.test.tsx
@@ -143,7 +143,7 @@ describe('LayoutPresetStrip', () => {
it('renders the account order without preset descriptions and still activates a clicked tab', async () => {
await renderStrip();
- expect(presetTabIds()).toEqual(['compose', 'custom-1', 'edit', 'automate']);
+ expect(presetTabIds()).toEqual(['compose', 'custom-1', 'edit', 'video', 'automate']);
expect(presetTab('compose')).toHaveAttribute('aria-label', 'Writing');
expect(document.body.textContent).not.toContain('Text to image');
@@ -179,7 +179,7 @@ describe('LayoutPresetStrip', () => {
await act(() => mouse('mouseup', source!.ownerDocument, endX, startY));
await act(() => nextFrame());
- expect(store.getSnapshot().account.layoutPresetOrder).toEqual(['custom-1', 'edit', 'automate', 'compose']);
+ expect(store.getSnapshot().account.layoutPresetOrder).toEqual(['custom-1', 'edit', 'video', 'automate', 'compose']);
expect(store.getSnapshot().activeProject.layout.presetId).toBe('compose');
});
@@ -204,7 +204,7 @@ describe('LayoutPresetStrip', () => {
await act(() => userEvent.keyboard('{ArrowRight}'));
await act(() => userEvent.keyboard('{Space}'));
- expect(store.getSnapshot().account.layoutPresetOrder).toEqual(['custom-1', 'compose', 'edit', 'automate']);
+ expect(store.getSnapshot().account.layoutPresetOrder).toEqual(['custom-1', 'compose', 'edit', 'video', 'automate']);
expect(store.getSnapshot().activeProject.layout.presetId).toBe('compose');
expect(store.getSnapshot().account.activeLayoutPresetId).toBe('compose');
@@ -322,7 +322,7 @@ describe('LayoutPresetStrip', () => {
await act(() => touch('touchend', source!, source!, endX, startY));
expect(source!.style.opacity).not.toBe('0.5');
- expect(store.getSnapshot().account.layoutPresetOrder).toEqual(['custom-1', 'edit', 'automate', 'compose']);
+ expect(store.getSnapshot().account.layoutPresetOrder).toEqual(['custom-1', 'edit', 'video', 'automate', 'compose']);
});
it('leaves a short horizontal touch gesture to an overflowing scroll strip', async () => {
diff --git a/invokeai/frontend/webv2/src/workbench/shell/topbar/layoutPresetIcons.ts b/invokeai/frontend/webv2/src/workbench/shell/topbar/layoutPresetIcons.ts
index 97cad6133e..7c7fed334f 100644
--- a/invokeai/frontend/webv2/src/workbench/shell/topbar/layoutPresetIcons.ts
+++ b/invokeai/frontend/webv2/src/workbench/shell/topbar/layoutPresetIcons.ts
@@ -7,6 +7,7 @@ import {
BoxIcon,
BrushIcon,
CameraIcon,
+ ClapperboardIcon,
Columns2Icon,
CompassIcon,
CropIcon,
@@ -96,6 +97,7 @@ export const layoutPresetIconGroups: LayoutPresetIconGroup[] = [
option('images', ImagesIcon, 'Gallery'),
option('camera', CameraIcon, 'Camera'),
option('film', FilmIcon, 'Film'),
+ option('clapperboard', ClapperboardIcon, 'Video'),
option('frame', FrameIcon, 'Frame'),
option('aperture', ApertureIcon, 'Aperture'),
option('workflow', WorkflowIcon, 'Workflow'),
diff --git a/invokeai/frontend/webv2/src/workbench/workbenchState.test.ts b/invokeai/frontend/webv2/src/workbench/workbenchState.test.ts
index b4fb06cf4a..386bc84249 100644
--- a/invokeai/frontend/webv2/src/workbench/workbenchState.test.ts
+++ b/invokeai/frontend/webv2/src/workbench/workbenchState.test.ts
@@ -1134,7 +1134,7 @@ describe('workbench layout presets', () => {
type: 'addLayoutPreset',
});
- expect(state.account.layoutPresetOrder).toEqual(['compose', 'edit', 'automate', 'custom-layout-1']);
+ expect(state.account.layoutPresetOrder).toEqual(['compose', 'edit', 'video', 'automate', 'custom-layout-1']);
state = workbenchReducer(state, {
activeId: 'custom-layout-1',
@@ -1142,11 +1142,11 @@ describe('workbench layout presets', () => {
type: 'reorderLayoutPresets',
});
- expect(state.account.layoutPresetOrder).toEqual(['compose', 'custom-layout-1', 'edit', 'automate']);
+ expect(state.account.layoutPresetOrder).toEqual(['compose', 'custom-layout-1', 'edit', 'video', 'automate']);
state = workbenchReducer(state, { presetId: 'custom-layout-1', type: 'deleteLayoutPreset' });
- expect(state.account.layoutPresetOrder).toEqual(['compose', 'edit', 'automate']);
+ expect(state.account.layoutPresetOrder).toEqual(['compose', 'edit', 'video', 'automate']);
});
it('normalizes stale and duplicate preset ids when hydrating an account', () => {
@@ -1168,7 +1168,7 @@ describe('workbench layout presets', () => {
type: 'hydrateWorkbench',
});
- expect(state.account.layoutPresetOrder).toEqual(['automate', 'compose', 'edit', 'custom-layout-1']);
+ expect(state.account.layoutPresetOrder).toEqual(['compose', 'edit', 'video', 'automate', 'custom-layout-1']);
});
it('rejects reserved, empty, and duplicate custom preset ids during hydration', () => {
@@ -3501,7 +3501,7 @@ describe('workbench account and project settings', () => {
activeLayoutPresetId: 'compose',
customLayoutPresets: [],
layoutPresetMetadataOverrides: {},
- layoutPresetOrder: ['compose', 'edit', 'automate'],
+ layoutPresetOrder: ['compose', 'edit', 'video', 'automate'],
layoutPresetOverrides: {},
layoutPresetRouteOverrides: {},
});
diff --git a/invokeai/frontend/webv2/src/workbench/workbenchStore.test.ts b/invokeai/frontend/webv2/src/workbench/workbenchStore.test.ts
index bbc755b9a4..698c8dfa80 100644
--- a/invokeai/frontend/webv2/src/workbench/workbenchStore.test.ts
+++ b/invokeai/frontend/webv2/src/workbench/workbenchStore.test.ts
@@ -274,7 +274,7 @@ describe('createWorkbenchStore', () => {
store.commands.layout.reorderPresets('compose', 'edit');
- expect(store.getSnapshot().account.layoutPresetOrder).toEqual(['edit', 'compose', 'automate']);
+ expect(store.getSnapshot().account.layoutPresetOrder).toEqual(['edit', 'compose', 'video', 'automate']);
});
it('creates a custom preset with an explicitly selected default route in one command', () => {