r216 VSIL Editor Multi-Transform + Context Menu — AI Summary

Status: ✅ All green · 41/41 r216 unit · 21/21 r216 Playwright · 0 regressions

Branch: feat/id9-r214-editor-polish @ 7ecbaa4 (pushed to origin, on top of 8893a63)

Base: feat/id9-r214-editor-polish @ 8893a63 (r215)

TL;DR

The 5 r216 changes

1. applyTransformToSelected in selection.ts — walks selected ids, mutates singleton.currentLayers, pushes a snap. Takes a LayerTransform with visible/locked/opacity/blendMode/name fields.

2. sig() includes opacity + blendMode + name — prevents false dedup when only opacity/blendMode/name change. Undo now correctly distinguishes between visible=false and visible=false+opacity=50.

3. Inspector multi-transform fields — visible toggle, locked toggle, opacity slider (0-100), blendMode dropdown (normal/multiply/screen/overlay/darken/lighten). When N > 1 selected, changes apply to ALL selected layers. Name applies to first selected only.

4. Inspector multi-tag — shows "N SELECTED" in the header when N > 1. Apply button text: "Apply to " or "Apply transform to N layers".

5. Context menu on LayersPanel — right-click on a row opens a menu at the click position. Single-row menu (rename, duplicate, move up, move down, delete) or multi-select menu (delete selected, duplicate selected). Closes on outside click or Escape.

What this means

The 3 critical r216 details

1. sig() now includes opacity + blendMode + name — the previous sig only used visible + locked, so two snaps with the same visible/locked but different opacity would be treated as duplicates. r216 fixes this by including all transformable fields in the sig.

2. Multi-transform walks the selection set — the hook's applyTransformToSelected reads singleton.currentSelected (the multi-select set from r215), applies the transform to each selected layer, and pushes a single snap. The snap's layers field reflects the new state.

3. Context menu is data-driven — the menu's content depends on whether the right-clicked row is in the multi-select set. If yes → multi-select actions. If no → single-row actions. The same contextMenu state drives both.

Test results

What's next

1. Operator review of the r216 multi-transform + context menu in the dev server (port 5304)

2. Operator decision on merge (r213 + r214 + r214.1 + r215 + r216 = the full ID9 chrome + Editor + polish + stability + multi-select + drag + multi-transform + context menu)

3. Production deploy — npm run build + scp to 185.249.73.178?

4. Multi-select keyboard shortcuts (Cmd+A, Esc)

5. Inspector → AI integration (Phase 4.3 Step 2, requires vault decision)

Open questions

1. Merge r216 (7ecbaa4) to main now, or wait for next refinement?

2. Production deploy — npm run build + scp to 185.249.73.178?

3. Multi-select keyboard shortcuts (Cmd+A, Esc) — needed, or wait?

4. Inspector → AI integration (Phase 4.3 Step 2)?

Verification

cd /workspace/vibecoder-standalone-r214
npx tsx src/host/editor/__tests__/editor-r216.test.tsx  # 41/41
R216_BASE=http://localhost:5304 node scripts/smoke/r216-smoke.spec.cjs  # 21/21
grep -l "

Expected: 407/407 total tests pass, 0 iframes, 0 postMessage.