Conversation
|
Here's a visual recap of what changed: Open the full interactive recap |
There was a problem hiding this comment.
Builder reviewed your changes — looks good ✅
Review Details
Incremental Code Review — PR #5519 Latest Head
Status: All Prior Issues Resolved ✅
The latest commits comprehensively addressed the previously flagged coordinate-space regression. The PR now correctly measures wrapper positions relative to their containing block (offsetParent), not their DOM parent, ensuring that released absolute children maintain correct positioning when ungrouped inside offset static parents.
What was fixed since last review:
-
Containing-block coordinate measurement (
frame-selection.ts:274): Changed fromelement.parentElementtoelement.offsetParent ?? element.parentElement. The comment clarifies the intent: "static wrappers can sit inside an offset ancestor, so using parent-relative values here would shift children when the measured wrapper is removed." This directly solves the regression. -
Drop-target selection rewrite (
primitive-drop-target.ts): Replaced area-based heuristic with explicit ancestor-relationship checking viaisPrimitiveAncestor(). Now prefers deepest nested containers and respects DOM paint order for overlapping siblings (later siblings win). Both regression cases from the prior review are now handled correctly. -
Test expansion: Added 5 new tests covering measured flow wrapping/unwrapping, absolute children rebasing, static wrapper edge cases, equal-sized nested containers, and overlapping sibling paint order. All pass.
-
Unwrap positioning semantics (
code-layer.ts:8109-8110): Now handles bothabsoluteandrelativepositioned wrappers, with a new test confirming static wrappers don't trigger spurious rebasing.
Verification:
- ✅ Prior comment
PRRT_kwDORlS_j86kaer8resolved (measured parent-relative offsets fix confirmed) - ✅ All 5 new unit tests pass (wrap/unwrap, drop target ancestor checking, static wrapper edge case)
- ✅ No new regressions introduced by latest commits
- ✅ Coordinate geometry semantics now correctly handle all path cases
🧪 Browser testing: Attempted; all Design flows (group/ungroup, overview drops) remain unverified due to unavailable MCP Chrome browser-control tools.

Fixes two Design pointer regressions from the physical matrix:
Focused proof:
Browser E2E was not run in this worktree; the focused bridge/runtime matrix remains the CI proof surface.,