FE-504: Add Copy, Paste and Select All to Petrinaut editor#8533
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
97b4e36 to
7889b18
Compare
39823b5 to
44fe283
Compare
PR SummaryMedium Risk Overview Implements paste behavior that generates new IDs, deduplicates names, remaps references/arcs, and offsets pasted node positions, returning newly created item IDs for auto-selection. Updates editor keyboard handling to support Written by Cursor Bugbot for commit 2f0f041. This will update automatically on new commits. Configure here. |
🤖 Augment PR SummarySummary: Adds clipboard + selection keyboard shortcuts to the Petrinaut SDCPN editor, enabling users to copy/paste selections and quickly select/deselect canvas items. Changes:
Technical Notes: Clipboard payload is explicitly versioned, and paste performs ID remapping and reference preservation/remapping for types, equations, parameters, places, transitions, and arcs. 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
...ashintel/petrinaut/src/views/Editor/panels/LeftSideBar/subviews/filterable-list-sub-view.tsx
Outdated
Show resolved
Hide resolved
libs/@hashintel/petrinaut/src/views/Editor/components/BottomBar/use-keyboard-shortcuts.ts
Show resolved
Hide resolved
libs/@hashintel/petrinaut/src/views/Editor/panels/LeftSideBar/subviews/types-list.tsx
Outdated
Show resolved
Hide resolved
7889b18 to
1a404fc
Compare
927d425 to
70f9a7e
Compare
956fe86 to
c4cda77
Compare
CiaranMn
left a comment
There was a problem hiding this comment.
On pasting, can we automatically select the pasted elements?
Usually the first thing users will want to do is to move pasted things elsewhere.
70f9a7e to
8fcc710
Compare
c4cda77 to
90c92c9
Compare
This actually works in Storybook, but not after integration into the website. Maybe a race-condition. Let's create another ticket for fixing all this, but would be better IMO to do that after integrating Automerge. So we can start consolidating all the mess. |
Merge activity
|
Implement clipboard support with a versioned JSON format (petrinaut-sdcpn v1) validated by zod. Copy serializes selected items (places, transitions, token types, differential equations, parameters) with arc preservation. Paste duplicates items with new UUIDs, deduplicates names, remaps internal references, and offsets node positions. Cmd+A selects all canvas nodes, Escape clears selection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
90c92c9 to
9cf2392
Compare
8fcc710 to
2f0f041
Compare


🌟 What is the purpose of this PR?
Add clipboard support and selection shortcuts to the petrinaut editor, enabling users to copy, paste, and select all items in the SDCPN canvas.
🔗 Related links
🔍 What does this change?
petrinaut-sdcpnv1). Arcs between selected nodes are preserved within their transitions; arcs to unselected nodes are stripped.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🐾 Next steps
🛡 What tests cover this?
deduplicate-name.test.ts— name suffix logic (12 tests)serialize.test.ts— serialization, arc stripping, payload parsing with zod validation (32 tests)paste.test.ts— ID generation, name deduplication, position offset, arc remapping, reference remapping, data preservation (33 tests)❓ How to test this?