feat: copy for Claude Code handoff (WSL path translation)#9
Merged
Conversation
Adds a third editor output, "Copy for Claude Code", that saves the annotated PNG to Downloads/shotback/ via chrome.downloads, reads back its absolute on-disk path, and copies a Claude-ready prompt referencing the file. A Windows path (C:\...) is translated to its WSL /mnt equivalent so a Claude Code session running in WSL can read the image directly; POSIX paths pass through unchanged. If the absolute path can't be resolved, it falls back to the relative Downloads/shotback path and signals a non-success status rather than reporting success. - src/lib/wslPath.ts: pure toClaudePath() + tests. - src/lib/feedback.ts: buildClaudeCodePrompt() sharing comment formatting with buildExternalLlmPrompt; tests. - public/manifest.json: add "downloads" permission; SECURITY.md rationale. - src/editor/main.tsx: copyForClaudeCode() handler + button. - Sync CLAUDE.md / README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DCCA
added a commit
that referenced
this pull request
Jun 27, 2026
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.
Why
Sharing a screenshot with a Claude Code session was broken in two ways: the Copy Local Share Link output produces a
chrome-extension://…URL an LLM can't read, and when Claude runs in WSL while the browser runs in Windows, the only readable artifact is a file on disk — which the user had to hunt down manually. The Windows Downloads folder is visible from WSL at/mnt/c/…; this wires that up automatically.What
A third editor output, Copy for Claude Code:
Downloads/shotback/viachrome.downloads.C:\Users\…\x.png) to its WSL mount (/mnt/c/Users/…/x.png); POSIX paths pass through unchanged.Review this screenshot: <path>+ page URL + comments) to the clipboard.If the absolute path can't be resolved within a short poll, it falls back to the relative
Downloads/shotback/<name>.pngand reports a non-success status (never a false success).src/lib/wslPath.ts— puretoClaudePath()(unit-tested).src/lib/feedback.ts—buildClaudeCodePrompt(), sharing comment formatting withbuildExternalLlmPrompt(unit-tested).public/manifest.json— adddownloadspermission; rationale inSECURITY.md.src/editor/main.tsx—copyForClaudeCode()handler + button; the existing two outputs are untouched.Spec:
.docs/doing/2026-06-27-claude-code-capture-handoff/(Change B).Verification
npm run typecheck,npm run lint,npm run test(42 passing, +8 new),npm run format:check,npm run build— all green locally.dist/output: manifest includes thedownloadspermission;editor.jsbundle containschrome.downloads,/mnt/, and the new prompt text.chrome.downloadsflow (save + path read-back) is verified manually when loaded unpacked — no runner exists for the live extension; the pure translation/prompt logic is covered by unit tests.🤖 Generated with Claude Code