Skip to content

fix(canvas): v7 alpha canvas feedback — frames, layer actions, and engine fixes - #9961

Open
joshistoast wants to merge 16 commits into
mainfrom
fix/canvas-v7-feedback
Open

joshistoast wants to merge 16 commits into
mainfrom
fix/canvas-v7-feedback

Conversation

@joshistoast

@joshistoast joshistoast commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes a batch of v7 alpha canvas reports:

  • Drawing: Shift-click draws a straight brush or eraser line from the last point. The brush paints in place on image layers, with one undo restoring the image layer; locked or unready images still get a new paint layer.
  • Fit Frame to Masks: the fitted frame now includes the mask blur (blur + 8 px).
  • Alt: Alt is claimed for every canvas tool, so a lone Alt no longer opens the browser menu bar (Firefox: tapping Alt, then B, now selects the brush).
  • Focus: canvas keys follow focus. Tool, colour and brush-size keys work from the Layers and Color panels; Escape and C act from Layers; Enter only from the canvas.
  • Transform:
    • Opens immediately from the layer menu.
    • Shift+T replaces Mod+T.
    • Right after a stroke it waits for the stroke to save, with a status line.
    • Refusals explain themselves.
  • New layer operations:
    • Crop all layers to frame: one undo step; skips and counts locked layers. Available from the canvas menu and as a command.
    • Merge inpaint masks: one undo step; the sources are removed.
    • Remove from group for leaf layers.
    • Merge masks says why it is disabled.
  • Staging: mask and region overlays stay hidden while a progress image or staged result is shown.
  • Size reset menu beside Swap: a native-size square, the optimal size for the current ratio, and model defaults. Resets keep the canvas frame centred and stay out of undo history.
  • Frame naming: "Frame" replaces "bbox" in the UI, with distinct icons for the frame tool, fit-to-layers, fit-to-masks and the marquee.
  • Select Object remembers Auto Process per account. The filter button now reads Reset settings.
  • Zoom: Mod+1…4 zoom shortcuts.
  • Overview: the Layers panel's Overview shows the whole canvas, frame plus every layer, including outpainted content. Its outline, clicks and wheel zoom map through that area.

Related Issues / Discussions

v7 alpha feedback thread on Discord: https://discord.com/channels/1020123559063990373/1149506274971631688

QA Instructions

  • pnpm check:release (from invokeai/frontend/webv2) passes: lint, unit, browser, fixtures, performance, project-file and accessibility journeys.
  • Browser-checked in Chromium and Firefox against pnpm dev:mock:
    • the Alt and B sequences;
    • companion keys from Layers;
    • Transform from the menu and right after painting;
    • Remove from group with undo;
    • crop all and merge masks;
    • the size reset menu, including the centred frame.
    • the Overview with a layer outpainted beyond the frame: whole extent drawn, outline tracks zoom and pan, click centres, wheel zooms around the pointer.
  • Manual check still needed: that real browsers deliver Ctrl/Cmd+1…4. Some browsers reserve them for tab switching, and headless runs can't show this; the docs note it.

Review

Review findings resolved:

  • Crop all: peak memory reduced; a reservation leak on a failing copy fixed; the multi-layer replace step moved into the shared edit steps.
  • Colour picking: picks report back only to the sink that previewed them; a mask-tint gesture race fixed.
  • Alt: handling for Marquee and Lasso fixed.
  • Focus: loss of focus on retry and recovery paths fixed.

Known limit: menu item descriptions are still read as part of the item's accessible name. That fix belongs in the shared Menu component and will follow separately.

Compatibility / Rollout

  • Settings: adds the selectObjectAutoProcess account preference; a missing value means off.
  • Shortcut: the transform shortcut moves from Mod+T (the browser's new-tab shortcut) to Shift+T.
  • Performance baselines: updated for the added code: canvas activation +~9 KB, editor initial +~9 KB raw. Request counts are unchanged.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Meaningful regression coverage added / updated where needed; obsolete tests/code removed
  • Persisted-state and API changes include required migrations / compatibility validation
  • Relevant performance/efficiency opportunities considered; material claims have evidence
  • Material review findings resolved and relevant checks rerun
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Pin the toast-contrast toasts open and hold the closed dialog's exit animation, so a busy machine can no longer unmount them mid-assertion.
… masks in the engine

Shift-click draws a straight brush or eraser line, the brush paints in place on image layers, and masks stay hidden while a result is staged.
Crop all layers and merge inpaint masks each record one undo step within the memory budget; transform waits for a fresh stroke to save.
Alt is claimed for every tool so Firefox's menu bar stays closed, and canvas keys respect which panel owns focus.
…ocess

A reset menu beside swap offers a native square, the optimal size for the current ratio and model defaults, keeping the canvas frame centred.
Select Object's Auto Process choice is saved to the account, and the filter's Reset button now says it resets settings.
…able

Frame replaces bbox in labels with distinct icons, crop all and merge masks join the menus and command palette, and Shift+T opens Transform.
Shortcut tables are shared so collisions are caught, the Alt-pick colour goes to the armed target, and pending transforms say so.
Covers straight strokes, crop all, merge masks, frame naming, Shift+T, Alt-pick targets, zoom shortcuts and the Generate size reset menu.
# Conflicts:
#	docs/src/content/docs/Users Guide/07.Canvas/02.canvas-guide.mdx
#	docs/src/content/docs/Users Guide/07.Canvas/03.layers-panel.mdx
#	invokeai/frontend/webv2/src/workbench/widgets/layers/LayerContextMenu.tsx
@github-actions github-actions Bot added frontend PRs that change frontend files docs PRs that change docs labels Oct 20, 2026
@joshistoast joshistoast assigned JPPhoto and lstein and unassigned JPPhoto Oct 20, 2026
# Conflicts:
#	docs/src/content/docs/Users Guide/07.Canvas/02.canvas-guide.mdx
…rol layers

The widget's activated script now carries both this branch's canvas changes and main's FLUX.2 control layers (533,097 bytes); request counts are unchanged.
# Conflicts:
#	invokeai/frontend/webv2/performance/architecture-baseline.json
#	invokeai/frontend/webv2/performance/browser-baseline.json
This branch's canvas changes on top of main's control layers and clipboard messages bring the widget's activated script to 533,485 bytes; request counts are unchanged.
# Conflicts:
#	docs/src/content/docs/Users Guide/07.Canvas/02.canvas-guide.mdx
#	invokeai/frontend/webv2/performance/browser-baseline.json
#	invokeai/frontend/webv2/src/workbench/hotkeys/catalog.ts
#	invokeai/frontend/webv2/src/workbench/widgets/canvas/CanvasHeaderActions.tsx
…ent main

The English locale grows to 225,516 bytes on every route with the gallery and canvas strings together, and the canvas widget's activated script is 531,250 bytes; request counts are unchanged.
# Conflicts:
#	invokeai/frontend/webv2/performance/browser-baseline.json
#	invokeai/frontend/webv2/src/workbench/settings/store.test.ts
…l changes

With main's generation and model changes, this branch's canvas widget activates 531,800 bytes of script; request counts are unchanged.
@joshistoast
joshistoast requested a review from lstein October 22, 2026 01:36
The overview composites the frame joined with every enabled layer, the
same extent fit-to-view fits, and the pane maps its outline and pointer
through the rect the engine drew instead of the document origin.
# Conflicts:
#	invokeai/frontend/webv2/src/features/generation/ui/GenerateDimensionFields.browser.test.tsx

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs PRs that change docs frontend PRs that change frontend files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants