Skip to content

feat: edit nested geometry with an explained pin - #5

Merged
HappyLiang12 merged 8 commits into
mainfrom
feat/drill-in-nested-geometry
Oct 27, 2026
Merged

HappyLiang12 merged 8 commits into
mainfrom
feat/drill-in-nested-geometry

Conversation

@HappyLiang12

Copy link
Copy Markdown
Owner

Summary

Drill-in phase 2: a single nested selection now supports position, size, rotation, drag, resize, and nudge; a flow element pins to absolute on its first edit with a one-time explanation and Undo.

What changed

  • Geometry gates removed for a single selection at any depth (resize, rotate, drag, nudge, overlay handles). Multi-selection stays read-only and structural commands stay top-level only.
  • Lock integrity. Multi-select requires a top-level base, drag and nudge filter blocked items, and a locked/hidden/grouped top-level ancestor makes its nested children inert (handles, gestures, and the Inspector's numeric fields).
  • Pin notice. A shared isPositioned check backs both willPinToAbsolute and applyGeometryEdit. Drag, resize, and nudge pin flow elements and show a one-time overlay notice with Undo (rotation pins silently, by contract). The notice dismisses on history/document changes and before any pending text edit, so its Undo can never revert an unrelated change.
  • E2E covers drag+persist+reload, Undo restoring the authored style and the once-per-session rule, rotation pinning without a notice, a pending text edit dismissing the notice, a grid child pinning while its parent keeps display: grid, Escape cancelling a nested drag while keeping the context, and nested resize/rotate with saved-file assertions.
  • Docs and feature matrix updated for nested geometry; nested-appearance and edit-context-feedback remain registered as planned for the next phases.

Tests

npm run verify at 664c628: lint, deps, typecheck, core 393, editor 366+, renderer 36, host 132, mcp 101, cli 84, feature matrix 18/18, Playwright 212 passed, package smoke pass.

Spec and plan

  • docs/superpowers/specs/2026-10-25-nested-container-editing-design.md
  • docs/superpowers/plans/2026-10-25-drill-in-nested-geometry.md

Notes

Drop the path-length gates from resize, rotate, drag, and nudge so a single
selection at any depth reaches the existing elementAtPath/applyGeometryEdit
path, and render overlay handles for it. The inspector's read-only state now
derives from multi-selection only.

Multi-selection stays read-only, toggleSelect still collapses nested targets
to a single selection, and structural commands remain top-level only.

Rewrite the nested read-only E2E to the new contract: a single nested child
gets handles, drags, pins to absolute, nudges, and saves, while a two-object
multi-selection keeps outlines only and disabled geometry fields.
Alt-drilling can select a child of a locked, hidden, or group top-level
wrapper, but the wrapper owns the subtree's editability. Resolve the
top-level ancestor in resize, rotate, drag, nudge, and the overlay
handles so a locked object stays uneditable at every depth. Top-level
paths keep their existing per-element checks, including group rotation.

Cover the locked wrapper in drill-in.spec.ts with no-handle, no-nudge,
and no-drag assertions plus unlocked positives for each gesture.
The notice Undo delegated to the global undo, which settles a pending
edit into its own history entry and reverts that instead of the pin.
Dismiss the notice when an edit is pending or a text session starts,
keep the status live region mounted, and move the card to the canvas
bottom-left so the 16:9 stage keeps its bottom handles clear.
Nested geometry is editable, so architecture and contract no longer call
it read-only, and README notes that rotation pins a flow object silently.
Tag the drill-in-selection and nested-geometry coverage ids, register the
two later drill-in ids as planned, and strengthen the Escape drag test so
a context one level too deep fails on .cover and its row paths.
@HappyLiang12
HappyLiang12 changed the base branch from feat/drill-in-editing-context to main October 27, 2026 00:25
@HappyLiang12
HappyLiang12 merged commit 5c3dc66 into main Oct 27, 2026
52 checks passed
@HappyLiang12
HappyLiang12 deleted the feat/drill-in-nested-geometry branch October 27, 2026 00:46
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