Skip to content

feat: drag and copy using alt+drag - #2738

Open
sidmohanty11 wants to merge 1 commit into
mainfrom
copying-drag
Open

feat: drag and copy using alt+drag#2738
sidmohanty11 wants to merge 1 commit into
mainfrom
copying-drag

Conversation

@sidmohanty11

Copy link
Copy Markdown
Contributor

No description provided.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@builder-io-integration builder-io-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builder reviewed your changes and found 1 potential issue 🟡

Review Details

Code Review Summary

PR #2738 adds Option/Alt-drag duplication for overview frames, including multi-frame selections, and tightens the editor's optimistic create/update path so concurrent duplicates are not lost. It also changes primitive creation selection semantics and forces a full preview document refresh for structural element copies. The overall approach is thoughtful: gesture cleanup is centralized, live refs avoid stale geometry, and the new unit/E2E coverage exercises frame, group, and element-copy behavior.

Risk assessment: Standard. The main concern is a multi-selection state-management issue: independent duplicate completions each focus their own newly created screen, so the final selection and camera depend on whichever request resolves last. This undermines the expected copied-group workflow and the explicit camera-stability intent. Other reviewed paths, including modifier release/cancellation, locked frames, and concurrent mutation handling, looked sound.

Key Findings

  • 🟡 MEDIUM — Multi-frame alt-drag does not preserve the copied group as the final selection and may move the camera to an arbitrary clone.

🧪 Browser testing: Will run after this review (PR touches UI code)

fromCount: screensRef.current.length,
addedCount: targets.length,
};
targets.forEach((target) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Preserve the copied group selection after multi-frame alt-drag

Each selected frame starts an independent onDuplicate call, and each completion in the editor focuses its own newly created screen. As a result, the final selection (and camera focus) is whichever clone finishes last, rather than the copied group, despite this gesture explicitly suppressing camera recentering. Batch the operation or coordinate the completions so all created IDs are selected and the camera is retained once the group is complete.

Additional Info
Found by 1 of 3 code-review agents; validated against the per-frame completion path in DesignEditor.

Fix in Builder

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

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.

2 participants