Fix/desktop image paste - #511
Closed
mrsharpoblunto wants to merge 4 commits into
Closed
mrsharpoblunto wants to merge 4 commits into
mrsharpoblunto wants to merge 4 commits into
Conversation
Desktop Ctrl+V image paste was silently dropped whenever DataTransferItem.getAsFile() returned null or the image item arrived with an empty MIME type (seen in Chrome and Firefox, Codex and Claude sessions). - image-input.js: _collectPastedImages() now probes empty-MIME file items, reads clipboardData.files, guards getAsFile() nulls/throws, dedups blobs seen via both items and files, and reports sawImageData so the trap can try the async navigator.clipboard.read() fallback instead of dying silently (with a toast when recovery fails). - keyboard-accessory.js: composer/textarea paste handlers share the same file-local collection rules. - Duplicate-paste invariant preserved: one Ctrl+V may emit two paste events; the trap still consumes only the first.
Some engines leave navigator.clipboard.read() pending forever when the permission prompt can never be answered (observed in headless Firefox, which does expose the API). Race the read against a 10s timeout so the paste trap always reaches the failure toast instead of silently doing nothing.
Local-fs save died as 500 ENOENT for remote-SSH cases, whose workingDir lives on another host. Pipe validated bytes over ssh (mkdir, probe-verify dir containment, stream via stdin); unreachable hosts map to 502.
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.
No description provided.