Skip to content

Feat/canvas#9

Open
joshistoast wants to merge 149 commits into
mainfrom
feat/canvas
Open

Feat/canvas#9
joshistoast wants to merge 149 commits into
mainfrom
feat/canvas

Conversation

@joshistoast

Copy link
Copy Markdown
Collaborator

Summary

Adds canvas functionality to the v7 shell. This uses a new and custom engine that behaves closer to photoshop using a bitmap.

Related Issues / Discussions

QA Instructions

Merge Plan

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

- Canvas invokes now dispatch resolved generate metadata with the
  compiled graph:
  - prompt node ids
  - seed node id
  - resolved generate values, including resolved seed
- Canvas queue snapshots now persist that metadata under
  `snapshot.generate`.
- Runtime now submits canvas queue items through the generate-style
  batch path, so backend receives seed/prompt `batch.data`.
- Workflow queue items still use the workflow submission path.
- Added a tested fallback for older persisted canvas queue items that
  lack `snapshot.generate`, using their saved generate widget state
  instead of backend primitive defaults.
- Updated stale canvas queue comments.
getQueueItemResultImages()` now supports filtering result images by
graph source node id.
- Filtering correctly uses backend `prepared_source_mapping`, because
  `session.results` keys can be prepared execution ids, not source node
  ids.
- Generate/canvas queue result routing now only reads the compiled
  output node: `canvas_output`.
- Workflow routing remains unchanged and still scans workflow outputs,
  then filters non-intermediate images.
- Both final batch routing and partial gallery routing use the same
  result-node policy.
- staging area uses new shared canvasoptionsbor component
- avoid tool use while staging is active
- hold c key to temp use bbox
- color picker while holding alt
right click on a layer row item shows the options
- cancel button on in-progress staging items
- redesigned layer context menus
- use prompt textarea on regional guidance layer properties
- handle spaces in regional guidance properties popover
- Added `CanvasEngine.exportLayerPixels(layerId, options?)`.
- Returns status-based results: `ok`, `missing`, `disabled`,
  `unsupported`, `empty`, `not-ready`.
- Reused this primitive from existing generation and PSD rasterization
  paths.
- Added tests for:
  - visible layer export
  - hidden layer refusal unless `includeDisabled`
  - refusing export while cache rasterization is in-flight
Added `CanvasEngine.exportBakedLayerBlob()`.
- Added `save-to-assets` to the layer context action registry.
- Wired the menu action to:
  - bake the layer with transform/adjustments
  - encode it as PNG
  - upload via existing `uploadGalleryImage(file, 'none')`
- Uses `includeDisabled: true` so hidden layers can still be saved.
- Added `CanvasEngine.cropLayerToBbox(layerId)`.
- Crops by baking the layer into the current bbox:
  - raster/control layers become bbox-sized paint sources
  - inpaint/regional masks get bbox-sized mask bitmaps
  - transform resets to identity
  - raster adjustments/control filter config are cleared after baking to
    avoid double-processing
  - cropped pixels persist through the existing bitmap-store path
- Added `crop-to-bbox` context-menu action.
- Disabled crop when no engine is attached or the layer is locked.
- Wired the menu action to `engine.cropLayerToBbox`.
- Split engine behavior across explicit raster, render, editing,
  interaction, history, persistence, layer, export, preview, and result
  controllers.
- Added derived-surface caching, viewport culling, diagnostics, shared
  512 MB surface budgeting, and cooldown lifecycle handling.
- Moved Filter and Select Object/SAM orchestration and state into
  canvas-operations.
- Added edit leases and guarded stale/cancellation handling.
- Removed the deprecated flat engine facade and migrated UI consumers to
  grouped or narrow capabilities.
- Enforced strict core import boundaries.
- Added architecture documentation
- Creates a selected raster layer at stack index 0.
- Preserves all source layers, order, visibility, and lock state.
- Includes visible locked and parametric rasters.
- Supports guarded async compositing and undo/redo.
- Updated UI enablement and async handling.
- Added comprehensive parity tests.
previously would mount below popovers
Bind mutations to project-scoped ports, freeze asynchronous raster work, account memory leases, and make staged acceptance and PSD export engine-owned.
Run Canvas2D and React lifecycle checks in headless Chromium, wire the suite into CI, and remove the unused fflate dependency.
Describe project-bound mutations, immutable raster snapshots, frame demand, memory leases, staged acceptance, PSD export, and lifecycle retry semantics.
@github-actions github-actions Bot added the ci-cd label Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant