feat(image-editor): implement PixelForge prototype's placeholder layer ops#95
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
composite-ops.rasterizeLayerhelper (was internal-only to Convert-to-Smart-Object). Gated for adjustment/filter/mask layers.useRefclipboard (deep-cloned so gradients/ids don't alias). Pure data move — no render-pipeline change.patchLayer({ name }). The row shows the custom name when it differs from the dynamic kind label.colorTagonLayerCommon, round-trips throughserializefor free). A dot on the row opens a swatch picker. Palette inlib/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
Verification
pnpm typecheck/pnpm lint/pnpm buildclean; 388 tests green.🤖 Generated with Claude Code