[Bugfix #252] Add image paste and mobile clipboard support to dashboard#255
Merged
waleedkadous merged 5 commits intoFeb 14, 2026
Merged
Conversation
Contributor
Author
CMAP Review SummaryGemini: REQUEST_CHANGES
Codex: REQUEST_CHANGES
Claude: REQUEST_CHANGES
Changes Made (commit 4053cb2)All legitimate issues addressed:
|
Contributor
Author
CI StatusUnit Tests and Tower Integration Tests are failing — verified these are pre-existing failures on main (run #22016126192 on main shows identical failures):
Passing checks: CLI Tests (macOS + Ubuntu), CLI Integration Tests, Package Install Verification No regressions introduced by this PR. |
…shboard terminal - Detect images in clipboard on Cmd+V using navigator.clipboard.read() - Upload image blobs via existing /api/paste-image endpoint - Paste resulting file path into terminal after upload - Add native paste event listener for mobile browser support (long-press menu) - Show upload progress indicator and error handling - Fall back to text paste when no image detected or clipboard API unavailable
- Add error handling in tryPasteImage for upload failures (clear status, show error message, don't fall back to text) - Make MIME filtering consistent: use IMAGE_TYPES allowlist in both keyboard and native paste paths - Add regression test for upload failure via keyboard shortcut
- Add uploadPasteImage() export to dashboard api.ts - Add POST /api/paste-image endpoint to tower-server.ts (accepts image blob, validates 10MB limit, stores in /tmp/codev-paste/) - Both were missing from the worktree (existed only on main)
…eventDefault ordering
c242a56 to
6106012
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.
Summary
Fixes #252
/api/paste-imageendpoint and pastes the resulting file pathpasteevent listener on the terminal container for mobile browser support (long-press paste menu)Root Cause
The existing paste handler only used
navigator.clipboard.readText()which silently ignored image content in the clipboard. Mobile browsers couldn't trigger clipboard operations at all since they rely on native paste events rather than keyboard shortcuts.Fix
navigator.clipboard.read()to check for image MIME types (png, jpeg, gif, webp, bmp)uploadPasteImage()(existing API), shows[Uploading image...]status, then pastes the file pathpasteevent listener on the terminal container that handles both image and text paste from mobile context menusclipboard.read()is unavailable or denied, falls back toreadText()for text pasteTest Plan
Acceptance Criteria
CMAP Review
Pending