Repository navigation
Copy and paste items between strategies on the same map - #401
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 27, 2026
SunkenInTime
force-pushed
the
t3/canvas-group-move
branch
from
October 28, 2026 00:10
196ce92 to
4eb55f2
Compare
SunkenInTime
force-pushed
the
t3/canvas-copy-paste
branch
from
October 28, 2026 00:10
ee1de35 to
dc28459
Compare
Ctrl+C copies the selection, Ctrl+X cuts it, and Ctrl+V pastes it where it was, as one undo step, into any strategy on the same map (a paste on another map says so). The clipboard lives in the app, never on the system clipboard. Pasted into the strategy it came from, an image shows the same picture. Pasted into another strategy, local or cloud, each picture is saved there anew and uploads as a dropped image does. Copy reads the pictures' bytes when it is made, so the source need not be open to paste. Pasted items keep their copy root, so pasted pages still animate between each other.
Cutting an image and pasting it in the same cloud strategy refused with "hadn't loaded" when the copy could not download the picture (offline, or a browser origin the storage does not allow): the paste looked for the picture on the page on screen, where a cut one is no longer listed. In the cloud the picture is still there (a cut image's tombstone keeps it for 30 days), so the strategy it came from always keeps its picture; only a local strategy, which cleans up unused files when it reopens, checks for the file. The refusal now says the picture could not be read, not that it hadn't loaded.
SunkenInTime
force-pushed
the
t3/canvas-group-move
branch
from
October 28, 2026 01:56
4eb55f2 to
043a666
Compare
SunkenInTime
force-pushed
the
t3/canvas-copy-paste
branch
from
October 28, 2026 01:56
fd44ee0 to
3545276
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows release build: Ctrl+A and Ctrl+C in "Source" (agents, a smoke, text, a stroke, an image and a lineup with a screenshot); Ctrl+V in "Playbook" puts it all down where it was; Ctrl+V in "Bind plan" is refused with a toast.
This is the last PR in the selection stack, on #400; the three merge together. It is the request itself: a player wanted to bring replay-captured pages into the playbooks they already have, and later move single items like one lineup between strategies.
What changes
Pictures
Copy reads every picture's bytes when it's made, so the source doesn't need to stay open. A picture can come from a local file, from bytes still uploading, or as a cloud download.
Into the strategy it came from: an image shows the same picture while that picture is still there, as copies already do (
assetId). If its last use was cut and the file cleaned up, or the cloud copy swept, it's put back from the copied bytes.Into another strategy, local or cloud: each picture is saved anew and, on cloud, uploaded the way a dropped image is:
enqueuePlacedImageUpload,enqueueLineupMediaJobs);commitStagedMediaReferences.That path is durable, survives restarts and works offline, and a failed upload already shows in the sync menu. There is no new server code.
Picture ids: the first pasted image of a picture takes the picture's id and later ones point at it. That's the original-and-copies shape #276 set up, so builds that drop
assetIdstill show the right picture.Refusals: a paste refuses rather than put down items whose pictures it can't save:
Ids
Pasted items get copy ids (
<root>~cp1~<uuid>), so a page transition still pairs a pasted agent with the one it came from. Pages pasted one after another (consecutive replay captures, say) keep their agents gliding. An item imported with a very long id gets a plain uuid instead, under the same rule offline page copy already used. That rule moved tonewStorableCopyIdso both share it.Ground truth
active.active.Not covered
saveSecureImagehandles that, but I didn't see it.ci: analyze test web