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(layers): panel polish, clearer verbiage, and adjustment renaming
Josh Corbett6c89038fd7b2
diff --git a/invokeai/frontend/webv2/performance/browser-baseline.json b/invokeai/frontend/webv2/performance/browser-baseline.jsonindex bb5910c20b..e423e07759 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": 121.5,+ "domContentLoadedMedianMs": 117.69999999552965,"id": "launchpad","layoutAckMedianMs": 0,"layoutReturnSwitchMedianMs": 0,"layoutSwitchMedianMs": 0,- "loadMedianMs": 121.60000000149012,- "longestTaskMaxMs": 75,+ "loadMedianMs": 117.79999999701977,+ "longestTaskMaxMs": 69,"owner": "app","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:launchpad",@@ -41,24 +41,24 @@"fontRawBytes": 23664,"imageRawBytes": 0,"largestAssetRawBytes": 746376,- "otherRawBytes": 159169,+ "otherRawBytes": 159359,"requestCount": 38,- "scriptRawBytes": 1635101,+ "scriptRawBytes": 1635291,"scriptRequestCount": 34,- "totalRawBytes": 1820093+ "totalRawBytes": 1820473},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 0,"largestAssetRawBytes": 753840,- "otherRawBytes": 160761,+ "otherRawBytes": 160953,"requestCount": 38,- "scriptRawBytes": 1651453,+ "scriptRawBytes": 1651644,"scriptRequestCount": 34,- "totalRawBytes": 1838294+ "totalRawBytes": 1838678},- "routeReadyMedianMs": 279.90000000596046,+ "routeReadyMedianMs": 256.70000000298023,"scriptSourceOwnerSet": "launchpad-static","stateProfile": "empty"},@@ -85,13 +85,13 @@"scriptRequestCount": 0,"totalRawBytes": 0},- "domContentLoadedMedianMs": 123.89999999850988,+ "domContentLoadedMedianMs": 113.20000000298023,"id": "launchpad","layoutAckMedianMs": 0,"layoutReturnSwitchMedianMs": 0,"layoutSwitchMedianMs": 0,- "loadMedianMs": 124,- "longestTaskMaxMs": 72,+ "loadMedianMs": 113.29999999701977,+ "longestTaskMaxMs": 69,"owner": "app","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:launchpad",@@ -101,24 +101,24 @@"fontRawBytes": 23664,"imageRawBytes": 0,"largestAssetRawBytes": 746376,- "otherRawBytes": 159169,+ "otherRawBytes": 159359,"requestCount": 38,- "scriptRawBytes": 1635101,+ "scriptRawBytes": 1635291,"scriptRequestCount": 34,- "totalRawBytes": 1820093+ "totalRawBytes": 1820473},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 0,"largestAssetRawBytes": 753840,- "otherRawBytes": 160761,+ "otherRawBytes": 160953,"requestCount": 38,- "scriptRawBytes": 1651453,+ "scriptRawBytes": 1651644,"scriptRequestCount": 34,- "totalRawBytes": 1838294+ "totalRawBytes": 1838678},- "routeReadyMedianMs": 295.6000000014901,+ "routeReadyMedianMs": 270.1000000014901,"scriptSourceOwnerSet": "launchpad-static","stateProfile": "representative"},@@ -145,15 +145,15 @@"scriptRequestCount": 0,"totalRawBytes": 0},- "domContentLoadedMedianMs": 123.5,+ "domContentLoadedMedianMs": 113,"id": "editor-minimal","layoutAckMedianMs": 0,"layoutReturnSwitchMedianMs": 0,"layoutSwitchMedianMs": 0,- "loadMedianMs": 123.70000000298023,- "longestTaskMaxMs": 102,+ "loadMedianMs": 113.10000000149012,+ "longestTaskMaxMs": 94,"owner": "workbench",- "projectSwitchMedianMs": 44,+ "projectSwitchMedianMs": 36.400000005960464,"readyMark": "invokeai:ready:widget:center:preview","remediationTicket": "deepen-widget-registry-loading","resourceBaseline": {@@ -161,24 +161,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 159169,+ "otherRawBytes": 159359,"requestCount": 115,- "scriptRawBytes": 3271292,+ "scriptRawBytes": 3271494,"scriptRequestCount": 110,- "totalRawBytes": 3612660+ "totalRawBytes": 3613052},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 160761,+ "otherRawBytes": 160953,"requestCount": 115,- "scriptRawBytes": 3304005,+ "scriptRawBytes": 3304209,"scriptRequestCount": 110,- "totalRawBytes": 3648787+ "totalRawBytes": 3649183},- "routeReadyMedianMs": 690.3999999985099,+ "routeReadyMedianMs": 654.3999999985099,"scriptSourceOwnerSet": "editor-minimal-static","stateProfile": "empty"},@@ -205,15 +205,15 @@"scriptRequestCount": 0,"totalRawBytes": 0},- "domContentLoadedMedianMs": 123.60000000149012,+ "domContentLoadedMedianMs": 112.60000000149012,"id": "editor-minimal","layoutAckMedianMs": 0,"layoutReturnSwitchMedianMs": 0,"layoutSwitchMedianMs": 0,- "loadMedianMs": 123.69999999552965,- "longestTaskMaxMs": 200,+ "loadMedianMs": 112.80000000447035,+ "longestTaskMaxMs": 185,"owner": "workbench",- "projectSwitchMedianMs": 82,+ "projectSwitchMedianMs": 70.89999999850988,"readyMark": "invokeai:ready:widget:center:preview","remediationTicket": "deepen-widget-registry-loading","resourceBaseline": {@@ -221,24 +221,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 159169,+ "otherRawBytes": 159359,"requestCount": 115,- "scriptRawBytes": 3271292,+ "scriptRawBytes": 3271494,"scriptRequestCount": 110,- "totalRawBytes": 3612660+ "totalRawBytes": 3613052},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 160761,+ "otherRawBytes": 160953,"requestCount": 115,- "scriptRawBytes": 3304005,+ "scriptRawBytes": 3304209,"scriptRequestCount": 110,- "totalRawBytes": 3648787+ "totalRawBytes": 3649183},- "routeReadyMedianMs": 476.8999999985099,+ "routeReadyMedianMs": 428.5,"scriptSourceOwnerSet": "editor-minimal-static","stateProfile": "representative"},@@ -247,31 +247,31 @@"cssRawBytes": 0,"fontRawBytes": 0,"imageRawBytes": 0,- "largestAssetRawBytes": 283464,+ "largestAssetRawBytes": 286370,"otherRawBytes": 0,"requestCount": 7,- "scriptRawBytes": 441717,+ "scriptRawBytes": 444668,"scriptRequestCount": 7,- "totalRawBytes": 441717+ "totalRawBytes": 444668},"activatedResourceLimits": {"cssRawBytes": 0,"fontRawBytes": 0,"imageRawBytes": 0,- "largestAssetRawBytes": 286299,+ "largestAssetRawBytes": 289234,"otherRawBytes": 0,"requestCount": 7,- "scriptRawBytes": 446135,+ "scriptRawBytes": 449115,"scriptRequestCount": 7,- "totalRawBytes": 446135+ "totalRawBytes": 449115},- "domContentLoadedMedianMs": 123.19999999552965,+ "domContentLoadedMedianMs": 113.5,"id": "editor-canvas","layoutAckMedianMs": 2.2999999970197678,- "layoutReturnSwitchMedianMs": 58.400000005960464,- "layoutSwitchMedianMs": 98,- "loadMedianMs": 123.19999999552965,- "longestTaskMaxMs": 137,+ "layoutReturnSwitchMedianMs": 53.20000000298023,+ "layoutSwitchMedianMs": 93.5,+ "loadMedianMs": 113.60000000149012,+ "longestTaskMaxMs": 121,"owner": "canvas","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:widget:center:canvas",@@ -281,24 +281,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 159169,+ "otherRawBytes": 159359,"requestCount": 122,- "scriptRawBytes": 3713009,+ "scriptRawBytes": 3716162,"scriptRequestCount": 117,- "totalRawBytes": 4054377+ "totalRawBytes": 4057720},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 160761,+ "otherRawBytes": 160953,"requestCount": 122,- "scriptRawBytes": 3750140,+ "scriptRawBytes": 3753324,"scriptRequestCount": 117,- "totalRawBytes": 4094921+ "totalRawBytes": 4098298},- "routeReadyMedianMs": 1080.2000000029802,+ "routeReadyMedianMs": 1046.2999999970198,"scriptSourceOwnerSet": "editor-canvas-static","stateProfile": "empty"},@@ -307,31 +307,31 @@"cssRawBytes": 0,"fontRawBytes": 0,"imageRawBytes": 0,- "largestAssetRawBytes": 283464,+ "largestAssetRawBytes": 286370,"otherRawBytes": 0,"requestCount": 7,- "scriptRawBytes": 441717,+ "scriptRawBytes": 444668,"scriptRequestCount": 7,- "totalRawBytes": 441717+ "totalRawBytes": 444668},"activatedResourceLimits": {"cssRawBytes": 0,"fontRawBytes": 0,"imageRawBytes": 0,- "largestAssetRawBytes": 286299,+ "largestAssetRawBytes": 289234,"otherRawBytes": 0,"requestCount": 7,- "scriptRawBytes": 446135,+ "scriptRawBytes": 449115,"scriptRequestCount": 7,- "totalRawBytes": 446135+ "totalRawBytes": 449115},- "domContentLoadedMedianMs": 127.29999999701977,+ "domContentLoadedMedianMs": 112.90000000596046,"id": "editor-canvas",- "layoutAckMedianMs": 3.2000000029802322,- "layoutReturnSwitchMedianMs": 49.20000000298023,- "layoutSwitchMedianMs": 101.80000000447035,- "loadMedianMs": 127.5,- "longestTaskMaxMs": 198,+ "layoutAckMedianMs": 2.5,+ "layoutReturnSwitchMedianMs": 49.80000000447035,+ "layoutSwitchMedianMs": 89.80000000447035,+ "loadMedianMs": 113,+ "longestTaskMaxMs": 173,"owner": "canvas","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:widget:center:canvas",@@ -341,24 +341,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 159169,+ "otherRawBytes": 159359,"requestCount": 122,- "scriptRawBytes": 3713009,+ "scriptRawBytes": 3716162,"scriptRequestCount": 117,- "totalRawBytes": 4054377+ "totalRawBytes": 4057720},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 160761,+ "otherRawBytes": 160953,"requestCount": 122,- "scriptRawBytes": 3750140,+ "scriptRawBytes": 3753324,"scriptRequestCount": 117,- "totalRawBytes": 4094921+ "totalRawBytes": 4098298},- "routeReadyMedianMs": 1228.3000000044703,+ "routeReadyMedianMs": 1124.2999999970198,"scriptSourceOwnerSet": "editor-canvas-static","stateProfile": "representative"},@@ -385,13 +385,13 @@"scriptRequestCount": 6,"totalRawBytes": 383461},- "domContentLoadedMedianMs": 124.5,+ "domContentLoadedMedianMs": 116.39999999850988,"id": "editor-workflow",- "layoutAckMedianMs": 2.600000001490116,- "layoutReturnSwitchMedianMs": 35.70000000298023,- "layoutSwitchMedianMs": 97.79999999701977,- "loadMedianMs": 124.69999999552965,- "longestTaskMaxMs": 107,+ "layoutAckMedianMs": 2.2000000029802322,+ "layoutReturnSwitchMedianMs": 31.700000002980232,+ "layoutSwitchMedianMs": 88.79999999701977,+ "loadMedianMs": 116.5,+ "longestTaskMaxMs": 94,"owner": "workflow","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:widget:center:workflow",@@ -401,24 +401,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 159169,+ "otherRawBytes": 159359,"requestCount": 122,- "scriptRawBytes": 3635543,+ "scriptRawBytes": 3635745,"scriptRequestCount": 116,- "totalRawBytes": 3992324+ "totalRawBytes": 3992716},"resourceLimits": {"cssRawBytes": 17748,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 160761,+ "otherRawBytes": 160953,"requestCount": 122,- "scriptRawBytes": 3671899,+ "scriptRawBytes": 3672103,"scriptRequestCount": 116,- "totalRawBytes": 4032248+ "totalRawBytes": 4032644},- "routeReadyMedianMs": 1093.7000000029802,+ "routeReadyMedianMs": 1043.7999999970198,"scriptSourceOwnerSet": "editor-workflow-static","stateProfile": "empty"},@@ -445,13 +445,13 @@"scriptRequestCount": 6,"totalRawBytes": 383461},- "domContentLoadedMedianMs": 126,+ "domContentLoadedMedianMs": 116,"id": "editor-workflow",- "layoutAckMedianMs": 2.899999998509884,- "layoutReturnSwitchMedianMs": 43.5,- "layoutSwitchMedianMs": 137.39999999850988,- "loadMedianMs": 126.19999999552965,- "longestTaskMaxMs": 398,+ "layoutAckMedianMs": 2.399999998509884,+ "layoutReturnSwitchMedianMs": 39.20000000298023,+ "layoutSwitchMedianMs": 125.70000000298023,+ "loadMedianMs": 116.10000000149012,+ "longestTaskMaxMs": 333,"owner": "workflow","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:widget:center:workflow",@@ -461,24 +461,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 159169,+ "otherRawBytes": 159359,"requestCount": 122,- "scriptRawBytes": 3635543,+ "scriptRawBytes": 3635745,"scriptRequestCount": 116,- "totalRawBytes": 3992324+ "totalRawBytes": 3992716},"resourceLimits": {"cssRawBytes": 17748,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 160761,+ "otherRawBytes": 160953,"requestCount": 122,- "scriptRawBytes": 3671899,+ "scriptRawBytes": 3672103,"scriptRequestCount": 116,- "totalRawBytes": 4032248+ "totalRawBytes": 4032644},- "routeReadyMedianMs": 1283.5,+ "routeReadyMedianMs": 1142.3999999985099,"scriptSourceOwnerSet": "editor-workflow-static","stateProfile": "representative"},@@ -505,13 +505,13 @@"scriptRequestCount": 0,"totalRawBytes": 0},- "domContentLoadedMedianMs": 124.20000000298023,+ "domContentLoadedMedianMs": 113.40000000596046,"id": "editor-gallery","layoutAckMedianMs": 0,"layoutReturnSwitchMedianMs": 0,- "layoutSwitchMedianMs": 28,- "loadMedianMs": 124.30000000447035,- "longestTaskMaxMs": 112,+ "layoutSwitchMedianMs": 24.799999997019768,+ "loadMedianMs": 113.60000000149012,+ "longestTaskMaxMs": 93,"owner": "gallery","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:widget:center:gallery",@@ -521,24 +521,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 159169,+ "otherRawBytes": 159359,"requestCount": 115,- "scriptRawBytes": 3271292,+ "scriptRawBytes": 3271494,"scriptRequestCount": 110,- "totalRawBytes": 3612660+ "totalRawBytes": 3613052},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 160761,+ "otherRawBytes": 160953,"requestCount": 115,- "scriptRawBytes": 3304005,+ "scriptRawBytes": 3304209,"scriptRequestCount": 110,- "totalRawBytes": 3648787+ "totalRawBytes": 3649183},- "routeReadyMedianMs": 1293.7999999970198,+ "routeReadyMedianMs": 1244.5,"scriptSourceOwnerSet": "editor-minimal-static","stateProfile": "empty"},@@ -565,13 +565,13 @@"scriptRequestCount": 0,"totalRawBytes": 0},- "domContentLoadedMedianMs": 125,+ "domContentLoadedMedianMs": 115.40000000596046,"id": "editor-gallery","layoutAckMedianMs": 0,"layoutReturnSwitchMedianMs": 0,- "layoutSwitchMedianMs": 100.80000000447035,- "loadMedianMs": 125.20000000298023,- "longestTaskMaxMs": 196,+ "layoutSwitchMedianMs": 84.09999999403954,+ "loadMedianMs": 115.5,+ "longestTaskMaxMs": 171,"owner": "gallery","projectSwitchMedianMs": 0,"readyMark": "invokeai:ready:widget:center:gallery",@@ -581,24 +581,24 @@"fontRawBytes": 23664,"imageRawBytes": 156376,"largestAssetRawBytes": 746376,- "otherRawBytes": 159169,+ "otherRawBytes": 159359,"requestCount": 115,- "scriptRawBytes": 3271292,+ "scriptRawBytes": 3271494,"scriptRequestCount": 110,- "totalRawBytes": 3612660+ "totalRawBytes": 3613052},"resourceLimits": {"cssRawBytes": 2181,"fontRawBytes": 23901,"imageRawBytes": 157940,"largestAssetRawBytes": 753840,- "otherRawBytes": 160761,+ "otherRawBytes": 160953,"requestCount": 115,- "scriptRawBytes": 3304005,+ "scriptRawBytes": 3304209,"scriptRequestCount": 110,- "totalRawBytes": 3648787+ "totalRawBytes": 3649183},- "routeReadyMedianMs": 1513,+ "routeReadyMedianMs": 1416.5999999940395,"scriptSourceOwnerSet": "editor-minimal-static","stateProfile": "representative"}@@ -2861,6 +2861,7 @@"source:src/workbench/widgets/layers/LayerFilterOperationButton.tsx","source:src/workbench/widgets/layers/LayerGroupContextMenu.tsx","source:src/workbench/widgets/layers/LayerRow.tsx",+ "source:src/workbench/widgets/layers/LayerRowSurface.tsx","source:src/workbench/widgets/layers/LayerStackHeader.tsx","source:src/workbench/widgets/layers/LayerStackMenu.tsx","source:src/workbench/widgets/layers/LayerSurfaceHost.tsx",diff --git a/invokeai/frontend/webv2/public/locales/en.json b/invokeai/frontend/webv2/public/locales/en.jsonindex 07a172d085..31742be7d0 100644--- a/invokeai/frontend/webv2/public/locales/en.json+++ b/invokeai/frontend/webv2/public/locales/en.json@@ -2538,8 +2538,16 @@"exclude": "Exclude layer below","extractMaskedArea": "Extract masked area","fitToBbox": "Fit to bbox",- "hide": "Hide layer",- "hideOnCanvas": "Hide on canvas",+ "disableLayer": "Disable layer",+ "enableLayer": "Enable layer",+ "disableSelected": "Disable selected",+ "enableSelected": "Enable selected",+ "disableGroup": "Disable group",+ "enableGroup": "Enable group",+ "hideLayer": "Hide layer",+ "showLayer": "Show layer",+ "hideSelectedLayers": "Hide selected",+ "showSelectedLayers": "Show selected","intersect": "Intersect with layer below","mergeSelected": "Merge selected layers","lock": "Lock layer",@@ -2560,13 +2568,11 @@"saveLayerToAssets": "Save layer to assets","select": "Select {{name}}","selectObject": "Select object",- "show": "Show layer",- "showOnCanvas": "Show on canvas","toggleAutoNegative": "Toggle auto-negative",- "toggleHidden": "Show/hide on canvas",+ "toggleHidden": "Show/hide layer","toggleLock": "Toggle lock","toggleTransparencyEffect": "Toggle transparent preview",- "toggleVisibility": "Toggle visibility",+ "toggleVisibility": "Enable/disable","transform": "Transform","unsupported": "This action is not supported for this layer.","unlock": "Unlock layer",@@ -2588,11 +2594,7 @@"groupCount_other": "Group {{count}} layers","deleteCount_one": "Delete layer","deleteCount_other": "Delete {{count}} layers",- "hideSelected": "Hide selected",- "showSelected": "Show selected",- "hideSelectedOnCanvas": "Hide selected on canvas",- "showSelectedOnCanvas": "Show selected on canvas",- "toggleActive": "Toggle layer active",+ "toggleActive": "Enable/disable layer","hideModifiers": "Hide modifiers","showModifiers": "Show modifiers","addDenoiseLimit": "Add denoise limit",@@ -2887,8 +2889,8 @@"mergeVisible": "Merge visible","new": "New layer","showAll": "Show all",- "toggleVisibility": "Toggle group visibility",- "toggleHidden": "Show/hide all on canvas"+ "toggleVisibility": "Enable/disable group",+ "toggleHidden": "Show/hide group"},"groups": {"control": "Control Layers",@@ -2977,12 +2979,6 @@},"footer": {"filter": "Filter layers",- "layers_one": "{{count}} layer",- "layers_other": "{{count}} layers",- "groups_one": "{{count}} group",- "groups_other": "{{count}} groups",- "selected_one": "{{count}} selected",- "selected_other": "{{count}} selected","degraded": "Large document: thumbnails and drag reordering are off."},"dropRefused": "Can't drop here: {{reason}}",@@ -3033,7 +3029,7 @@"disable": "Disable","enable": "Enable","parentDisabled": "Layer is disabled",- "toggleActive": "Toggle active",+ "toggleActive": "Enable/disable","denoise": "Denoise limit","denoiseHelp": "Caps how strongly generation may repaint the masked area.","noise": "Noise",@@ -3042,12 +3038,19 @@"removeNoise": "Remove noise","brightnessContrast": "Brightness/Contrast","duplicateAdjustment": "Duplicate adjustment",+ "renameAdjustment": "Rename adjustment","moveDown": "Move down","moveUp": "Move up","removeAdjustment": "Remove adjustment","reorderAdjustment": "Reorder adjustment","moveReferenceImage": "Move reference image","moveToLayer": "Move to “{{name}}”"+ },+ "groupHints": {+ "control": "Layers that guide generation with structural hints like edges, depth, or pose.",+ "inpaint_mask": "Masks that mark regions of the image for regeneration.",+ "raster": "The pixel layers that compose your image and feed generation.",+ "regional_guidance": "Regions that apply prompts and reference images to part of the image."}},"gallery": {diff --git a/invokeai/frontend/webv2/src/platform/ui/Row.tsx b/invokeai/frontend/webv2/src/platform/ui/Row.tsxindex ce2179f388..a1a3031e71 100644--- a/invokeai/frontend/webv2/src/platform/ui/Row.tsx+++ b/invokeai/frontend/webv2/src/platform/ui/Row.tsx@@ -9,8 +9,8 @@ export type RowProps = BoxProps & RecipeVariantProps<typeof rowRecipe>;* come from the recipe, and the previously ad-hoc `isSelected ? … : …`* ternaries collapse into the `active` variant.*- * - `active`: `none` (default) | `muted` (selected) | `brand` (identity) |- * `accent` (active item / selection highlight)+ * - `active`: `none` (default) | `muted` (context) | `selected` (co-selected) |+ * `emphasized` (the active item) | `brand` (identity) | `accent` (highlight)** Render as a real `<button>` (`as="button"`) when the row is clickable.*/diff --git a/invokeai/frontend/webv2/src/platform/ui/SegmentTabs.tsx b/invokeai/frontend/webv2/src/platform/ui/SegmentTabs.tsxindex 84d215ba07..94bc94abf8 100644--- a/invokeai/frontend/webv2/src/platform/ui/SegmentTabs.tsx+++ b/invokeai/frontend/webv2/src/platform/ui/SegmentTabs.tsx@@ -1,7 +1,7 @@import type { KeyboardEvent as ReactKeyboardEvent, ReactNode } from 'react';-import { chakra, HStack, Text } from '@chakra-ui/react';-import { useCallback } from 'react';+import { Box, chakra, HStack, Text } from '@chakra-ui/react';+import { Fragment, useCallback } from 'react';const TAB_HOVER_PROPS = { bg: 'bg.muted', color: 'fg' };@@ -72,16 +72,29 @@ export const SegmentTabs = <T extends string>({role="tablist"onKeyDown={focusSibling}>- {tabs.map((tab) => (- <SegmentTabButton- key={tab.id}- id={tab.id}- idBase={idBase}- isSelected={tab.id === activeId}- isShown={tab.id === activeId && showActivePanel}- label={tab.label}- onSelect={onSelect}- />+ {tabs.map((tab, index) => (+ <Fragment key={tab.id}>+ {index > 0 ? (+ <Box+ aria-hidden+ bg="border.emphasized"+ flexShrink={0}+ h="3.5"+ opacity={tab.id === activeId || tabs[index - 1]!.id === activeId ? 0 : 1}+ rounded="full"+ transition="opacity var(--wb-motion-duration-fast)"+ w="1px"+ />+ ) : null}+ <SegmentTabButton+ id={tab.id}+ idBase={idBase}+ isSelected={tab.id === activeId}+ isShown={tab.id === activeId && showActivePanel}+ label={tab.label}+ onSelect={onSelect}+ />+ </Fragment>))}</HStack>{trailing}diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.tsindex 4f739dd9ac..fc119983c7 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' },+ selected: { bg: 'bg.emphasized/60', _hover: { bg: 'bg.emphasized/60' } },emphasized: { bg: 'bg.emphasized', _hover: { bg: 'bg.emphasized' } },brand: {bg: 'brand.subtle',diff --git a/invokeai/frontend/webv2/src/workbench/canvas-engine/contracts.ts b/invokeai/frontend/webv2/src/workbench/canvas-engine/contracts.tsindex f2541de588..37d2cb00f0 100644--- a/invokeai/frontend/webv2/src/workbench/canvas-engine/contracts.ts+++ b/invokeai/frontend/webv2/src/workbench/canvas-engine/contracts.ts@@ -167,16 +167,21 @@ export interface CanvasAdjustmentCurves {b?: [number, number][];}+interface CanvasAdjustmentEntryBase {+ id: string;+ isEnabled: boolean;+ /** A user-given name; absent entries display their type's name. */+ name?: string;+}+/*** One non-destructive adjustment in a raster layer's ordered stack. List order* is application order; disabling keeps the tuned values out of every render* without losing them. The Layers tree projects each entry as a child row.*/export type CanvasAdjustmentEntry =- | { id: string; isEnabled: boolean; type: 'brightness-contrast'; brightness: number; contrast: number }- | {- id: string;- isEnabled: boolean;+ | (CanvasAdjustmentEntryBase & { type: 'brightness-contrast'; brightness: number; contrast: number })+ | (CanvasAdjustmentEntryBase & {type: 'levels';/** Input remap: 0–255 with `inBlack < inWhite`; `gamma` is the midtone exponent base (1 = linear). */inBlack: number;@@ -184,17 +189,15 @@ export type CanvasAdjustmentEntry =gamma: number;outBlack: number;outWhite: number;- }- | { id: string; isEnabled: boolean; type: 'curves'; curves: CanvasAdjustmentCurves }- | { id: string; isEnabled: boolean; type: 'hsl'; saturation: number }- | {- id: string;- isEnabled: boolean;+ })+ | (CanvasAdjustmentEntryBase & { type: 'curves'; curves: CanvasAdjustmentCurves })+ | (CanvasAdjustmentEntryBase & { type: 'hsl'; saturation: number })+ | (CanvasAdjustmentEntryBase & {type: 'hue';/** Rotation around the color wheel in degrees, -180 to 180. */rotation: number;- }- | { id: string; isEnabled: boolean; type: 'invert' };+ })+ | (CanvasAdjustmentEntryBase & { type: 'invert' });/** A raster layer's ordered adjustment stack, applied top to bottom. */export type CanvasAdjustmentsContract = readonly CanvasAdjustmentEntry[];diff --git a/invokeai/frontend/webv2/src/workbench/canvasMigration.ts b/invokeai/frontend/webv2/src/workbench/canvasMigration.tsindex 76194b204d..5d63aa1832 100644--- a/invokeai/frontend/webv2/src/workbench/canvasMigration.ts+++ b/invokeai/frontend/webv2/src/workbench/canvasMigration.ts@@ -84,35 +84,33 @@ const zTransform = z.object({});const zFilter = z.object({ settings: z.record(z.string(), z.unknown()), type: z.string() });const zCurve = z.array(z.tuple([zFiniteNumber, zFiniteNumber]));+const zAdjustmentBase = { id: z.string(), isEnabled: z.boolean(), name: z.string().optional() };const zAdjustmentEntry = z.discriminatedUnion('type', [z.object({+ ...zAdjustmentBase,brightness: zFiniteNumber,contrast: zFiniteNumber,- id: z.string(),- isEnabled: z.boolean(),type: z.literal('brightness-contrast'),}),- z.object({ id: z.string(), isEnabled: z.boolean(), saturation: zFiniteNumber, type: z.literal('hsl') }),+ z.object({ ...zAdjustmentBase, saturation: zFiniteNumber, type: z.literal('hsl') }),z.object({+ ...zAdjustmentBase,curves: z.object({ b: zCurve.optional(), g: zCurve.optional(), r: zCurve.optional() }),- id: z.string(),- isEnabled: z.boolean(),type: z.literal('curves'),}),z.object({+ ...zAdjustmentBase,gamma: zFiniteNumber,- id: z.string(),inBlack: zFiniteNumber,inWhite: zFiniteNumber,- isEnabled: z.boolean(),outBlack: zFiniteNumber,outWhite: zFiniteNumber,type: z.literal('levels'),}).refine((entry) => entry.inBlack < entry.inWhite && entry.gamma > 0),- z.object({ id: z.string(), isEnabled: z.boolean(), rotation: zFiniteNumber, type: z.literal('hue') }),- z.object({ id: z.string(), isEnabled: z.boolean(), type: z.literal('invert') }),+ z.object({ ...zAdjustmentBase, rotation: zFiniteNumber, type: z.literal('hue') }),+ z.object({ ...zAdjustmentBase, type: z.literal('invert') }),]);const zAdjustments = z.array(zAdjustmentEntry);const zControlAdapter = zdiff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/AdjustmentSettings.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/AdjustmentSettings.tsxindex 88ae62c855..07ff07d3be 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/AdjustmentSettings.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/AdjustmentSettings.tsx@@ -35,7 +35,7 @@ import { applyStructuralPreview } from './layerOps';export type AdjustmentsEngine = CanvasStructuralEngine & CanvasPreparedEngine;-const SELECT_POSITIONING = { placement: 'bottom-end', sameWidth: false } as const;+const SELECT_POSITIONING = { placement: 'bottom-end', sameWidth: true } as const;const CurveSvg = chakra('svg');const CurveRect = chakra('rect');@@ -95,7 +95,6 @@ const AdjustmentEntryEditor = ({}) => {const commitPrepared = usePreparedCommit(engine);const { t } = useTranslation();- // The whole stack when the current gesture started; undo restores it entirely.const gestureBaselineRef = useRef<readonly CanvasAdjustmentEntry[] | null>(null);const patchLive = useCallback(diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/ControlLayerSettings.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/ControlLayerSettings.tsxindex 6ec4a3a16e..ac2ef8df78 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/ControlLayerSettings.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/ControlLayerSettings.tsx@@ -32,7 +32,7 @@ import { applyStructuralPreview, CONTROL_ADAPTER_DEFAULTS, CONTROL_WEIGHT_BOUNDSimport { runLayerFilterOperation } from './layerPropertiesOperation';import { useSelectedMainModel } from './useSelectedMainModel';-const SELECT_POSITIONING = { placement: 'bottom-end', sameWidth: false } as const;+const SELECT_POSITIONING = { placement: 'bottom-end', sameWidth: true } as const;const CONTROL_ADAPTER_KINDS: readonly ControlAdapterKind[] = ['controlnet',diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/InpaintMaskSettings.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/InpaintMaskSettings.tsxindex 77636e3b13..2ffa232029 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/InpaintMaskSettings.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/InpaintMaskSettings.tsx@@ -153,4 +153,4 @@ export const InpaintMaskSettings = ({ engine, layer }: InpaintMaskSettingsProps));};-const SELECT_POSITIONING = { placement: 'bottom-end', sameWidth: false } as const;+const SELECT_POSITIONING = { placement: 'bottom-end', sameWidth: true } as const;diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerActiveDot.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerActiveDot.tsxindex af6146e199..b2869b3ec2 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerActiveDot.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerActiveDot.tsx@@ -10,7 +10,7 @@ const DOT_BASE = {borderWidth: '1px',content: '""',h: '3',- inset: '50% auto auto 50%',+ inset: '50% auto auto calc(50% + 1.5px)',position: 'absolute',transform: 'translate(-50%, -50%)',transition: 'background var(--wb-motion-duration-fast), border-color var(--wb-motion-duration-fast)',diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerChildMenu.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerChildMenu.tsxindex 9a3d02f162..3b9a734974 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerChildMenu.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerChildMenu.tsx@@ -9,6 +9,7 @@ import {CircleIcon,CircleOffIcon,CopyIcon,+ PencilIcon,XIcon,type LucideIcon,} from 'lucide-react';@@ -77,6 +78,7 @@ export const LayerChildMenu = ({const handleToggle = useCallback(() => commands.setChildEnabled(child, !child.isEnabled), [child, commands]);const handleRemove = useCallback(() => commands.removeChild(child), [child, commands]);const handleDuplicate = useCallback(() => commands.duplicateChild(child), [child, commands]);+ const handleRename = useCallback(() => commands.startRename(child.key), [child.key, commands]);const handleMoveUp = useCallback(() => commands.moveChild(child, -1), [child, commands]);const handleMoveDown = useCallback(() => commands.moveChild(child, 1), [child, commands]);const ordered = isOrderedChildKind(child.kind);@@ -95,6 +97,13 @@ export const LayerChildMenu = ({/>{ordered ? (<>+ <ChildMenuItem+ disabled={editingLocked}+ icon={PencilIcon}+ label={t('widgets.layers.modifiers.renameAdjustment')}+ value="rename"+ onSelect={handleRename}+ /><ChildMenuItemdisabled={editingLocked}icon={CopyIcon}diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerChildRow.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerChildRow.tsxindex f7d289fe65..d1feb0f9ba 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerChildRow.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerChildRow.tsx@@ -1,8 +1,7 @@-import type { CSSProperties, KeyboardEvent, MouseEvent } from 'react';+import type { CSSProperties, FocusEvent, KeyboardEvent, MouseEvent } from 'react';-import { Box, HStack, Icon, Text } from '@chakra-ui/react';+import { Box, HStack, Icon, Input, Text } from '@chakra-ui/react';import { useDraggable, useDroppable } from '@dnd-kit/core';-import { Row } from '@platform/ui';import {ContrastIcon,DropletIcon,@@ -24,9 +23,12 @@ import { LayerActiveDot, ROW_SELECTION_FOCUS } from './LayerActiveDot';import { childRowNameKey, isOrderedChildKind, type LayerChildRowKind, type ProjectedChildRow } from './layerChildRows';import { LAYER_TREE_INDENT_PX } from './layerPanelRows';import { anchorFromPoint } from './layerRowCommands';+import { LayerRowSurface } from './LayerRowSurface';const THUMBNAIL_IMG_STYLE: CSSProperties = { height: '100%', objectFit: 'cover', width: '100%' };+const stopPropagation = (event: { stopPropagation: () => void }): void => event.stopPropagation();+const CHILD_ROW_GLYPHS: Record<LayerChildRowKind, LucideIcon> = {'adjustment-brightness-contrast': SunMediumIcon,'adjustment-curves': SplineIcon,@@ -43,11 +45,14 @@ const CHILD_ROW_GLYPHS: Record<LayerChildRowKind, LucideIcon> = {export const isDraggableChildKind = (kind: LayerChildRowKind): boolean =>kind === 'reference-image' || isOrderedChildKind(kind);-/** The row's display name; reference images are numbered, other modifiers named by kind. */+/** Kinds whose rows carry a user-given name: adjustment entries. */+export const isRenameableChildKind = isOrderedChildKind;++/** The row's display name: its custom name, a reference image's number, or its kind's name. */export const childRowName = (child: ProjectedChildRow, t: (key: string) => string): string =>child.kind === 'reference-image'? `${t('widgets.layers.regionalGuidance.referenceImage')} ${child.posInSet}`- : t(childRowNameKey(child.kind));+ : (child.customName ?? t(childRowNameKey(child.kind)));interface LayerChildRowProps {child: ProjectedChildRow;@@ -57,6 +62,7 @@ interface LayerChildRowProps {dragDisabled: boolean;editingLocked: boolean;focused: boolean;+ renaming: boolean;selected: boolean;}@@ -73,10 +79,13 @@ const LayerChildRowComponent = ({dragDisabled,editingLocked,focused,+ renaming,selected,}: LayerChildRowProps) => {const { t } = useTranslation();const rowElement = useRef<HTMLDivElement | null>(null);+ const nameInput = useRef<HTMLInputElement | null>(null);+ const renameCancelled = useRef(false);const { setNodeRef: setDropRef } = useDroppable({data: { stack: child.stack },disabled: dragDisabled,@@ -95,7 +104,6 @@ const LayerChildRowComponent = ({},[setDragRef, setDropRef]);- // Pointer listeners only, like layer rows: the tree owns the keyboard model.const dragListeners = useMemo(() => {if (dragDisabled || !listeners) {return {};@@ -137,6 +145,72 @@ const LayerChildRowComponent = ({},[child, commands, selected]);+ const startRename = useCallback(+ (event?: MouseEvent<HTMLElement>) => {+ if (event && (event.target as HTMLElement).closest('button, input')) {+ return;+ }+ if (!editingLocked && isRenameableChildKind(child.kind)) {+ commands.startRename(child.key);+ }+ },+ [child.key, child.kind, commands, editingLocked]+ );+ const finishRename = useCallback(+ (refocus: boolean) => {+ commands.endRename();+ if (refocus) {+ rowElement.current?.focus();+ }+ },+ [commands]+ );+ const defaultName = child.kind === 'reference-image' ? null : t(childRowNameKey(child.kind));+ const commitName = useCallback(+ (refocus: boolean) => {+ const draft = nameInput.current?.value.trim() ?? '';+ const cancelled = renameCancelled.current;+ // Refocusing the row blurs the still-mounted input, which re-enters this+ // handler; claiming the commit first keeps it to one dispatch.+ renameCancelled.current = true;+ finishRename(refocus);+ if (!cancelled) {+ commands.renameChild(child, draft.length > 0 && draft !== defaultName ? draft : null);+ }+ },+ [child, commands, defaultName, finishRename]+ );+ const handleNameBlur = useCallback(+ (event: FocusEvent<HTMLInputElement>) => {+ const next = event.relatedTarget;+ if (next === null && !window.document.hasFocus()) {+ return;+ }+ commitName(next === null);+ if (next instanceof HTMLElement) {+ next.focus();+ }+ },+ [commitName]+ );+ const handleNameKeyDown = useCallback(+ (event: KeyboardEvent<HTMLInputElement>) => {+ event.stopPropagation();+ if (event.key === 'Enter') {+ commitName(true);+ } else if (event.key === 'Escape') {+ renameCancelled.current = true;+ finishRename(true);+ }+ },+ [commitName, finishRename]+ );+ const focusOnMount = useCallback((input: HTMLInputElement | null) => {+ nameInput.current = input;+ renameCancelled.current = false;+ input?.focus();+ input?.select();+ }, []);const muted = !child.isEnabled || !child.parentContributing;@@ -159,18 +233,11 @@ const LayerChildRowComponent = ({_focusVisible={ROW_SELECTION_FOCUS}onClick={handleSelect}onContextMenu={handleContextMenu}+ onDoubleClick={startRename}onFocus={handleFocus}onKeyDown={handleKeyDown}>- <Row- active={selected ? 'emphasized' : undefined}- alignItems="center"- display="flex"- gap="1.5"- h="full"- px="1.5"- style={indentStyle}- >+ <LayerRowSurface active={selected ? 'emphasized' : undefined} indentStyle={indentStyle}><LayerActiveDotchecked={child.isEnabled}disabled={editingLocked}@@ -199,15 +266,31 @@ const LayerChildRowComponent = ({<Icon as={CHILD_ROW_GLYPHS[child.kind]} boxSize="3" />)}</Box>- <Text color={muted ? 'fg.muted' : undefined} flex="1" fontSize="2xs" fontWeight="600" minW="0" truncate>- {name}- </Text>- {child.detail !== null ? (+ {renaming ? (+ <Input+ ref={focusOnMount}+ aria-label={t('widgets.layers.actions.rename')}+ defaultValue={name}+ flex="1"+ minW="0"+ size="2xs"+ userSelect="text"+ onBlur={handleNameBlur}+ onClick={stopPropagation}+ onKeyDown={handleNameKeyDown}+ onPointerDown={stopPropagation}+ />+ ) : (+ <Text color={muted ? 'fg.muted' : undefined} flex="1" fontSize="2xs" fontWeight="600" minW="0" truncate>+ {name}+ </Text>+ )}+ {child.detail !== null && !renaming ? (<Text color="fg.subtle" flexShrink={0} fontSize="2xs" fontVariantNumeric="tabular-nums">{child.detail}</Text>) : null}- </Row>+ </LayerRowSurface></Box>);};diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerContextMenu.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerContextMenu.tsxindex e6ba1faa76..540baaeccf 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerContextMenu.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerContextMenu.tsx@@ -462,7 +462,7 @@ const LayerMenu = ({const index = getDocumentIndex(document);const isEnabled = !targets.every((id) => index.byId.get(id)?.node.isEnabled ?? true);commitPrepared(- t(isEnabled ? 'widgets.layers.actions.showSelected' : 'widgets.layers.actions.hideSelected'),+ t(isEnabled ? 'widgets.layers.actions.enableSelected' : 'widgets.layers.actions.disableSelected'),(model) => model.prepare({ type: 'set-enabled', updates: targets.map((id) => ({ id, isEnabled })) }));return;@@ -486,7 +486,7 @@ const LayerMenu = ({});const isHidden = !nodes.every((node) => isNodeHidden(node));commitPrepared(- t(isHidden ? 'widgets.layers.actions.hideSelectedOnCanvas' : 'widgets.layers.actions.showSelectedOnCanvas'),+ t(isHidden ? 'widgets.layers.actions.hideSelectedLayers' : 'widgets.layers.actions.showSelectedLayers'),(model) => model.prepare({ type: 'set-hidden', updates: nodes.map((node) => ({ id: node.id, isHidden })) }));return;diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerGroupContextMenu.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerGroupContextMenu.tsxindex 641c84b1ec..7f15aeb0ce 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerGroupContextMenu.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerGroupContextMenu.tsx@@ -15,6 +15,8 @@ import {ArrowDownToLineIcon,ArrowUpIcon,ArrowUpToLineIcon,+ CircleIcon,+ CircleOffIcon,CopyIcon,EyeIcon,EyeOffIcon,@@ -199,8 +201,8 @@ export const LayerGroupContextMenu = ({<Menu.Separator borderColor="border.subtle" /><Menu.Item disabled={locked} value="enabled" onSelect={handleToggleEnabled}><MenuRow- icon={group.isEnabled ? EyeOffIcon : EyeIcon}- label={t(group.isEnabled ? 'widgets.layers.actions.hide' : 'widgets.layers.actions.show')}+ icon={group.isEnabled ? CircleOffIcon : CircleIcon}+ label={t(group.isEnabled ? 'widgets.layers.actions.disableGroup' : 'widgets.layers.actions.enableGroup')}/></Menu.Item>{hideable ? (diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerRow.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerRow.tsxindex 1a7bc49b43..5e590c95b2 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerRow.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerRow.tsx@@ -1,9 +1,9 @@import type { CanvasLayerContract, CanvasNodeContract, SemanticNode } from '@workbench/canvas-engine/api';-import type { FocusEvent, KeyboardEvent, MouseEvent } from 'react';+import type { CSSProperties, FocusEvent, KeyboardEvent, MouseEvent } from 'react';import { Badge, Box, chakra, HStack, Icon, Input, Text } from '@chakra-ui/react';import { useDraggable, useDroppable } from '@dnd-kit/core';-import { IconButton, Row, Tooltip } from '@platform/ui';+import { IconButton, Tooltip } from '@platform/ui';import { MiddleTruncate } from '@platform/ui/MiddleTruncate';import { isGroupNode, isHideableLayer, isNodeHidden, isOverlayStack } from '@workbench/canvas-engine/api';import {@@ -28,20 +28,26 @@ import { recordLayerRowCommit } from './layerPanelDiagnostics';import { LAYER_TREE_INDENT_PX } from './layerPanelRows';import { anchorFromPoint } from './layerRowCommands';import { layerRowSummary } from './layerRowSummary';+import { LayerRowSurface } from './LayerRowSurface';import { LayerThumbnail, type LayerThumbnailEngine } from './LayerThumbnail';import { layerTypeIcon } from './layerTypeIcon';-const LAYER_ROW_BACKGROUND_TRANSITION = 'background min(40ms, var(--wb-motion-duration-fast)) ease-out';const CHEVRON_HOVER = { bg: 'bg.muted', color: 'fg' };const THUMBNAIL_SIZE = '8';+const GROUP_PILE_OFFSET_PX = 4;+const GROUP_PILE_CARD_PX = 24;/** How a row takes part in the current drag. */export type LayerRowDragState = 'source' | 'travelling' | null;interface LayerRowProps {+ /** A group on the primary layer's ancestor path; tinted as selection context. */+ ancestorOfPrimary: boolean;/** Projected child rows the layer owns; a chevron appears above zero. */childCount: number;+ /** One of this layer's child rows holds the sub-selection; the row yields the emphasis to it. */+ childSelected: boolean;childrenExpanded: boolean;commands: LayerRowCommands;drag: LayerRowDragState;@@ -66,7 +72,9 @@ const stopPropagation = (event: { stopPropagation: () => void }): void => event.* keyboard through the row's menu, so the tree stays a single tab stop.*/const LayerRowComponent = ({+ ancestorOfPrimary,childCount,+ childSelected,childrenExpanded,commands,drag,@@ -116,7 +124,6 @@ const LayerRowComponent = ({[commands, row.id]);const handleFocus = useCallback(() => commands.focus(row.id), [commands, row.id]);- // A pressed control never takes focus from the tree item; the row it belongs to keeps the tab stop.const keepRowFocus = useCallback((event: MouseEvent<HTMLElement>) => {event.preventDefault();rowElement.current?.focus();@@ -177,11 +184,17 @@ const LayerRowComponent = ({},[commands, row.id, selected]);- const startRename = useCallback(() => {- if (!editingLocked) {- commands.startRename(row.id);- }- }, [commands, editingLocked, row.id]);+ const startRename = useCallback(+ (event?: MouseEvent<HTMLElement>) => {+ if (event && (event.target as HTMLElement).closest('button, input')) {+ return;+ }+ if (!editingLocked) {+ commands.startRename(row.id);+ }+ },+ [commands, editingLocked, row.id]+ );const finishRename = useCallback((refocus: boolean) => {commands.endRename();@@ -195,6 +208,9 @@ const LayerRowComponent = ({(refocus: boolean) => {const name = nameInput.current?.value.trim() ?? '';const cancelled = renameCancelled.current;+ // Refocusing the row blurs the still-mounted input, which re-enters this+ // handler; claiming the commit first keeps it to one dispatch.+ renameCancelled.current = true;finishRename(refocus);if (!cancelled && name && name !== node.name) {commands.rename(row.id, name);@@ -238,8 +254,6 @@ const LayerRowComponent = ({input?.select();}, []);- // Pointer listeners only: the tree item owns its keyboard model; dnd-kit's keyboard activator,- // roledescription and instructions stay out of the accessibility tree.const dragListeners = useMemo(() => {if (dragDisabled || !listeners) {return {};@@ -253,6 +267,15 @@ const LayerRowComponent = ({const hiddenByAncestor = vm.documentHidden && !ownHidden;const lockedByAncestor = vm.effectiveLocked && !node.isLocked;const disabledByAncestor = !vm.contributionEnabled && node.isEnabled;+ const tone = primary+ ? childSelected+ ? 'muted'+ : 'emphasized'+ : selected+ ? 'selected'+ : ancestorOfPrimary+ ? 'muted'+ : undefined;return (<Box@@ -280,17 +303,7 @@ const LayerRowComponent = ({onFocus={handleFocus}onKeyDown={handleKeyDown}>- <Row- active={primary ? 'emphasized' : selected ? 'muted' : undefined}- alignItems="center"- cursor={drag === 'source' ? 'grabbing' : 'default'}- display="flex"- gap="1.5"- h="full"- px="1.5"- style={indentStyle}- transition={LAYER_ROW_BACKGROUND_TRANSITION}- >+ <LayerRowSurface active={tone} cursor={drag === 'source' ? 'grabbing' : 'default'} indentStyle={indentStyle}><LayerActiveDotchecked={node.isEnabled}disabled={editingLocked}@@ -322,69 +335,56 @@ const LayerRowComponent = ({<LayerThumbnail engine={engine} layer={layer!} /></Box>)}- {/* The identity slot: a group's disclosure chevron, or the layer's type- glyph — with a small modifier chevron stacked beneath it, Krita-style,- when the layer projects child rows. */}- {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"- flexDirection="column"- flexShrink={0}- justifyContent="center"- >- <Icon as={layerTypeIcon(layer!)} boxSize="3" color="fg.subtle" />- {childCount > 0 ? (- <chakra.button- aria-label={t(- childrenExpanded ? 'widgets.layers.actions.hideModifiers' : 'widgets.layers.actions.showModifiers'- )}- alignItems="center"- color="fg.muted"- cursor="pointer"- display="flex"- h="3"- justifyContent="center"- rounded="xs"- tabIndex={-1}- type="button"- w="4"- _hover={CHEVRON_HOVER}- onClick={handleToggleChildren}- onMouseDown={keepRowFocus}- onPointerDown={stopPropagation}- >- <Icon- as={ChevronRightIcon}- boxSize="3"- transform={childrenExpanded ? 'rotate(90deg)' : undefined}- transitionDuration="fast"- transitionProperty="transform"- />- </chakra.button>- ) : null}- </Box>- )}+ <Box+ alignItems="center"+ display="flex"+ flexDirection="column"+ flexShrink={0}+ h="6"+ justifyContent="center"+ w="5"+ >+ <Icon+ as={group ? (row.expanded ? FolderOpenIcon : FolderIcon) : layerTypeIcon(layer!)}+ boxSize="3"+ color="fg.subtle"+ />+ {group || childCount > 0 ? (+ <chakra.button+ aria-label={t(+ group+ ? row.expanded+ ? 'widgets.layers.actions.collapseGroup'+ : 'widgets.layers.actions.expandGroup'+ : childrenExpanded+ ? 'widgets.layers.actions.hideModifiers'+ : 'widgets.layers.actions.showModifiers'+ )}+ alignItems="center"+ color="fg.muted"+ cursor="pointer"+ display="flex"+ h="3"+ justifyContent="center"+ rounded="xs"+ tabIndex={-1}+ type="button"+ w="4"+ _hover={CHEVRON_HOVER}+ onClick={group ? handleToggleExpanded : handleToggleChildren}+ onMouseDown={keepRowFocus}+ onPointerDown={stopPropagation}+ >+ <Icon+ as={ChevronRightIcon}+ boxSize="3"+ transform={(group ? row.expanded : childrenExpanded) ? 'rotate(90deg)' : undefined}+ transitionDuration="fast"+ transitionProperty="transform"+ />+ </chakra.button>+ ) : null}+ </Box><Boxflex="1"minW="0"@@ -402,6 +402,7 @@ const LayerRowComponent = ({aria-label={t('widgets.layers.actions.rename')}defaultValue={node.name}size="2xs"+ userSelect="text"onBlur={handleNameBlur}onClick={stopPropagation}onKeyDown={handleNameKeyDown}@@ -461,15 +462,15 @@ const LayerRowComponent = ({</IconButton></Tooltip></HStack>- </Row>+ </LayerRowSurface></Box>);};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[] => {+/** The first few leaf layers of a group, depth first — what its preview pile shows. */+const groupLeafPreviews = (node: CanvasNodeContract, limit = 3): CanvasLayerContract[] => {const leaves: CanvasLayerContract[] = [];const walk = (candidate: CanvasNodeContract): void => {if (leaves.length >= limit) {@@ -492,8 +493,9 @@ const groupLeafPreviews = (node: CanvasNodeContract, limit = 4): CanvasLayerCont};/**- * 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.+ * A group's preview: its first leaves' live thumbnails stacked as a small pile,+ * top layer in front, so a closed folder still shows what it holds; an empty+ * group keeps the folder glyph.*/const GroupPreview = ({engine,@@ -507,6 +509,14 @@ const GroupPreview = ({thumbnails: boolean;}) => {const leaves = useMemo(() => (thumbnails ? groupLeafPreviews(node) : []), [node, thumbnails]);+ const cardStyles = useMemo(+ () =>+ leaves.map((_, index): CSSProperties => {+ const offset = index * GROUP_PILE_OFFSET_PX;+ return { height: GROUP_PILE_CARD_PX, left: offset, top: offset, width: GROUP_PILE_CARD_PX };+ }),+ [leaves]+ );if (leaves.length === 0) {return (<Box@@ -526,23 +536,14 @@ const GroupPreview = ({);}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 boxSize={THUMBNAIL_SIZE} flexShrink={0} position="relative">+ {leaves+ .map((leaf, index) => (+ <Box key={leaf.id} overflow="hidden" position="absolute" rounded="sm" style={cardStyles[index]}>+ <LayerThumbnail engine={engine} layer={leaf} />+ </Box>+ ))+ .reverse()}</Box>);};diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerRowSurface.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerRowSurface.tsxnew file mode 100644index 0000000000..a54c09a79a--- /dev/null+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerRowSurface.tsx@@ -0,0 +1,37 @@+import type { RowProps } from '@platform/ui';+import type { CSSProperties, ReactNode } from 'react';++import { Row } from '@platform/ui';++const LAYER_ROW_BACKGROUND_TRANSITION = 'background min(40ms, var(--wb-motion-duration-fast)) ease-out';++/**+ * The shared visual shell of every Layers-tree row — layer, group, and+ * projected child alike: one rhythm, one background transition, and the+ * arrow cursor of a tree item rather than the recipe's pointer.+ */+export const LayerRowSurface = ({+ active,+ children,+ cursor = 'default',+ indentStyle,+}: {+ active: RowProps['active'];+ children: ReactNode;+ cursor?: 'default' | 'grabbing';+ indentStyle?: CSSProperties;+}) => (+ <Row+ active={active}+ alignItems="center"+ cursor={cursor}+ display="flex"+ gap="1.5"+ h="full"+ px="1.5"+ style={indentStyle}+ transition={LAYER_ROW_BACKGROUND_TRANSITION}+ >+ {children}+ </Row>+);diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerStackHeader.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerStackHeader.tsxindex 47b91aac71..53a12027ac 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerStackHeader.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerStackHeader.tsx@@ -123,18 +123,20 @@ const LayerStackHeaderComponent = ({transitionProperty="transform"/></IconButton>- <Text- color="fg.muted"- cursor="pointer"- flex="1"- fontSize="2xs"- fontWeight="700"- textTransform="uppercase"- truncate- userSelect="none"- >- {t(`widgets.layers.groups.${stack}`)} ({leafCount})- </Text>+ <Tooltip content={t(`widgets.layers.groupHints.${stack}`)} openDelay={600}>+ <Text+ color="fg.muted"+ cursor="pointer"+ flex="1"+ fontSize="2xs"+ fontWeight="700"+ textTransform="uppercase"+ truncate+ userSelect="none"+ >+ {t(`widgets.layers.groups.${stack}`)} ({leafCount})+ </Text>+ </Tooltip><HStack gap="0.5" onClick={stopPropagation} onMouseDown={keepFocus}>{actions.map((action) => (<Tooltip key={action.id} content={action.label}>diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerSurfaceHost.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerSurfaceHost.tsxindex 1c54b2e0b6..79e4a184b7 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerSurfaceHost.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerSurfaceHost.tsx@@ -57,10 +57,6 @@ export const LayerSurfaceHost = ({[node, surface]);const handleMenuClose = useCallback(() => onClose(), [onClose]);- // The child menu labels and toggles the item's LIVE state, not its state at- // open. Ordering facts (posInSet/setSize) stay the open-time snapshot: a- // stale Move up/down is safe because the command re-validates against the- // live document and refuses moves past the ends.const liveChild = useMemo(() => {if (surface?.kind !== 'child-menu') {return null;@@ -72,7 +68,6 @@ export const LayerSurfaceHost = ({}return item.isEnabled === child.isEnabled ? child : { ...child, isEnabled: item.isEnabled };}, [document, surface]);- // Keyboard parity for the cross-layer drag: other regional layers a reference image can move to.const moveTargets = useMemo(() => {if (surface?.kind !== 'child-menu' || surface.child.kind !== 'reference-image') {return [];diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersPanelFooter.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersPanelFooter.tsxindex e38285a914..5b1c9d8651 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersPanelFooter.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersPanelFooter.tsx@@ -15,27 +15,16 @@ interface LayersPanelFooterProps {commands: LayerSelectionCommands;degraded: boolean;filter: string;- groupCount: number;- leafCount: number;- selectedCount: number;onFilterChange: (filter: string) => void;}/**- * The stable footer — the panel's one action strip: name filter, document- * summary, and the top-frequency selection verbs (duplicate, group, delete).- * Everything else lives in the context menu; nothing here appears or- * disappears — controls disable instead.+ * The stable footer — the panel's one action strip: name filter and the+ * top-frequency selection verbs (duplicate, group, delete). Everything else+ * lives in the context menu; nothing here appears or disappears — controls+ * disable instead.*/-const LayersPanelFooterComponent = ({- commands,- degraded,- filter,- groupCount,- leafCount,- selectedCount,- onFilterChange,-}: LayersPanelFooterProps) => {+const LayersPanelFooterComponent = ({ commands, degraded, filter, onFilterChange }: LayersPanelFooterProps) => {const { t } = useTranslation();const handleFilter = useCallback((event: { target: { value: string } }) => onFilterChange(event.target.value),@@ -52,11 +41,11 @@ const LayersPanelFooterComponent = ({value={filter}onChange={handleFilter}/>- <Text color="fg.muted" flexShrink={0} fontSize="2xs" whiteSpace="nowrap">- {degraded- ? t('widgets.layers.footer.degraded')- : `${t('widgets.layers.footer.layers', { count: leafCount })} · ${t('widgets.layers.footer.groups', { count: groupCount })} · ${t('widgets.layers.footer.selected', { count: selectedCount })}`}- </Text>+ {degraded ? (+ <Text color="fg.muted" flexShrink={0} fontSize="2xs" whiteSpace="nowrap">+ {t('widgets.layers.footer.degraded')}+ </Text>+ ) : null}<HStack gap="0.5"><FooterActiondisabled={!commands.canDuplicate}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 a44dcc0854..ed3da3b3e9 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@@ -685,6 +685,57 @@ describe('LayersTree projected child rows', () => {expect(output('raster-adjustments')).toBe('a1:on,a2:off,a3:on');});+ it('renames an adjustment entry inline with F2 and restores the kind name on an empty draft', async () => {+ await renderTree([+ layerContract('r1', 'raster', {+ adjustments: [{ id: 'a1', isEnabled: true, saturation: 0.1, type: 'hsl' }],+ name: 'Painting',+ }),+ ]);+ treeitem('Saturation').focus();+ await act(() => userEvent.keyboard('{F2}'));+ const input = host!.querySelector<HTMLInputElement>('input[aria-label="Rename"]')!;+ await act(() => userEvent.clear(input));+ await act(() => userEvent.type(input, 'Pop'));+ await act(() => userEvent.keyboard('{Enter}'));+ expect(treeitem('Pop')).toBeTruthy();+ expect(treeitem('Pop').textContent).toContain('+10%');++ treeitem('Pop').focus();+ await act(() => userEvent.keyboard('{F2}'));+ const again = host!.querySelector<HTMLInputElement>('input[aria-label="Rename"]')!;+ await act(() => userEvent.clear(again));+ await act(() => userEvent.keyboard('{Enter}'));+ expect(treeitem('Saturation')).toBeTruthy();+ });++ it('contains live preview ticks to the edited layer and its child rows', async () => {+ await renderTree([+ layerContract('r1', 'raster', {+ adjustments: [{ id: 'a1', isEnabled: true, saturation: 0, type: 'hsl' }],+ name: 'Painting',+ }),+ layerContract('r2', 'raster', { name: 'Bystander' }),+ layerContract('rg', 'regional_guidance', { name: 'Region' }),+ ]);+ resetLayerRowCommits();+ for (let tick = 1; tick <= 30; tick++) {+ await act(() =>+ dispatchExternal({+ config: {+ adjustments: [{ id: 'a1', isEnabled: true, saturation: tick / 100, type: 'hsl' }],+ layerType: 'raster',+ },+ id: 'r1',+ type: 'updateCanvasLayerConfig',+ })+ );+ }+ const commits = getLayerRowCommits();+ expect(Object.keys(commits).filter((id) => id !== 'r1' && !id.startsWith('child:r1:'))).toEqual([]);+ expect(treeitem('Saturation').textContent).toContain('+30%');+ });+it('reorders adjustment entries with a pointer drag', async () => {await renderTree([layerContract('r1', 'raster', {diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.tsxindex 04de5bfafc..ba3b6d2425 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersTree.tsx@@ -28,7 +28,7 @@ import type { LayerRowCommands, LayerSurfaceAnchor } from './layerRowCommands';import type { LayerStackRowsByKind } from './layerTreeRows';import type { LayerStackActionsEngine } from './useLayerStackActions';-import { ChildDragGhost, LayerChildRow } from './LayerChildRow';+import { ChildDragGhost, isRenameableChildKind, LayerChildRow } from './LayerChildRow';import {layerChildDropCommand,layerChildRemoveLabelKey,@@ -177,7 +177,6 @@ export const LayersTree = ({useLayoutEffect(() => {dragRef.current = drag;}, [drag]);- // A child-row drag is its own mode: one row, landings only where its kind allows.const [childDrag, setChildDrag] = useState<ChildDragState | null>(null);const childDragRef = useRef<ChildDragState | null>(null);useLayoutEffect(() => {@@ -201,7 +200,6 @@ export const LayersTree = ({[document, requestedId]);const forceOpen = useCallback((stack: LayerStackKind) => stack === requestedStack, [requestedStack]);- // A name filter matches layers; child rows sit out until it clears.const childRowsSource = useMemo<PanelChildRowsSource | undefined>(() =>panel.filter.trim() === ''@@ -213,7 +211,6 @@ export const LayersTree = ({() => flattenPanelRows(stacks, panel.collapsedStacks, forceOpen, childRowsSource),[childRowsSource, forceOpen, panel.collapsedStacks, stacks]);- // Every item, header or node, by its tree key.const rowIndexByKey = useMemo(() => new Map(panelRows.map((row, index) => [row.key, index])), [panelRows]);const childRowByKey = useMemo(() => new Map(panelRows.flatMap((row) => (row.kind === 'child' ? [[row.key, row.child] as const] : []))),@@ -224,6 +221,11 @@ export const LayersTree = ({childSelection && childSelection.projectId === projectId? layerChildRowKey(childSelection.layerId, childSelection.itemId): null;+ const selectedChildOwnerId = childSelection && childSelection.projectId === projectId ? childSelection.layerId : null;+ const primaryAncestorIds = useMemo(+ () => new Set(primaryId ? (lookupDocumentNodeState(document, primaryId)?.parentIds ?? []) : []),+ [document, primaryId]+ );const offsets = useMemo(() => {const starts = new Float64Array(panelRows.length + 1);panelRows.forEach((row, index) => {@@ -262,7 +264,6 @@ export const LayersTree = ({[focusIndex]);const getScrollElement = useCallback(() => scrollRef.current, []);- // Created once the scroll element exists; handlers reach it through the ref.const autoScroller = useRef<LayerTreeAutoScroller | null>(null);const estimateSize = useCallback((index: number) => panelRowHeight(panelRows[index]!), [panelRows]);const getItemKey = useCallback((index: number) => panelRows[index]?.key ?? index, [panelRows]);@@ -273,11 +274,9 @@ export const LayersTree = ({getScrollElement,overscan: OVERSCAN_ROWS,rangeExtractor,- // A revealed row lands below the pinned header, never under it.scrollPaddingStart: LAYER_HEADER_HEIGHT_PX,});const virtualItems = virtualizer.virtualItems;- // Fixed sizes change only with the row list; re-measure then, never per snapshot.const measureVirtualizer = useEffectEvent(() => {virtualizer.measure();});@@ -324,7 +323,6 @@ export const LayersTree = ({visibleRowIds,};});- // A keyboard move on a selected row carries the selection, exactly as a drag of it would.const movingIds = useCallback((key: string, stack: LayerStackKind): readonly string[] => {const { panel: current, stacks: forests } = latest.current;return current.selectedIds.includes(key)@@ -354,7 +352,6 @@ export const LayersTree = ({}const { panel: current, projectId: project } = latest.current;const outcome = runStructural(t(layerChildRemoveLabelKey(child.kind)), command);- // The removed row's focus lands on its owner, not wherever the primary sits.if (outcome.status === 'committed' && current.focusId === child.key) {setLayerPanelFocus(project, current.primaryId, child.layerId);}@@ -362,7 +359,6 @@ export const LayersTree = ({[runStructural, t]);- // One handle for every row and header; it reads the latest render through a ref so items never re-render for it.const commands = useMemo<LayerRowCommands>(() => ({endRename: () => setRenamingId(null),@@ -473,7 +469,7 @@ export const LayersTree = ({return;} else if (event.key === 'F2') {event.preventDefault();- if (!latest.current.editingLocked && !childRow) {+ if (!latest.current.editingLocked && (!childRow || isRenameableChildKind(childRow.kind))) {setRenamingId(key);}return;@@ -528,6 +524,12 @@ export const LayersTree = ({openStackMenu: (stack, anchor: LayerSurfaceAnchor) => setSurface({ anchor, kind: 'stack-menu', stack }),removeChild: (child) => removeChildRow(child),rename: (id, name) => runStructural(t('widgets.layers.actions.rename'), { id, patch: { name }, type: 'patch' }),+ renameChild: (child, name) => {+ const command = layerChildRowCommand(latest.current.document, child, { name, type: 'rename' });+ if (command) {+ runStructural(t('widgets.layers.modifiers.renameAdjustment'), command);+ }+ },select: (id, modifiers: LayerSelectionModifiers) => {const {allNodeIds: all,@@ -586,7 +588,6 @@ export const LayersTree = ({},toggleExpanded: (id) => {const { panel: current, projectId: project } = latest.current;- // A filter decides expansion itself; the chevron is inert until it is cleared.if (current.filter.trim() === '') {setLayerGroupExpanded(project, current.primaryId, [id]);}@@ -649,7 +650,6 @@ export const LayersTree = ({}}, [document, primaryId, projectId, propertiesRequest, rowIndexByKey]);- // After paint: land a pending focus, and open a pending properties surface on its now-rendered row.useLayoutEffect(() => {const host = scrollRef.current;if (!host) {@@ -666,8 +666,6 @@ export const LayersTree = ({if (pending && pending.scrolled && !pending.opened) {const row = host.querySelector<HTMLElement>(`[data-layer-row-id="${CSS.escape(pending.id)}"]`);if (row) {- // The row is on screen: reveal the Properties pane's Layer section and- // settle the request — there is no popover to keep open any more.pendingProperties.current = null;onRevealProperties(pending.id);clearLayerPropertiesRequest(pending.token);@@ -717,8 +715,6 @@ export const LayersTree = ({const { childRowByKey: childRows } = latest.current;const dragChild = childRows.get(String(args.active.id));if (dragChild) {- // An adjustment lands only among its own layer's rows; a reference image- // also lands on any other regional layer or its reference rows.return pointerWithin({...args,droppableContainers: args.droppableContainers.filter((container) => {@@ -737,8 +733,6 @@ export const LayersTree = ({});}const current = dragRef.current;- // Only a row of the same stack under the pointer counts: nothing snaps across stacks or gaps.- // A child row counts as its owner, so it is out whenever the owner travels.return pointerWithin({...args,droppableContainers: args.droppableContainers.filter((container) => {@@ -830,7 +824,6 @@ export const LayersTree = ({);return;}- // A child row stands in for its owner: the only landing beside it is below the owner.const overChild = rawOverId ? childRowByKey.get(rawOverId) : undefined;const overId = overChild ? overChild.layerId : rawOverId;clearHoverTimer();@@ -840,7 +833,6 @@ export const LayersTree = ({? stacks[current.stack].rows.find((row) => row.id === overId): undefined;const overIsGroup = over?.vm.kind === 'group';- // The pointer may enter a row between move events; the edge follows the row it is over now.const edge = overChild ? 'below' : edgeOf(event.over?.rect, pointerY.current, overIsGroup);const overIsChild = overChild !== undefined;setDrag((state) =>@@ -874,7 +866,6 @@ export const LayersTree = ({rows: stacks[drag.stack].rows,});}, [drag, stacks]);- // The model is the authority on where the block may land; the indicator shows its answer before the drop.const refusal = useMemo(() =>target && engine@@ -886,7 +877,6 @@ export const LayersTree = ({[engine, target]);- // The dragged child's landing plus the command it resolves to; the indicator shows only real landings.const childDropPlan = useMemo(() => {if (!childDrag?.overKey) {return null;@@ -905,7 +895,6 @@ export const LayersTree = ({};depth = overChild.depth;} else {- // Onto a layer row: append to its items (cross-layer for reference images).const ownerRow = stacks[child.stack].rows.find((row) => row.id === overKey);if (!ownerRow) {return null;@@ -917,7 +906,6 @@ export const LayersTree = ({if (!command) {return null;}- // The model previews locks exactly as it will at drop; a refused landing shows no indicator.if (engine && engine.document.model()?.refusalFor(command)) {return null;}@@ -934,7 +922,6 @@ export const LayersTree = ({if (beforeIndex !== undefined) {return { left: depth * LAYER_TREE_INDENT_PX + 14, top: offsets[beforeIndex]! };}- // The end of the layer's rendered children, or right below a childless owner row.let index = rowIndexByKey.get(dropTarget.layerId);if (index === undefined) {return null;@@ -990,7 +977,6 @@ export const LayersTree = ({if (target.beforeRowId) {top = offsets[rowIndexByKey.get(target.beforeRowId)!]!;} else {- // Below the stack's last node — and past any child rows it projects.const last = stackRows[stackRows.length - 1]!;let index = rowIndexByKey.get(last.id)!;while (panelRows[index + 1]?.kind === 'child') {@@ -1091,6 +1077,7 @@ export const LayersTree = ({h={`${virtualizer.totalSize}px`}position="relative"role="tree"+ userSelect="none"w="full">{virtualItems.map((item) => {@@ -1105,7 +1092,9 @@ export const LayersTree = ({<VirtualSlot key={item.key} size={item.size} start={item.start}>{panelRow.kind === 'node' ? (<LayerRow+ ancestorOfPrimary={primaryAncestorIds.has(panelRow.row.id)}childCount={panelRow.childCount}+ childSelected={panelRow.row.id === selectedChildOwnerId}childrenExpanded={panelRow.childrenExpanded}commands={commands}drag={dragStateOf(panelRow.row.id)}@@ -1129,6 +1118,7 @@ export const LayersTree = ({dragDisabled={dragDisabled}editingLocked={editingLocked}focused={panelRow.key === focusKey}+ renaming={panelRow.key === renamingId}selected={panelRow.key === selectedChildKey}/>) : (diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersWidgetView.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersWidgetView.tsxindex 1a3efeea0b..f683fda6a3 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersWidgetView.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayersWidgetView.tsx@@ -58,24 +58,14 @@ export const LayersWidgetView = ({ runtime }: WidgetViewProps) => {const { selectedLayerId } = document;const panel = useLayerPanelState(projectId, selectedLayerId);- // The sub-selection survives only while its owner stays the selected layer.useEffect(() => reconcileLayerChildSelection(projectId, document), [document, projectId]);const expandedGroupIds = useMemo(() => new Set(panel.expandedGroupIds), [panel.expandedGroupIds]);- // Keyed on the forests, so a selection or bbox change never rebuilds a row.const stacks = useMemo(() => buildLayerStackRows(document.stacks, expandedGroupIds, panel.filter),[document.stacks, expandedGroupIds, panel.filter]);const nodeCount = getDocumentIndex(document).nodes.length;const degraded = nodeCount > LAYER_PANEL_DEGRADE_THRESHOLD;- const counts = useMemo(- () =>- Object.values(stacks).reduce(- (total, stack) => ({ groups: total.groups + stack.groupCount, leaves: total.leaves + stack.leafCount }),- { groups: 0, leaves: 0 }- ),- [stacks]- );const selectionCommands = useLayerSelectionCommands(engine, projectId, panel.selectedIds, editingLocked);const handleFilter = useCallback(@@ -104,8 +94,6 @@ export const LayersWidgetView = ({ runtime }: WidgetViewProps) => {const handleTreeTab = useCallback((tab: LayerTreeTabId) => runtime.state.patch({ treeTab: tab }), [runtime.state]);const treeTabs = useMemo(() => TREE_TABS.map(({ id, labelKey }) => ({ id, label: t(labelKey) })), [t]);const addLayerButton = useMemo(() => <LayersHeaderActions />, []);- // A properties request (canvas context menu) must reach the tree, which only- // mounts on the Layers tab — switch back so the reveal actually happens.const propertiesRequest = useCurrentLayerPropertiesRequest();useEffect(() => {if (propertiesRequest && treeTab === 'history') {@@ -119,8 +107,6 @@ export const LayersWidgetView = ({ runtime }: WidgetViewProps) => {},[dispatch, paneLayout, runtime.state]);- // Right-click on empty tree space offers the add-layer menu; rows and stack- // headers preventDefault their own menus first, so they always win.const [addMenuAnchor, setAddMenuAnchor] = useState<LayerSurfaceAnchor | null>(null);const handleEmptyAreaContextMenu = useCallback((event: MouseEvent<HTMLElement>) => {if (event.defaultPrevented || (event.target as HTMLElement).closest('[role="treeitem"]')) {@@ -198,9 +184,6 @@ export const LayersWidgetView = ({ runtime }: WidgetViewProps) => {commands={selectionCommands}degraded={degraded}filter={panel.filter}- groupCount={counts.groups}- leafCount={counts.leaves}- selectedCount={panel.selectedIds.length}onFilterChange={handleFilter}/>{addMenuAnchor ? <AddLayerContextMenu anchor={addMenuAnchor} onClose={closeAddMenu} /> : null}diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/MaskModifierSettings.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/MaskModifierSettings.tsxindex dafba09498..339f8b627e 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/MaskModifierSettings.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/MaskModifierSettings.tsx@@ -52,8 +52,6 @@ export const MaskModifierSettings = ({if (next === undefined || !Number.isFinite(next) || !modifier) {return;}- // Live modifier as the base: only the magnitude previews, a mid-gesture- // enable toggle stays put.const config = {layerType: 'inpaint_mask',[field]: field === 'noise' ? { ...modifier, level: next } : { ...modifier, limit: next },diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/ReferenceImageSettings.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/ReferenceImageSettings.tsxindex 92d6e142ce..b9cea8e716 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/ReferenceImageSettings.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/ReferenceImageSettings.tsx@@ -46,7 +46,7 @@ const IP_ADAPTER_METHODS: readonly RegionalGuidanceIPAdapterMethod[] = ['style_precise',];-const SELECT_POSITIONING = { placement: 'bottom-end', sameWidth: false } as const;+const SELECT_POSITIONING = { placement: 'bottom-end', sameWidth: true } as const;const COVER_IMG_STYLE: CSSProperties = { height: '100%', objectFit: 'cover', width: '100%' };@@ -90,9 +90,6 @@ const useReferenceImageEditing = ([commitPrepared, layer.id, referenceImages, t]);- // Assigning the image goes through the same undo path as the other ref edits- // (`commitReferenceImages` → `updateCanvasLayerConfig`), so a drop/upload/clear- // is a single, undoable document change.const setReferenceImageAsset = useCallback((refId: string, image: RegionalGuidanceReferenceImageAsset | null) => {commitReferenceImages(@@ -126,7 +123,6 @@ const useReferenceImageEditing = ([notifications, queryClient, setReferenceImageAsset]);- // Routes all-image gallery-item drops to the ref slot the drop landed on.useDndMonitor({onDragEnd: (event) => {const overId = event.over?.id;@@ -295,9 +291,6 @@ const ReferenceImageEditor = ({[config, referenceImage, replaceRef]);- // Local live value while dragging the weight slider — the thumb tracks the- // pointer without pushing a history entry / re-committing the ref per tick. The- // single commit lands on drag end. `null` ⇒ not dragging (show the stored value).const [liveWeight, setLiveWeight] = useState<number | null>(null);const handleWeight = useCallback(({ value }: SliderValueChangeDetails) => {diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/RegionalGuidanceSettings.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/RegionalGuidanceSettings.tsxindex 20b434b00c..ed08c84229 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/RegionalGuidanceSettings.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/RegionalGuidanceSettings.tsx@@ -38,7 +38,7 @@ const MASK_FILL_STYLES: readonly CanvasMaskFillContract['style'][] = ['vertical',];-const SELECT_POSITIONING = { placement: 'bottom-end', sameWidth: false } as const;+const SELECT_POSITIONING = { placement: 'bottom-end', sameWidth: true } as const;const REGIONAL_PROMPT_HEIGHT_PX = 72;diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerChildRows.test.ts b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerChildRows.test.tsindex 74b2929c86..7951cc982b 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerChildRows.test.ts+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerChildRows.test.ts@@ -220,6 +220,32 @@ describe('adjustment rows', () => {]);});+ it('renames an entry, clears the name with null, and refuses no-op renames and non-adjustment kinds', () => {+ const document = documentFrom([rasterWith(), regionalWith([referenceImage('ref1')])]);+ const named = layerChildRowCommand(document, { itemId: 'a1', layerId: 'r1' }, { name: 'Warm up', type: 'rename' });+ const entriesOf = (command: NonNullable<typeof named>) =>+ (command.config as unknown as { adjustments: CanvasAdjustmentEntry[] }).adjustments;+ expect(entriesOf(named!).map((entry) => entry.name)).toEqual(['Warm up', undefined, undefined]);+ expect(layerChildRowCommand(document, { itemId: 'a1', layerId: 'r1' }, { name: null, type: 'rename' })).toBeNull();+ const renamed = documentFrom([+ rasterWith([{ brightness: 0, contrast: 0, id: 'a1', isEnabled: true, name: 'Old', type: 'brightness-contrast' }]),+ ]);+ const cleared = layerChildRowCommand(renamed, { itemId: 'a1', layerId: 'r1' }, { name: null, type: 'rename' });+ expect('name' in entriesOf(cleared!)[0]!).toBe(false);+ expect(+ layerChildRowCommand(document, { itemId: 'ref1', layerId: 'rg1' }, { name: 'Ref', type: 'rename' })+ ).toBeNull();+ });++ it('projects the custom name of a renamed entry', () => {+ const rows = projectLayerChildRows(+ rasterRow(+ documentFrom([rasterWith([{ id: 'h1', isEnabled: true, name: 'Shift teal', rotation: 30, type: 'hue' }])])+ ).vm+ );+ expect(rows[0]).toMatchObject({ customName: 'Shift teal', detail: '30°' });+ });+it('moves an entry within the stack and refuses moves past the ends', () => {const document = documentFrom([rasterWith()]);const moved = layerChildRowCommand(document, { itemId: 'a2', layerId: 'r1' }, { direction: -1, type: 'move' });diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerChildRows.ts b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerChildRows.tsindex b22998fcae..bd7fd78766 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerChildRows.ts+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerChildRows.ts@@ -102,13 +102,16 @@ export interface ProjectedChildRow {readonly image: { readonly imageName: string; readonly thumbnailUrl: string } | null;/** A compact preformatted fact shown beside the name (a percent, degrees), or `null`. */readonly detail: string | null;+ /** The user-given name of a renameable item (adjustment entries), or `null`. */+ readonly customName: string | null;}export type LayerChildRowAction =| { type: 'set-enabled'; isEnabled: boolean }| { type: 'remove' }| { type: 'move'; direction: -1 | 1 }- | { type: 'duplicate'; newId: string };+ | { type: 'duplicate'; newId: string }+ | { type: 'rename'; name: string | null };/** A child row's live item facts, resolved from the document; `null` when it is gone. */export interface LayerChildItem {@@ -149,6 +152,7 @@ const maskModifierRows = (vm: SemanticNode, layer: CanvasInpaintMaskLayerContracreturn items.map((item, index) => ({...baseRow(vm),...item,+ customName: null,image: null,key: layerChildRowKey(layer.id, item.itemId),posInSet: index + 1,@@ -168,6 +172,7 @@ export const projectLayerChildRows = (vm: SemanticNode): readonly ProjectedChildconst setSize = node.referenceImages.length;rows = node.referenceImages.map((ref, index): ProjectedChildRow => ({...baseRow(vm),+ customName: null,detail: null,image: ref.config.image? { imageName: ref.config.image.imageName, thumbnailUrl: ref.config.image.thumbnailUrl }@@ -185,6 +190,7 @@ export const projectLayerChildRows = (vm: SemanticNode): readonly ProjectedChildconst setSize = node.adjustments.length;rows = node.adjustments.map((adjustment, index): ProjectedChildRow => ({...baseRow(vm),+ customName: adjustment.name ?? null,detail: adjustmentDetail(adjustment),image: null,isEnabled: adjustment.isEnabled,@@ -366,7 +372,7 @@ export const layerChildRowCommand = (): PatchConfigCommand | null => {const layer = getDocumentLayer(document, target.layerId);if (layer?.type === 'regional_guidance') {- if (action.type === 'move' || action.type === 'duplicate') {+ if (action.type === 'move' || action.type === 'duplicate' || action.type === 'rename') {return null;}if (!layer.referenceImages.some((ref) => ref.id === target.itemId)) {@@ -388,7 +394,7 @@ export const layerChildRowCommand = (};}if (layer?.type === 'inpaint_mask') {- if (action.type === 'move' || action.type === 'duplicate') {+ if (action.type === 'move' || action.type === 'duplicate' || action.type === 'rename') {return null;}const field =@@ -445,6 +451,20 @@ export const layerChildRowCommand = (next = [...before.slice(0, index + 1), copy, ...before.slice(index + 1)];break;}+ case 'rename': {+ const current = before[index]!;+ if ((current.name ?? null) === action.name) {+ return null;+ }+ next = before.map((entry, i) => {+ if (i !== index) {+ return entry;+ }+ const { name: _cleared, ...rest } = entry;+ return action.name === null ? rest : { ...entry, name: action.name };+ });+ break;+ }}return {before: { adjustments: [...before], layerType: 'raster' },diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerContextActions.test.ts b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerContextActions.test.tsindex 94d42db63e..3624680e7a 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerContextActions.test.ts+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerContextActions.test.ts@@ -826,10 +826,10 @@ describe('toggle-hidden', () => {expect(idsFor(rasterLayer)).not.toContain('toggle-hidden');const control = getLayerContextActions(makeState(nonEmptyControlLayer));expect(byId(control, 'toggle-hidden').isDisabled).toBe(false);- expect(byId(control, 'toggle-hidden').labelKey).toBe('widgets.layers.actions.hideOnCanvas');- expect(getEnglishTranslation('widgets.layers.actions.hideOnCanvas')).toBe('Hide on canvas');+ expect(byId(control, 'toggle-hidden').labelKey).toBe('widgets.layers.actions.hideLayer');+ expect(getEnglishTranslation('widgets.layers.actions.hideLayer')).toBe('Hide layer');const hidden = getLayerContextActions(makeState({ ...nonEmptyControlLayer, isHidden: true }));- expect(byId(hidden, 'toggle-hidden').labelKey).toBe('widgets.layers.actions.showOnCanvas');+ expect(byId(hidden, 'toggle-hidden').labelKey).toBe('widgets.layers.actions.showLayer');const gated = getLayerContextActions(makeState(nonEmptyControlLayer, { hiddenByAncestor: true }));expect(byId(gated, 'toggle-hidden').isDisabled).toBe(true);const runtime = makeRuntimeContext(nonEmptyControlLayer);diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerContextActions.ts b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerContextActions.tsindex 46e6f65544..5c3d9dcb01 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerContextActions.ts+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerContextActions.ts@@ -20,6 +20,8 @@ import {ArrowDownToLineIcon,ArrowUpIcon,ArrowUpToLineIcon,+ CircleIcon,+ CircleOffIcon,CopyIcon,CropIcon,DropletIcon,@@ -852,26 +854,26 @@ export const LAYER_CONTEXT_ACTION_DEFINITIONS: readonly LayerContextActionDefinisupportedLayerTypes: ALL_LAYER_TYPES,},{- defaultLabel: 'Toggle visibility',+ defaultLabel: 'Enable/disable',getDefaultLabel: (context) =>isMultiTarget(context)? allTargetsEnabled(context)- ? 'Hide selected'- : 'Show selected'+ ? 'Disable selected'+ : 'Enable selected': context.layer.isEnabled- ? 'Hide'- : 'Show',- getIcon: (context) => (allTargetsEnabled(context) ? EyeOffIcon : EyeIcon),+ ? 'Disable layer'+ : 'Enable layer',+ getIcon: (context) => (allTargetsEnabled(context) ? CircleOffIcon : CircleIcon),getLabelKey: (context) =>isMultiTarget(context)? allTargetsEnabled(context)- ? 'widgets.layers.actions.hideSelected'- : 'widgets.layers.actions.showSelected'+ ? 'widgets.layers.actions.disableSelected'+ : 'widgets.layers.actions.enableSelected': context.layer.isEnabled- ? 'widgets.layers.actions.hide'- : 'widgets.layers.actions.show',+ ? 'widgets.layers.actions.disableLayer'+ : 'widgets.layers.actions.enableLayer',handler: ({ effects }) => effects.toggleVisibility(),- icon: EyeIcon,+ icon: CircleIcon,id: 'toggle-visibility',isEnabled: isInteractionFree,isVisible: alwaysVisible,@@ -881,11 +883,11 @@ export const LAYER_CONTEXT_ACTION_DEFINITIONS: readonly LayerContextActionDefinisupportedLayerTypes: ALL_LAYER_TYPES,},{- defaultLabel: 'Toggle canvas visibility',- getDefaultLabel: (context) => (isNodeHidden(context.layer) ? 'Show on canvas' : 'Hide on canvas'),+ defaultLabel: 'Show/hide layer',+ getDefaultLabel: (context) => (isNodeHidden(context.layer) ? 'Show layer' : 'Hide layer'),getIcon: (context) => (isNodeHidden(context.layer) ? EyeIcon : EyeOffIcon),getLabelKey: (context) =>- isNodeHidden(context.layer) ? 'widgets.layers.actions.showOnCanvas' : 'widgets.layers.actions.hideOnCanvas',+ isNodeHidden(context.layer) ? 'widgets.layers.actions.showLayer' : 'widgets.layers.actions.hideLayer',handler: ({ effects }) => effects.toggleHidden(),icon: EyeOffIcon,id: 'toggle-hidden',diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerRowCommands.ts b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerRowCommands.tsindex 58763c1988..3c83734614 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerRowCommands.ts+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerRowCommands.ts@@ -39,6 +39,8 @@ export interface LayerRowCommands {selectChild(child: ProjectedChildRow, options?: { reveal?: boolean }): void;setChildEnabled(child: ProjectedChildRow, isEnabled: boolean): void;removeChild(child: ProjectedChildRow): void;+ /** Renameable kinds (adjustment entries): sets the custom name, `null` restoring the kind's own. */+ renameChild(child: ProjectedChildRow, name: string | null): void;/** Ordered kinds only (adjustment entries): swap with the neighbour in `direction`. */moveChild(child: ProjectedChildRow, direction: -1 | 1): void;/** Reference images only: append the item to another regional layer as one atomic edit. */diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerStackActions.test.ts b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerStackActions.test.tsindex 86d6e8474e..e44a00e008 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerStackActions.test.ts+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerStackActions.test.ts@@ -16,8 +16,8 @@ const imageRef = { height: 10, imageName: 'img', width: 10 };const entriesOf = (nodes: CanvasNodeContract[]) => compileDocumentNodes({ stacks: stacksFrom(nodes) });describe('getStackActions', () => {- it('offers merge-visible + export-psd only for the raster stack, with new rightmost everywhere', () => {- expect(getStackActions('raster')).toEqual(['mergeVisible', 'exportPsd', 'toggleVisibility', 'new']);+ it('offers merge-visible + export-psd only to raster, hide-all only to overlay stacks', () => {+ expect(getStackActions('raster')).toEqual(['mergeVisible', 'exportPsd', 'new']);for (const stack of ['control', 'inpaint_mask', 'regional_guidance'] as const) {expect(getStackActions(stack)).toEqual(['toggleVisibility', 'new']);}diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerStackActions.ts b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerStackActions.tsindex b34444c989..1b044c1478 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/layerStackActions.ts+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/layerStackActions.ts@@ -8,15 +8,16 @@ export type StackActionId = 'mergeVisible' | 'exportPsd' | 'toggleVisibility' |/*** The right-aligned actions for a stack, in left-to-right render order (the "New" action sits* rightmost, nearest the panel's own add-layer menu). Only the raster stack offers "merge- * visible" + "export to PSD"; every stack offers hide/show-all + new.+ * visible" + "export to PSD". The overlay stacks offer hide/show-all: their layers are drawn+ * only to show where an effect applies, so getting them out of the way is view hygiene. The+ * raster stack has no such action — its layers ARE the image, and bulk-disabling the+ * generation input is not a workflow, only an accident.*/export const getStackActions = (stack: LayerStackKind): StackActionId[] => {- const actions: StackActionId[] = [];if (stack === 'raster') {- actions.push('mergeVisible', 'exportPsd');+ return ['mergeVisible', 'exportPsd', 'new'];}- actions.push('toggleVisibility', 'new');- return actions;+ return ['toggleVisibility', 'new'];};/** Whether the raster stack's "export to PSD" action has anything to export. */diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/panes/LayerSection.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/panes/LayerSection.tsxindex becc78a8a6..fb45a58323 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/panes/LayerSection.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/panes/LayerSection.tsx@@ -47,7 +47,6 @@ export const LayerSection = ({ disabled }: { disabled: boolean }) => {const engine = useCanvasEngine();const layer = useActiveProjectSelector(selectSelectedLayer);const documentRevision = useActiveProjectSelector((project) => project.canvas.documentRevision);- // A sub-selected child row takes over the section: its own editor, its own name.const projectId = useActiveProjectId();const childSelection = useLayerChildSelection();const child = resolveChildEditor(layer, childSelection?.projectId === projectId ? childSelection : null, t);@@ -106,7 +105,7 @@ const resolveChildEditor = (const entry = layer.adjustments?.find((candidate) => candidate.id === selection.itemId);if (entry) {const kind = adjustmentChildKind(entry.type);- return { itemId: selection.itemId, kind, subtitle: t(childRowNameKey(kind)) };+ return { itemId: selection.itemId, kind, subtitle: entry.name ?? t(childRowNameKey(kind)) };}}return null;@@ -161,8 +160,6 @@ const LayerTypeSettings = ({}};-// Starting an operation used to close the popover; the pane's Operation-// section now simply appears above, so there is nothing to do.const noop = (): void => undefined;/** Raster-layer properties: transparency lock + non-destructive adjustments. */