Skip to content

feat: delete multiple selected items at once with Delete key#38

Merged
liam-machine merged 1 commit into
mainfrom
ship/multi-select-delete
May 1, 2026
Merged

feat: delete multiple selected items at once with Delete key#38
liam-machine merged 1 commit into
mainfrom
ship/multi-select-delete

Conversation

@liam-machine
Copy link
Copy Markdown
Owner

Summary

  • Multi-select on the canvas (shift-click or rubber-band drag), then Delete removes all selected items in one go — models, annotations, and standalone edges
  • New removeModels batched message: one WorkspaceEdit, one save, one undo step for the entire batch
  • Single batched VS Code prompt for "delete N model files?" replaces N back-to-back popups
  • handleRemoveModel refactored to delegate into the batch handler (~80 lines of duplication removed)
  • deleteKeyCode={null} on ReactFlow disables its built-in delete handler, which was racing our window-level handler and clearing selection

Test plan

  • Shift-click 3+ models, press Delete — all disappear, single undo restores them
  • Rubber-band-drag select (S key or shift-drag) over a region, Delete — same
  • Single-node click + Delete still triggers the DetailPanel two-step confirm (unchanged)
  • Multi-select that includes annotations and edges — all delete together
  • In V5 domains, "delete N model files?" prompt appears once with correct singular/plural copy
  • Physical (read-only) stage rejects multi-delete

🤖 Generated with Claude Code

Selecting 2+ items on the canvas (any mix of model nodes, annotations,
edges) and pressing Delete now removes them all in one operation.
Models go through a new batched removeModels handler that produces a
single WorkspaceEdit — one undo step restores everything.

The single-node delete flow (DetailPanel two-step confirm) is preserved.
The single batched VS Code prompt for "delete N model files?" replaces
N back-to-back popups. handleRemoveModel was refactored to delegate
into the batch handler, removing ~80 lines of duplicated V4/V5 logic.

deleteKeyCode={null} on the ReactFlow component disables React Flow's
built-in Delete handler, which was firing first and clearing the
selection before our window-level handler could read it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@liam-machine liam-machine merged commit 3df971b into main May 1, 2026
2 checks passed
@liam-machine liam-machine deleted the ship/multi-select-delete branch May 1, 2026 21:12
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