Skip to content

feat(image-editor): implement PixelForge prototype's placeholder layer ops#95

Merged
lyfuci merged 1 commit into
mainfrom
feat/pixelforge-layer-ops
Jun 18, 2026
Merged

feat(image-editor): implement PixelForge prototype's placeholder layer ops#95
lyfuci merged 1 commit into
mainfrom
feat/pixelforge-layer-ops

Conversation

@lyfuci

@lyfuci lyfuci commented Jun 18, 2026

Copy link
Copy Markdown
Owner

What

The PixelForge CC 2026 prototype exposes a set of layer operations as placeholders (modals that describe what they would do) or disabled menu items — the "unimplemented but commented" features. Cross-referencing the prototype against toolbox's editor (via a gap-analysis pass) showed the editor already implements most of them (merge down/visible, flatten, smart object, masks, clipping). These four were the genuine gaps, now wired end-to-end:

Feature What it does
Rasterize Layer Bakes the selected layer (post effects/clip/opacity) into a plain image-shape layer at the same id/bbox. Reuses the existing composite-ops.rasterizeLayer helper (was internal-only to Convert-to-Smart-Object). Gated for adjustment/filter/mask layers.
Copy / Paste / Clear Layer Style Moves the fx stack between layers via a useRef clipboard (deep-cloned so gradients/ids don't alias). Pure data move — no render-pipeline change.
Rename Layer Double-click a layer row (or context-menu Rename) → inline input → patchLayer({ name }). The row shows the custom name when it differs from the dynamic kind label.
Layer Color Tag Optional PS-style color label (new colorTag on LayerCommon, round-trips through serialize for free). A dot on the row opens a swatch picker. Palette in lib/image-editor/layer-color-tags.ts.

All four are wired into both the Layer menu (MenuBar) and the layer-row context menu. i18n added in en + zh-CN (keys identical across locales).

Notes / deferred

  • The gap analysis (4-agent workflow) found the editor is already a near-complete PS clone, so this list is deliberately short and conservative.
  • Deferred (stated, not silently dropped): Edit > Fade (the one disabled prototype item — needs before-buffer plumbing; medium effort, can follow up), clipping mask for adjustment/filter layers (large render-pipeline rework), vector mask, and live Info/Navigator panels. These risk regressing the working editor and are better as their own PRs.

Verification

  • pnpm typecheck / pnpm lint / pnpm build clean; 388 tests green.
  • Headless-Chrome: created a group layer, confirmed all four ops render + function — rename typed and applied, context menu carries all new items, color dot present, Layer menu shows Rasterize + Copy/Paste/Clear Style — zero page errors.

🤖 Generated with Claude Code

… copy/paste/clear style, rename, color tag

The PixelForge prototype exposes several layer operations as placeholders
(modal "this would…" descriptions) or disabled items. Toolbox's editor already
implemented most of them (merge, flatten, smart object, masks). These four were
the genuine gaps, now implemented:

- Rasterize Layer: bakes the selected layer (post effects/clip/opacity) into a
  plain image-shape layer at the same id/bbox. Reuses the existing
  composite-ops.rasterizeLayer helper (was internal-only). Gated for
  adjustment/filter/mask layers.
- Copy / Paste / Clear Layer Style: moves the fx stack between layers via a
  useRef clipboard (deep-cloned so gradients/ids don't alias). No render change.
- Rename Layer: double-click a layer row (or context-menu Rename) → inline
  input → patchLayer({ name }). The row shows the custom name when it differs
  from the dynamic kind label.
- Layer Color Tag: optional PS-style color label (new colorTag on LayerCommon,
  round-trips through serialize for free); a dot on the row opens a swatch
  picker. Tag palette in lib/image-editor/layer-color-tags.ts.

Wired into both the Layer menu (MenuBar) and the layer-row context menu;
en + zh-CN i18n added (keys identical across locales).

Verified: typecheck/lint/build clean, 388 tests green; headless-Chrome created
a group layer and confirmed all four ops render + function (rename typed and
applied, context menu has all items, color dot present), zero page errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lyfuci lyfuci merged commit 9a2f274 into main Jun 18, 2026
2 checks passed
@lyfuci lyfuci deleted the feat/pixelforge-layer-ops branch June 18, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant