Files
2026-06-11 13:15:54 -07:00

2.3 KiB

Manual smoke — F8 out-of-workspace authoring

Confirms "Ask Claude to Edit Selection" (+ threads / attribution) work on a file outside the workspace folder and on an untitled buffer, while in-workspace authoring is unchanged. One live turn hits the SDK (the only LLM step).

Spec: vscode-cowriting-plugin-content/specs/coauthoring-out-of-workspace.md.

Prereqs

  • Build: npm run build.
  • Launch the Extension Development Host (F5 in VS Code) with this repo's sandbox/ opened as the workspace folder.

A. Out-of-folder file (PUC-1)

  1. Open a markdown file from a DIFFERENT directory (outside sandbox/) — e.g. a sibling repo, or File > Open a scratch file under /tmp.
  2. Select a sentence → Command Palette → Cowriting: Ask Claude to Edit Selection → type an instruction → wait for the proposal (amber range + ✓/✗).
  3. Accept (✓). Expect: the text is replaced and shows the Claude attribution tint.
  4. Add a coauthoring thread on a selection (Add Coauthoring Thread on Selection).
  5. Close and reopen the file (or revert). Expect: the thread + attribution are restored. There is no .threads/ folder beside the file — its state lives in VS Code global storage (<globalStorage>/sidecars/<hash>.json).

B. Untitled buffer (PUC-2)

  1. File > New File (don't save) → type a few sentences.
  2. Select → Ask Claude to Edit Selection → instruct → accept. Expect: it works exactly like A, in-session.
  3. Reload the window (Developer: Reload Window). Expect: the untitled buffer's coauthoring state is gone (in-memory only — documented limitation, §6.7).

C. In-workspace unchanged (PUC-3)

  1. Open a file UNDER sandbox/. Repeat the propose→accept→thread loop.
  2. Expect: a committable sandbox/.threads/<path>.json sidecar is written, exactly as before F8 (byte-for-byte, INV-2).

D. Read-only view declines (PUC-5)

  1. Open a Git diff / Output view, select text, run Ask Claude to Edit Selection.
  2. Expect: a warning that this kind of document can't be edited (not "select some text").

E. Folder-less (optional)

  1. Launch the EDH with no folder open. Open an untitled buffer or File > Open any file. Repeat A/B. Expect: authoring works (every doc routes to global storage); the commands are not stubbed.