Repository navigation
Copy an image in the diff to the clipboard with a right-click - #139
Merged
Merged
Conversation
A right-click on an image card's stage copies one side as a PNG of its first frame: the side under the pointer in side-by-side, the side of the divider in swipe, the side showing in blink, and the after in onion skin and pixel diff. It goes to the clipboard through main, like text does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Where scrollbars always show, the icon card loading below the logo grows the page and a scrollbar narrows the logo's stage after its fit was read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e live stage A "Copied to clipboard" toast shows over the image card for a moment once main has the PNG; a PNG that will not encode now fails instead of passing silently. The image card e2e compared 0 against the fit it read right after picking swipe, but swipe's taller card can bring in a scrollbar after that fit and narrow the stage; it now compares against the fit for the stage as it is, in place of waiting for the icon card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Getting an image out of the diff meant finding the file on disk; now a right-click on it copies it.
Summary
clipboard-write-imagechannel; main writes it withclipboard.writeImage, going through the host for the same reason text copying doesSideStagetakes asideinstead of alabel, so the stage under the pointer can be told apartWorth knowing
0landed on a slightly different fit than the one the test had saved. The test now compares against the fit for the stage as it is. The app itself still leaves the view about 15px too wide in that case.Tests
test/image-compare-copy.test.ts, which side each mode copiessession-work-images.spec.tsright-clicks Before, After and a card in blink, checks the size of each PNG sent to the stubbed clipboard, and that the toast shows and goes🤖 Generated with Claude Code