Files
Little-God1983-ComfyUI-AI2G…/web
ChrisandClaude Opus 4.8 fdb7be3df8 Add region parenting / hierarchy (Phase 2)
Editor-only parent/child hierarchy on top of the stable ids — never reaches the exported caption
(Python ignores unknown box fields).

- Data: each box gets an optional `parent` (another box's id). Helpers: boxById, isAncestor,
  descendantIds, setParent (rejects self/missing/cycles), ensureParentsValid (drops dangling refs
  to root on delete/import; runs in serialize()).
- Move propagation: dragging a box on the canvas moves its whole subtree (children follow). Resize
  affects only explicitly-selected boxes — children don't scale. Locked descendants stay put.
- Object Explorer is now a tree: indentation by depth, per-parent ▶/▼ collapse (persists on the box).
  Drag a row ONTO another to nest it (cycle-guarded, live drop highlight); drop on the "Regions"
  header to send it back to root. Trailing-click after a reparent is suppressed.
- Delete promotes a box's children to its parent (no surprise subtree wipe).
- Paste/duplicate clear parent (become roots) so clones never carry stale parent ids.
- Z-order stays independent of hierarchy (still reorder via the right-click region menu).

JS parses clean as an ES module.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 00:48:31 +02:00
..