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
feat(canvas): redesign the layer rows
Josh Corbett3e620c6f41a1
diff --git a/invokeai/frontend/webv2/.gitignore b/invokeai/frontend/webv2/.gitignoreindex 47a21f07a9..c864b969a2 100644--- a/invokeai/frontend/webv2/.gitignore+++ b/invokeai/frontend/webv2/.gitignore@@ -9,3 +9,4 @@ __screenshots__/# planning scratch, never committeddocs/superpowers/+*.tsbuildinfodiff --git a/invokeai/frontend/webv2/performance/architecture-baseline.json b/invokeai/frontend/webv2/performance/architecture-baseline.jsonindex 4b2e6664f2..0f3780e361 100644--- a/invokeai/frontend/webv2/performance/architecture-baseline.json+++ b/invokeai/frontend/webv2/performance/architecture-baseline.json@@ -2,12 +2,12 @@"build": {"launchpad": {"baseline": {- "brotliBytes": 840774,+ "brotliBytes": 840771,"cssRawBytes": 2159,"fontRawBytes": 219480,- "gzipBytes": 839534,+ "gzipBytes": 839556,"imageRawBytes": 156376,- "initialRawBytes": 1956734,+ "initialRawBytes": 1956794,"largestAssetRawBytes": 746376,"otherAssetRawBytes": 0,"ownedRawBytes": 70891,@@ -291,12 +291,12 @@]},"limits": {- "brotliBytes": 849182,+ "brotliBytes": 849179,"cssRawBytes": 2181,"fontRawBytes": 221675,- "gzipBytes": 847930,+ "gzipBytes": 847952,"imageRawBytes": 157940,- "initialRawBytes": 1976302,+ "initialRawBytes": 1976362,"largestAssetRawBytes": 753840,"otherAssetRawBytes": 0,"ownedRawBytes": 70891,@@ -309,12 +309,12 @@},"editor": {"baseline": {- "brotliBytes": 1099653,+ "brotliBytes": 1099628,"cssRawBytes": 2159,"fontRawBytes": 219480,- "gzipBytes": 1094899,+ "gzipBytes": 1094924,"imageRawBytes": 156376,- "initialRawBytes": 2742452,+ "initialRawBytes": 2742512,"largestAssetRawBytes": 746376,"otherAssetRawBytes": 0,"ownedRawBytes": 114602,@@ -933,12 +933,12 @@]},"limits": {- "brotliBytes": 1110650,+ "brotliBytes": 1110625,"cssRawBytes": 2181,"fontRawBytes": 221675,- "gzipBytes": 1105848,+ "gzipBytes": 1105874,"imageRawBytes": 157940,- "initialRawBytes": 2769877,+ "initialRawBytes": 2769938,"largestAssetRawBytes": 753840,"otherAssetRawBytes": 0,"ownedRawBytes": 114602,diff --git a/invokeai/frontend/webv2/performance/browser-baseline.json b/invokeai/frontend/webv2/performance/browser-baseline.jsonindex 4a200d7cc7..0e506f70b3 100644--- a/invokeai/frontend/webv2/performance/browser-baseline.json+++ b/invokeai/frontend/webv2/performance/browser-baseline.json@@ -25,13 +25,13 @@"scriptRequestCount": 0,"totalRawBytes": 0},- "domContentLoadedMedianMs": 115.19999999925494,+ "domContentLoadedMedianMs": 112.90000000223517,"id": "launchpad","layoutAckMedianMs": 0,"layoutReturnSwitchMedianMs": 0,"layoutSwitchMedianMs": 0,- "loadMedianMs": 115.30000000074506,- "longestTaskMaxMs": 67,+ "loadMedianMs": 113,+ "longestTaskMaxMs": 68,"owner": "app","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:launchpad",@@ -41,24 +41,24 @@"fontRawBytes": 23664,"imageRawBytes": 0,"largestAssetRawBytes": 746376,- "otherRawBytes": 158124,+ "otherRawBytes": 158131,"requestCount": 38,- "scriptRawBytes": 1632761,+ "scriptRawBytes": 1632821,"scriptRequestCount": 34,- "totalRawBytes": 1816708+ "totalRawBytes": 1816775},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 0,"largestAssetRawBytes": 753840,- "otherRawBytes": 159706,+ "otherRawBytes": 159713,"requestCount": 38,- "scriptRawBytes": 1649089,+ "scriptRawBytes": 1649150,"scriptRequestCount": 34,- "totalRawBytes": 1834876+ "totalRawBytes": 1834943},- "routeReadyMedianMs": 250.70000000298023,+ "routeReadyMedianMs": 246.90000000223517,"scriptSourceOwnerSet": "launchpad-static","stateProfile": "empty"},@@ -85,13 +85,13 @@"scriptRequestCount": 0,"totalRawBytes": 0},- "domContentLoadedMedianMs": 113.19999999925494,+ "domContentLoadedMedianMs": 108.89999999850988,"id": "launchpad","layoutAckMedianMs": 0,"layoutReturnSwitchMedianMs": 0,"layoutSwitchMedianMs": 0,- "loadMedianMs": 113.40000000223517,- "longestTaskMaxMs": 67,+ "loadMedianMs": 109,+ "longestTaskMaxMs": 66,"owner": "app","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:launchpad",@@ -101,24 +101,24 @@"fontRawBytes": 23664,"imageRawBytes": 0,"largestAssetRawBytes": 746376,- "otherRawBytes": 158124,+ "otherRawBytes": 158131,"requestCount": 38,- "scriptRawBytes": 1632761,+ "scriptRawBytes": 1632821,"scriptRequestCount": 34,- "totalRawBytes": 1816708+ "totalRawBytes": 1816775},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 0,"largestAssetRawBytes": 753840,- "otherRawBytes": 159706,+ "otherRawBytes": 159713,"requestCount": 38,- "scriptRawBytes": 1649089,+ "scriptRawBytes": 1649150,"scriptRequestCount": 34,- "totalRawBytes": 1834876+ "totalRawBytes": 1834943},- "routeReadyMedianMs": 268.69999999925494,+ "routeReadyMedianMs": 258.5,"scriptSourceOwnerSet": "launchpad-static","stateProfile": "representative"},@@ -145,15 +145,15 @@"scriptRequestCount": 0,"totalRawBytes": 0},- "domContentLoadedMedianMs": 111.90000000223517,+ "domContentLoadedMedianMs": 112.39999999850988,"id": "editor-minimal","layoutAckMedianMs": 0,"layoutReturnSwitchMedianMs": 0,"layoutSwitchMedianMs": 0,- "loadMedianMs": 112.10000000149012,+ "loadMedianMs": 112.5,"longestTaskMaxMs": 95,"owner": "workbench",- "projectSwitchMedianMs": 35.19999999925494,+ "projectSwitchMedianMs": 32.5,"readyMark": "invokeai:ready:widget:center:preview","remediationTicket": "deepen-widget-registry-loading","resourceBaseline": {@@ -161,24 +161,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 158124,+ "otherRawBytes": 158131,"requestCount": 115,- "scriptRawBytes": 3264378,+ "scriptRawBytes": 3264438,"scriptRequestCount": 110,- "totalRawBytes": 3604701+ "totalRawBytes": 3604768},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 159706,+ "otherRawBytes": 159713,"requestCount": 115,- "scriptRawBytes": 3297022,+ "scriptRawBytes": 3297083,"scriptRequestCount": 110,- "totalRawBytes": 3640749+ "totalRawBytes": 3640816},- "routeReadyMedianMs": 650.8999999985099,+ "routeReadyMedianMs": 648.1999999992549,"scriptSourceOwnerSet": "editor-minimal-static","stateProfile": "empty"},@@ -205,15 +205,15 @@"scriptRequestCount": 0,"totalRawBytes": 0},- "domContentLoadedMedianMs": 111,+ "domContentLoadedMedianMs": 115.30000000074506,"id": "editor-minimal","layoutAckMedianMs": 0,"layoutReturnSwitchMedianMs": 0,"layoutSwitchMedianMs": 0,- "loadMedianMs": 111.09999999776483,- "longestTaskMaxMs": 181,+ "loadMedianMs": 115.39999999850988,+ "longestTaskMaxMs": 173,"owner": "workbench",- "projectSwitchMedianMs": 70.20000000298023,+ "projectSwitchMedianMs": 67.80000000074506,"readyMark": "invokeai:ready:widget:center:preview","remediationTicket": "deepen-widget-registry-loading","resourceBaseline": {@@ -221,24 +221,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 158124,+ "otherRawBytes": 158131,"requestCount": 115,- "scriptRawBytes": 3264378,+ "scriptRawBytes": 3264438,"scriptRequestCount": 110,- "totalRawBytes": 3604701+ "totalRawBytes": 3604768},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 159706,+ "otherRawBytes": 159713,"requestCount": 115,- "scriptRawBytes": 3297022,+ "scriptRawBytes": 3297083,"scriptRequestCount": 110,- "totalRawBytes": 3640749+ "totalRawBytes": 3640816},- "routeReadyMedianMs": 420.19999999925494,+ "routeReadyMedianMs": 430.79999999701977,"scriptSourceOwnerSet": "editor-minimal-static","stateProfile": "representative"},@@ -247,31 +247,31 @@"cssRawBytes": 0,"fontRawBytes": 0,"imageRawBytes": 0,- "largestAssetRawBytes": 254236,+ "largestAssetRawBytes": 254333,"otherRawBytes": 0,"requestCount": 7,- "scriptRawBytes": 410885,+ "scriptRawBytes": 410982,"scriptRequestCount": 7,- "totalRawBytes": 410885+ "totalRawBytes": 410982},"activatedResourceLimits": {"cssRawBytes": 0,"fontRawBytes": 0,"imageRawBytes": 0,- "largestAssetRawBytes": 256779,+ "largestAssetRawBytes": 256877,"otherRawBytes": 0,"requestCount": 7,- "scriptRawBytes": 414994,+ "scriptRawBytes": 415092,"scriptRequestCount": 7,- "totalRawBytes": 414994+ "totalRawBytes": 415092},- "domContentLoadedMedianMs": 112.69999999925494,+ "domContentLoadedMedianMs": 114.19999999925494,"id": "editor-canvas",- "layoutAckMedianMs": 2.199999999254942,- "layoutReturnSwitchMedianMs": 53,- "layoutSwitchMedianMs": 89.19999999925494,- "loadMedianMs": 112.79999999701977,- "longestTaskMaxMs": 125,+ "layoutAckMedianMs": 1.9000000022351742,+ "layoutReturnSwitchMedianMs": 50,+ "layoutSwitchMedianMs": 81.29999999701977,+ "loadMedianMs": 114.29999999701977,+ "longestTaskMaxMs": 116,"owner": "canvas","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:widget:center:canvas",@@ -281,24 +281,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 158124,+ "otherRawBytes": 158131,"requestCount": 122,- "scriptRawBytes": 3675263,+ "scriptRawBytes": 3675420,"scriptRequestCount": 117,- "totalRawBytes": 4015586+ "totalRawBytes": 4015750},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 159706,+ "otherRawBytes": 159713,"requestCount": 122,- "scriptRawBytes": 3712016,+ "scriptRawBytes": 3712175,"scriptRequestCount": 117,- "totalRawBytes": 4055742+ "totalRawBytes": 4055908},- "routeReadyMedianMs": 1011.8999999985099,+ "routeReadyMedianMs": 1008.7000000029802,"scriptSourceOwnerSet": "editor-canvas-static","stateProfile": "empty"},@@ -307,31 +307,31 @@"cssRawBytes": 0,"fontRawBytes": 0,"imageRawBytes": 0,- "largestAssetRawBytes": 254236,+ "largestAssetRawBytes": 254333,"otherRawBytes": 0,"requestCount": 7,- "scriptRawBytes": 410885,+ "scriptRawBytes": 410982,"scriptRequestCount": 7,- "totalRawBytes": 410885+ "totalRawBytes": 410982},"activatedResourceLimits": {"cssRawBytes": 0,"fontRawBytes": 0,"imageRawBytes": 0,- "largestAssetRawBytes": 256779,+ "largestAssetRawBytes": 256877,"otherRawBytes": 0,"requestCount": 7,- "scriptRawBytes": 414994,+ "scriptRawBytes": 415092,"scriptRequestCount": 7,- "totalRawBytes": 414994+ "totalRawBytes": 415092},- "domContentLoadedMedianMs": 115.60000000149012,+ "domContentLoadedMedianMs": 112.30000000074506,"id": "editor-canvas","layoutAckMedianMs": 2.5,- "layoutReturnSwitchMedianMs": 43.30000000074506,- "layoutSwitchMedianMs": 82.80000000074506,- "loadMedianMs": 115.69999999925494,- "longestTaskMaxMs": 177,+ "layoutReturnSwitchMedianMs": 48.100000001490116,+ "layoutSwitchMedianMs": 83.19999999925494,+ "loadMedianMs": 112.40000000223517,+ "longestTaskMaxMs": 185,"owner": "canvas","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:widget:center:canvas",@@ -341,24 +341,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 158124,+ "otherRawBytes": 158131,"requestCount": 122,- "scriptRawBytes": 3675263,+ "scriptRawBytes": 3675420,"scriptRequestCount": 117,- "totalRawBytes": 4015586+ "totalRawBytes": 4015750},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 159706,+ "otherRawBytes": 159713,"requestCount": 122,- "scriptRawBytes": 3712016,+ "scriptRawBytes": 3712175,"scriptRequestCount": 117,- "totalRawBytes": 4055742+ "totalRawBytes": 4055908},- "routeReadyMedianMs": 1098.199999999255,+ "routeReadyMedianMs": 1114.4000000022352,"scriptSourceOwnerSet": "editor-canvas-static","stateProfile": "representative"},@@ -385,13 +385,13 @@"scriptRequestCount": 6,"totalRawBytes": 383457},- "domContentLoadedMedianMs": 110.59999999776483,+ "domContentLoadedMedianMs": 115.09999999776483,"id": "editor-workflow",- "layoutAckMedianMs": 2.199999999254942,- "layoutReturnSwitchMedianMs": 31.399999998509884,- "layoutSwitchMedianMs": 89.09999999776483,- "loadMedianMs": 110.69999999925494,- "longestTaskMaxMs": 96,+ "layoutAckMedianMs": 2.5,+ "layoutReturnSwitchMedianMs": 38.599999997764826,+ "layoutSwitchMedianMs": 100.80000000074506,+ "loadMedianMs": 115.19999999925494,+ "longestTaskMaxMs": 157,"owner": "workflow","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:widget:center:workflow",@@ -401,24 +401,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 158124,+ "otherRawBytes": 158131,"requestCount": 122,- "scriptRawBytes": 3628625,+ "scriptRawBytes": 3628685,"scriptRequestCount": 116,- "totalRawBytes": 3984361+ "totalRawBytes": 3984428},"resourceLimits": {"cssRawBytes": 17748,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 159706,+ "otherRawBytes": 159713,"requestCount": 122,- "scriptRawBytes": 3664912,+ "scriptRawBytes": 3664972,"scriptRequestCount": 116,- "totalRawBytes": 4024205+ "totalRawBytes": 4024273},- "routeReadyMedianMs": 1026.5,+ "routeReadyMedianMs": 1143.699999999255,"scriptSourceOwnerSet": "editor-workflow-static","stateProfile": "empty"},@@ -445,13 +445,13 @@"scriptRequestCount": 6,"totalRawBytes": 383457},- "domContentLoadedMedianMs": 112.30000000074506,+ "domContentLoadedMedianMs": 112.20000000298023,"id": "editor-workflow",- "layoutAckMedianMs": 2.5,- "layoutReturnSwitchMedianMs": 39.5,- "layoutSwitchMedianMs": 118.19999999925494,- "loadMedianMs": 112.5,- "longestTaskMaxMs": 329,+ "layoutAckMedianMs": 2.300000000745058,+ "layoutReturnSwitchMedianMs": 39.19999999925494,+ "layoutSwitchMedianMs": 124.60000000149012,+ "loadMedianMs": 112.40000000223517,+ "longestTaskMaxMs": 338,"owner": "workflow","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:widget:center:workflow",@@ -461,24 +461,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 158124,+ "otherRawBytes": 158131,"requestCount": 122,- "scriptRawBytes": 3628625,+ "scriptRawBytes": 3628685,"scriptRequestCount": 116,- "totalRawBytes": 3984361+ "totalRawBytes": 3984428},"resourceLimits": {"cssRawBytes": 17748,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 159706,+ "otherRawBytes": 159713,"requestCount": 122,- "scriptRawBytes": 3664912,+ "scriptRawBytes": 3664972,"scriptRequestCount": 116,- "totalRawBytes": 4024205+ "totalRawBytes": 4024273},- "routeReadyMedianMs": 1134.300000000745,+ "routeReadyMedianMs": 1156.5999999977648,"scriptSourceOwnerSet": "editor-workflow-static","stateProfile": "representative"},@@ -505,12 +505,12 @@"scriptRequestCount": 0,"totalRawBytes": 0},- "domContentLoadedMedianMs": 112.69999999925494,+ "domContentLoadedMedianMs": 110.19999999925494,"id": "editor-gallery","layoutAckMedianMs": 0,"layoutReturnSwitchMedianMs": 0,- "layoutSwitchMedianMs": 23.5,- "loadMedianMs": 112.80000000074506,+ "layoutSwitchMedianMs": 23.300000000745058,+ "loadMedianMs": 110.30000000074506,"longestTaskMaxMs": 92,"owner": "gallery","projectSwitchMedianMs": 0,@@ -521,24 +521,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 158124,+ "otherRawBytes": 158131,"requestCount": 115,- "scriptRawBytes": 3264378,+ "scriptRawBytes": 3264438,"scriptRequestCount": 110,- "totalRawBytes": 3604701+ "totalRawBytes": 3604768},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 159706,+ "otherRawBytes": 159713,"requestCount": 115,- "scriptRawBytes": 3297022,+ "scriptRawBytes": 3297083,"scriptRequestCount": 110,- "totalRawBytes": 3640749+ "totalRawBytes": 3640816},- "routeReadyMedianMs": 1248.300000000745,+ "routeReadyMedianMs": 1213.699999999255,"scriptSourceOwnerSet": "editor-minimal-static","stateProfile": "empty"},@@ -569,9 +569,9 @@"id": "editor-gallery","layoutAckMedianMs": 0,"layoutReturnSwitchMedianMs": 0,- "layoutSwitchMedianMs": 82.29999999701977,- "loadMedianMs": 111.80000000074506,- "longestTaskMaxMs": 162,+ "layoutSwitchMedianMs": 79.69999999925494,+ "loadMedianMs": 111.89999999850988,+ "longestTaskMaxMs": 160,"owner": "gallery","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:widget:center:gallery",@@ -581,24 +581,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 158124,+ "otherRawBytes": 158131,"requestCount": 115,- "scriptRawBytes": 3264378,+ "scriptRawBytes": 3264438,"scriptRequestCount": 110,- "totalRawBytes": 3604701+ "totalRawBytes": 3604768},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 159706,+ "otherRawBytes": 159713,"requestCount": 115,- "scriptRawBytes": 3297022,+ "scriptRawBytes": 3297083,"scriptRequestCount": 110,- "totalRawBytes": 3640749+ "totalRawBytes": 3640816},- "routeReadyMedianMs": 1401.7999999970198,+ "routeReadyMedianMs": 1388.8999999985099,"scriptSourceOwnerSet": "editor-minimal-static","stateProfile": "representative"}@@ -2890,6 +2890,7 @@"source:src/workbench/widgets/layers/layerTreeAutoScroll.ts","source:src/workbench/widgets/layers/layerTreeDrop.ts","source:src/workbench/widgets/layers/layerTreeRows.ts",+ "source:src/workbench/widgets/layers/layerTypeIcon.ts","source:src/workbench/widgets/layers/manifest.ts","source:src/workbench/widgets/layers/panes/ColorPane.tsx","source:src/workbench/widgets/layers/panes/GroupSelectedNotice.tsx",diff --git a/invokeai/frontend/webv2/public/locales/en.json b/invokeai/frontend/webv2/public/locales/en.jsonindex 814b999f3f..300fccde30 100644--- a/invokeai/frontend/webv2/public/locales/en.json+++ b/invokeai/frontend/webv2/public/locales/en.json@@ -2598,7 +2598,8 @@"hideSelected": "Hide selected","showSelected": "Show selected","hideSelectedOnCanvas": "Hide selected on canvas",- "showSelectedOnCanvas": "Show selected on canvas"+ "showSelectedOnCanvas": "Show selected on canvas",+ "toggleActive": "Toggle layer active"},"control": {"apply": "Apply",@@ -2919,7 +2920,6 @@"copyTo": "Copy to"},"options": "Layer options",- "properties": "Layer properties","regionalGuidance": {"addReferenceImage": "Add reference image","autoNegative": "Auto-Negative",diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.tsindex 1cfd57094e..4f739dd9ac 100644--- a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts+++ b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts@@ -702,6 +702,7 @@ export const rowRecipe = defineRecipe({active: {none: {},muted: { bg: 'bg.muted' },+ emphasized: { bg: 'bg.emphasized', _hover: { bg: 'bg.emphasized' } },brand: {bg: 'brand.subtle',color: 'brand.fg',diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerRow.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerRow.tsxindex ff1ba68ed1..c978986fa2 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerRow.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerRow.tsx@@ -1,11 +1,11 @@-import type { CanvasLayerContract, SemanticNode } from '@workbench/canvas-engine/api';+import type { CanvasLayerContract, CanvasNodeContract, SemanticNode } from '@workbench/canvas-engine/api';import type { FocusEvent, KeyboardEvent, MouseEvent } from 'react';-import { Badge, Box, HStack, Icon, Input, Stack, Text } from '@chakra-ui/react';+import { Badge, Box, HStack, Icon, Input, Text } from '@chakra-ui/react';import { useDraggable, useDroppable } from '@dnd-kit/core';import { IconButton, Row, ToggleDot, Tooltip } from '@platform/ui';import { MiddleTruncate } from '@platform/ui/MiddleTruncate';-import { isHideableLayer, isNodeHidden, isOverlayStack } from '@workbench/canvas-engine/api';+import { isGroupNode, isHideableLayer, isNodeHidden, isOverlayStack } from '@workbench/canvas-engine/api';import {ChevronRightIcon,EyeIcon,@@ -15,8 +15,6 @@ import {ImageIcon,LockIcon,LockOpenIcon,- MoreVerticalIcon,- SlidersHorizontalIcon,} from 'lucide-react';import { memo, useCallback, useLayoutEffect, useMemo, useRef } from 'react';import { useTranslation } from 'react-i18next';@@ -27,9 +25,10 @@ import type { LayerTreeRow } from './layerTreeRows';import { ControlLayerWarningIcon } from './ControlLayerWarningIcon';import { recordLayerRowCommit } from './layerPanelDiagnostics';import { LAYER_TREE_INDENT_PX } from './layerPanelRows';-import { anchorFromPoint, anchorFromRect } from './layerRowCommands';+import { anchorFromPoint } from './layerRowCommands';import { layerRowSummary } from './layerRowSummary';import { LayerThumbnail, type LayerThumbnailEngine } from './LayerThumbnail';+import { layerTypeIcon } from './layerTypeIcon';const ROW_SELECTION_FOCUS = { outline: '2px solid', outlineColor: 'accent.solid', outlineOffset: '-2px' };const LAYER_ROW_BACKGROUND_TRANSITION = 'background min(40ms, var(--wb-motion-duration-fast)) ease-out';@@ -172,20 +171,6 @@ const LayerRowComponent = ({},[commands, node.isLocked, row.id]);- const handleOpenMenu = useCallback(- (event: MouseEvent<HTMLButtonElement>) => {- event.stopPropagation();- commands.openMenu(row.id, anchorFromRect(event.currentTarget.getBoundingClientRect()));- },- [commands, row.id]- );- const handleOpenProperties = useCallback(- (event: MouseEvent<HTMLButtonElement>) => {- event.stopPropagation();- commands.openProperties(row.id);- },- [commands, row.id]- );const handleContextMenu = useCallback((event: MouseEvent<HTMLElement>) => {event.preventDefault();@@ -288,6 +273,7 @@ const LayerRowComponent = ({data-primary={primary || undefined}h="full"opacity={drag ? 0.4 : undefined}+ pb="0.5"role="treeitem"rounded="sm"tabIndex={focused ? 0 : -1}@@ -299,9 +285,8 @@ const LayerRowComponent = ({onKeyDown={handleKeyDown}><Row- active={selected ? 'muted' : undefined}- borderStartColor={primary ? 'accent.solid' : 'transparent'}- borderStartWidth="2px"+ active={primary ? 'emphasized' : selected ? 'muted' : undefined}+ alignItems="center"cursor={drag === 'source' ? 'grabbing' : 'default'}display="flex"gap="1.5"@@ -310,183 +295,160 @@ const LayerRowComponent = ({style={indentStyle}transition={LAYER_ROW_BACKGROUND_TRANSITION}>- <HStack gap="1.5" h="full" w="full">- {group ? (- <IconButton- aria-label={t(- row.expanded ? 'widgets.layers.actions.collapseGroup' : 'widgets.layers.actions.expandGroup'- )}- color="fg.muted"+ <Box+ display="flex"+ flexShrink="0"+ onClick={stopPropagation}+ onMouseDown={keepRowFocus}+ onPointerDown={stopPropagation}+ >+ <ToggleDot+ _before={+ node.isEnabled+ ? disabledByAncestor+ ? VISIBILITY_DOT_GATED+ : VISIBILITY_DOT_CHECKED+ : VISIBILITY_DOT_UNCHECKED+ }+ _focusVisible={ROW_SELECTION_FOCUS}+ _hover={node.isEnabled ? VISIBILITY_DOT_CHECKED_HOVER : VISIBILITY_DOT_UNCHECKED_HOVER}+ bg="transparent"+ borderWidth="0"+ checked={node.isEnabled}+ cursor={editingLocked ? 'not-allowed' : 'pointer'}+ disabled={editingLocked}+ h="6"+ label={t('widgets.layers.actions.toggleActive')}+ position="relative"+ tabIndex={-1}+ tooltip={disabledByAncestor ? t('widgets.layers.actions.groupDisabled') : undefined}+ transition="none"+ w="6"+ onCheckedChange={handleToggleVisible}+ />+ </Box>+ {group ? (+ <GroupPreview engine={engine} expanded={row.expanded} node={node} thumbnails={thumbnails} />+ ) : !thumbnails ? (+ <Box+ alignItems="center"+ bg="bg.muted"+ borderColor="border.subtle"+ borderWidth="1px"+ boxSize={THUMBNAIL_SIZE}+ color="fg.muted"+ display="flex"+ flexShrink={0}+ justifyContent="center"+ rounded="sm"+ >+ <Icon as={ImageIcon} boxSize="4" />+ </Box>+ ) : (+ <Box boxSize={THUMBNAIL_SIZE} flexShrink={0}>+ <LayerThumbnail engine={engine} layer={layer!} />+ </Box>+ )}+ {/* The identity slot: a group's disclosure chevron and a layer's type glyph share one box. */}+ {group ? (+ <IconButton+ aria-label={t(row.expanded ? 'widgets.layers.actions.collapseGroup' : 'widgets.layers.actions.expandGroup')}+ color="fg.muted"+ size="2xs"+ tabIndex={-1}+ variant="ghost"+ onClick={handleToggleExpanded}+ onMouseDown={keepRowFocus}+ onPointerDown={stopPropagation}+ >+ <Icon+ as={ChevronRightIcon}+ boxSize="3.5"+ transform={row.expanded ? 'rotate(90deg)' : undefined}+ transitionDuration="fast"+ transitionProperty="transform"+ />+ </IconButton>+ ) : (+ <Box alignItems="center" boxSize="6" display="flex" flexShrink={0} justifyContent="center">+ <Icon as={layerTypeIcon(layer!)} boxSize="3" color="fg.subtle" />+ </Box>+ )}+ <Box+ flex="1"+ minW="0"+ title={+ group+ ? vm.leafCount === 0+ ? t('widgets.layers.groupEmpty')+ : t('widgets.layers.groupSummary', { count: vm.leafCount })+ : layerRowSummary(layer!, t)+ }+ >+ {renaming ? (+ <Input+ ref={focusOnMount}+ aria-label={t('widgets.layers.actions.rename')}+ defaultValue={node.name}size="2xs"- tabIndex={-1}- variant="ghost"- onClick={handleToggleExpanded}- onMouseDown={keepRowFocus}+ onBlur={handleNameBlur}+ onClick={stopPropagation}+ onKeyDown={handleNameKeyDown}onPointerDown={stopPropagation}- >- <Icon- as={ChevronRightIcon}- boxSize="3.5"- transform={row.expanded ? 'rotate(90deg)' : undefined}- transitionDuration="fast"- transitionProperty="transform"- />- </IconButton>- ) : null}- {group || !thumbnails ? (- <Box- alignItems="center"- bg="bg.muted"- borderColor="border.subtle"- borderWidth="1px"- boxSize={THUMBNAIL_SIZE}- color="fg.muted"- display="flex"- flexShrink={0}- justifyContent="center"- rounded="sm"- >- <Icon as={group ? (row.expanded ? FolderOpenIcon : FolderIcon) : ImageIcon} boxSize="4" />- </Box>+ />) : (- <Box boxSize={THUMBNAIL_SIZE} flexShrink={0}>- <LayerThumbnail engine={engine} layer={layer!} />- </Box>+ <MiddleTruncate+ color={vm.contributionEnabled ? undefined : 'fg.muted'}+ fontSize="2xs"+ fontWeight="700"+ text={node.name}+ />)}- <Stack flex="1" gap="0" justify="center" minW="0">- {renaming ? (- <Input- ref={focusOnMount}- aria-label={t('widgets.layers.actions.rename')}- defaultValue={node.name}- size="2xs"- onBlur={handleNameBlur}- onClick={stopPropagation}- onKeyDown={handleNameKeyDown}- onPointerDown={stopPropagation}- />- ) : (- <MiddleTruncate- color={vm.contributionEnabled ? undefined : 'fg.muted'}- fontSize="2xs"- fontWeight="700"- text={node.name}- />- )}- <HStack gap="1" minW="0">- {group ? (- <Text color="fg.muted" fontSize="2xs">- {vm.leafCount === 0- ? t('widgets.layers.groupEmpty')- : t('widgets.layers.groupSummary', { count: vm.leafCount })}- </Text>- ) : (- <>- <Text color="fg.muted" fontSize="2xs" minW="0" truncate>- {layerRowSummary(layer!, t)}- </Text>- <ControlLayerWarningIcon contributing={vm.contributionEnabled} layer={layer!} />- </>- )}- </HStack>- </Stack>- {/* One control cluster on the same rhythm as the stack header; slots a row cannot use are held open. */}- <HStack flexShrink="0" gap="0.5" onClick={stopPropagation} onMouseDown={keepRowFocus}>- {hideable ? (- <Tooltip- content={- hiddenByAncestor ? t('widgets.layers.actions.groupHidden') : t('widgets.layers.actions.toggleHidden')- }- >- <IconButton- aria-label={t('widgets.layers.actions.toggleHidden')}- aria-pressed={!ownHidden}- color={vm.documentHidden ? 'fg.muted' : 'fg'}- disabled={editingLocked || hiddenByAncestor}- size="2xs"- tabIndex={-1}- variant="ghost"- onClick={handleToggleHidden}- onPointerDown={stopPropagation}- >- {vm.documentHidden ? <EyeOffIcon /> : <EyeIcon />}- </IconButton>- </Tooltip>- ) : (- <Box boxSize="6" />- )}- <Box display="flex" flexShrink="0" onPointerDown={stopPropagation}>- <ToggleDot- _before={- node.isEnabled- ? disabledByAncestor- ? VISIBILITY_DOT_GATED- : VISIBILITY_DOT_CHECKED- : VISIBILITY_DOT_UNCHECKED- }- _focusVisible={ROW_SELECTION_FOCUS}- _hover={node.isEnabled ? VISIBILITY_DOT_CHECKED_HOVER : VISIBILITY_DOT_UNCHECKED_HOVER}- bg="transparent"- borderWidth="0"- checked={node.isEnabled}- cursor={editingLocked ? 'not-allowed' : 'pointer'}- disabled={editingLocked}- h="6"- label={t('widgets.layers.actions.toggleVisibility')}- position="relative"- tabIndex={-1}- tooltip={disabledByAncestor ? t('widgets.layers.actions.groupDisabled') : undefined}- transition="none"- w="6"- onCheckedChange={handleToggleVisible}- />- </Box>+ </Box>+ {layer ? <ControlLayerWarningIcon contributing={vm.contributionEnabled} layer={layer} /> : null}+ {/* One control cluster on the same rhythm as the stack header; slots a row cannot use are held open. */}+ <HStack flexShrink="0" gap="0.5" onClick={stopPropagation} onMouseDown={keepRowFocus}>+ {hideable ? (<Tooltipcontent={- lockedByAncestor ? t('widgets.layers.actions.groupLocked') : t('widgets.layers.actions.toggleLock')+ hiddenByAncestor ? t('widgets.layers.actions.groupHidden') : t('widgets.layers.actions.toggleHidden')}><IconButton- aria-label={t('widgets.layers.actions.toggleLock')}- color={node.isLocked ? 'fg' : 'fg.muted'}- disabled={editingLocked || lockedByAncestor}+ aria-label={t('widgets.layers.actions.toggleHidden')}+ aria-pressed={!ownHidden}+ color={vm.documentHidden ? 'fg.muted' : 'fg'}+ disabled={editingLocked || hiddenByAncestor}size="2xs"tabIndex={-1}variant="ghost"- onClick={handleToggleLock}+ onClick={handleToggleHidden}onPointerDown={stopPropagation}>- {vm.effectiveLocked ? <LockIcon /> : <LockOpenIcon />}+ {vm.documentHidden ? <EyeOffIcon /> : <EyeIcon />}</IconButton></Tooltip>- {layer ? (- <IconButton- aria-label={t('widgets.layers.properties')}- color="fg.muted"- disabled={editingLocked}- size="2xs"- tabIndex={-1}- variant="ghost"- onClick={handleOpenProperties}- onPointerDown={stopPropagation}- >- <SlidersHorizontalIcon />- </IconButton>- ) : (- <Box boxSize="6" />- )}+ ) : (+ <Box boxSize="6" />+ )}+ <Tooltip+ content={+ lockedByAncestor ? t('widgets.layers.actions.groupLocked') : t('widgets.layers.actions.toggleLock')+ }+ ><IconButton- aria-label={t('widgets.layers.options')}- color="fg.muted"+ aria-label={t('widgets.layers.actions.toggleLock')}+ color={node.isLocked ? 'fg' : 'fg.muted'}+ disabled={editingLocked || lockedByAncestor}size="2xs"tabIndex={-1}variant="ghost"- onClick={handleOpenMenu}+ onClick={handleToggleLock}onPointerDown={stopPropagation}>- <MoreVerticalIcon />+ {vm.effectiveLocked ? <LockIcon /> : <LockOpenIcon />}</IconButton>- </HStack>+ </Tooltip></HStack></Row></Box>@@ -495,6 +457,85 @@ const LayerRowComponent = ({export const LayerRow = memo(LayerRowComponent);+/** The first few leaf layers of a group, depth first — what its preview tiles show. */+const groupLeafPreviews = (node: CanvasNodeContract, limit = 4): CanvasLayerContract[] => {+ const leaves: CanvasLayerContract[] = [];+ const walk = (candidate: CanvasNodeContract): void => {+ if (leaves.length >= limit) {+ return;+ }+ if (isGroupNode(candidate)) {+ for (const child of candidate.children) {+ walk(child);+ }+ return;+ }+ leaves.push(candidate);+ };+ if (isGroupNode(node)) {+ for (const child of node.children) {+ walk(child);+ }+ }+ return leaves;+};++/**+ * A group's preview: a mini grid of its first leaves' live thumbnails, so a+ * closed folder still shows what it holds; an empty group keeps the folder.+ */+const GroupPreview = ({+ engine,+ expanded,+ node,+ thumbnails,+}: {+ engine: LayerThumbnailEngine | null;+ expanded: boolean;+ node: CanvasNodeContract;+ thumbnails: boolean;+}) => {+ const leaves = useMemo(() => (thumbnails ? groupLeafPreviews(node) : []), [node, thumbnails]);+ if (leaves.length === 0) {+ return (+ <Box+ alignItems="center"+ bg="bg.muted"+ borderColor="border.subtle"+ borderWidth="1px"+ boxSize={THUMBNAIL_SIZE}+ color="fg.muted"+ display="flex"+ flexShrink={0}+ justifyContent="center"+ rounded="sm"+ >+ <Icon as={expanded ? FolderOpenIcon : FolderIcon} boxSize="4" />+ </Box>+ );+ }+ return (+ <Box+ borderColor="border.subtle"+ borderWidth="1px"+ boxSize={THUMBNAIL_SIZE}+ display="grid"+ flexShrink={0}+ gap="1px"+ gridAutoRows="1fr"+ gridTemplateColumns={leaves.length === 1 ? '1fr' : '1fr 1fr'}+ overflow="hidden"+ rounded="sm"+ >+ {leaves.map((leaf) => (+ <Box key={leaf.id} minH="0" minW="0" overflow="hidden">+ <LayerThumbnail engine={engine} layer={leaf} />+ </Box>+ ))}+ </Box>+ );+};+/** The compact card that follows the pointer: the grabbed row's name plus how many rows travel. */export const LayerDragGhost = ({ count, vm }: { count: number; vm: SemanticNode }) => (<HStackdiff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerStackHeader.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerStackHeader.tsxindex 0118e5bf5c..afd02e5d90 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerStackHeader.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerStackHeader.tsx@@ -105,7 +105,7 @@ const LayerStackHeaderComponent = ({onFocus={pinned ? undefined : handleFocus}onKeyDown={pinned ? undefined : handleKeyDown}>- <HStack gap="1" h="full" px="2.5">+ <HStack gap="1" h="full" px="1.5"><IconButtonaria-label={t(collapsed ? 'widgets.layers.groupActions.expand' : 'widgets.layers.groupActions.collapse')}color="fg.muted"diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerThumbnail.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerThumbnail.tsxindex f48a6cc3e2..adea4cced0 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerThumbnail.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerThumbnail.tsx@@ -96,11 +96,11 @@ const LayerThumbnailContent = ({borderColor="border.subtle"borderWidth="1px"flexShrink={0}- h="9"+ h="full"overflow="hidden"position="relative"rounded="sm"- w="9"+ w="full"><canvas ref={bindCanvas} style={drawn ? CANVAS_STYLE : { display: 'none' }} />{showFallback &&diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.browser.test.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.browser.test.tsxindex c2465375a6..364c267d1f 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.browser.test.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.browser.test.tsx@@ -91,12 +91,12 @@ void i18n.use(initReactI18next).init({reorder: 'Reorder layer',select: 'Select {{name}}',toggleLock: 'Toggle lock',+ toggleActive: 'Toggle layer active',toggleVisibility: 'Toggle visibility',},groupSummary_one: '{{count}} layer',groupSummary_other: '{{count}} layers',groups: { raster: 'Raster Layers' },- options: 'Layer options',properties: 'Layer properties',tree: 'Layer tree',types: { paint: 'Paint' },@@ -418,7 +418,7 @@ describe('LayersTree selection, surfaces and structure', () => {it('keeps the visibility dot isolated from row selection', async () => {await renderTree(trio());const dot = host!.querySelector<HTMLButtonElement>(- '[data-layer-row-id="first"] button[aria-label="Toggle visibility"]'+ '[data-layer-row-id="first"] button[aria-label="Toggle layer active"]')!;await act(() => userEvent.click(dot));expect(dot).toHaveAttribute('aria-pressed', 'false');@@ -428,8 +428,8 @@ describe('LayersTree selection, surfaces and structure', () => {it('routes the row menu and right-click to the panel surface host by id', async () => {await renderTree(trio());await act(() =>- userEvent.click(- host!.querySelector<HTMLButtonElement>('[data-layer-row-id="second"] button[aria-label="Layer options"]')!+ treeitem('Second').dispatchEvent(+ new MouseEvent('contextmenu', { bubbles: true, cancelable: true, clientX: 20, clientY: 20 })));expect(output('surface')).toBe('menu:second');diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.tsxindex 5246edfc52..149d04e47e 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.tsx@@ -415,7 +415,6 @@ export const LayersTree = ({focusItem(navigation.focus);},openMenu: (id, anchor: LayerSurfaceAnchor) => setSurface({ anchor, id, kind: 'menu' }),- openProperties: (id) => onRevealProperties(id),openStackMenu: (stack, anchor: LayerSurfaceAnchor) => setSurface({ anchor, kind: 'stack-menu', stack }),rename: (id, name) => runStructural(t('widgets.layers.actions.rename'), { id, patch: { name }, type: 'patch' }),select: (id, modifiers: LayerSelectionModifiers) => {@@ -435,7 +434,7 @@ export const LayersTree = ({}},setEnabled: (id, isEnabled) =>- runStructural(t('widgets.layers.actions.toggleVisibility'), {+ runStructural(t('widgets.layers.actions.toggleActive'), {type: 'set-enabled',updates: [{ id, isEnabled }],}),@@ -456,7 +455,7 @@ export const LayersTree = ({}},}),- [onRevealProperties, focusItem, movingIds, runStructural, t]+ [focusItem, movingIds, runStructural, t]);const closeSurface = useCallback(() => {diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerRowCommands.ts b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerRowCommands.tsindex 1d0944a05e..88525bfb74 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerRowCommands.ts+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerRowCommands.ts@@ -25,7 +25,6 @@ export interface LayerRowCommands {rename(id: string, name: string): void;endRename(): void;openMenu(id: string, anchor: LayerSurfaceAnchor): void;- openProperties(id: string): void;openStackMenu(stack: LayerStackKind, anchor: LayerSurfaceAnchor): void;toggleCollapse(stack: LayerStackKind): void;/** `id` is a node id or a stack header key; the tree tells them apart. */diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerTypeIcon.ts b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerTypeIcon.tsnew file mode 100644index 0000000000..1ba32dd431--- /dev/null+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerTypeIcon.ts@@ -0,0 +1,38 @@+import type { CanvasLayerContract } from '@workbench/canvas-engine/api';+import type { LucideIcon } from 'lucide-react';++import {+ BlendIcon,+ BrushIcon,+ ImageIcon,+ MapPinIcon,+ SlidersHorizontalIcon,+ SquareDashedBottomIcon,+ SquareIcon,+ TypeIcon,+} from 'lucide-react';++/** The small identity glyph between a row's preview and its name. */+export const layerTypeIcon = (layer: CanvasLayerContract): LucideIcon => {+ switch (layer.type) {+ case 'raster':+ switch (layer.source.type) {+ case 'image':+ return ImageIcon;+ case 'shape':+ return SquareIcon;+ case 'text':+ return TypeIcon;+ case 'gradient':+ return BlendIcon;+ default:+ return BrushIcon;+ }+ case 'control':+ return SlidersHorizontalIcon;+ case 'inpaint_mask':+ return SquareDashedBottomIcon;+ case 'regional_guidance':+ return MapPinIcon;+ }+};