Workspace has no clipboard paste support — user can drag/drop or click to browse, but can't paste an image from another app #186
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#186
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
grep -rn 'paste\b\|onPaste\|clipboardData' src/returns 1 hit — a comment insrc/components/workspace/threadLibrary.ts:9about pasting thread library text, not image paste support.The dropzone supports:
It does NOT support:
A user who screenshots a sketch in another app and wants to digitize it has to:
The first two steps are unnecessary — the browser's clipboard API is straightforward, and most image-aware web apps (Google Docs, Notion, Figma) support Cmd+V.
Where
src/components/workspace/CanvasArea.tsx:320-345— the dropzonesrc/components/workspace/useWorkspace.ts— handleFileChange handlerSuggested fix shape
Add a
pasteevent listener on the workspace's document when the user is in theemptystate (no image uploaded):The
handleFileUploadis the same function the dropzone calls. The handler is only registered when the dropzone is visible (appState='empty').Optionally: add a small "Tip" line under the dropzone: "Or paste an image with Cmd+V" — discoverable hint.
Severity
Low. The user can use the file picker. Power users expect paste.
Discovered by
Gap analysis (2026-10-02) of workspace upload affordances.
Related
Fixed in
1f5ca57(fix(#186): workspace dropzone accepts pasted images (Cmd/Ctrl+V)).useWorkspace.ts: window-levelpastelistener registered whilestate.appState === 'empty'. Walkse.clipboardData.items, picks the firstimage/*entry, hands the resulting File to the existinghandleFileUploadso the MIME allowlist, 20MB cap, filename derivation, and toast messaging are reused unchanged from the dropzone / file-picker flow. Listener tears down on appState change so a stale paste can't double-fire on a populated workspace.CanvasArea.tsx: added a discoverable hint line "or paste an image with ⌘V / Ctrl+V" under the existing "or click to browse" copy.issue-186.test.ts: 5 new tests — paste(image/*) uploads, text-only clipboard is a no-op, mixed clipboard picks the first image, leaving empty state removes the listener, paste during 'digitizing' is a no-op.Verified locally:
tsc -p tsconfig.json --noEmitclean, eslint clean on the changed files,vitest run833 passed / 3 pre-existing EditorCanvas failures unrelated to this work.