docs(f6): any-file behavior + Ctrl+Alt+D wording (#19)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ben Stull
2026-06-11 07:52:31 -07:00
parent 15d1df0f4c
commit 5897fb7b26
2 changed files with 29 additions and 19 deletions
+18 -12
View File
@@ -132,26 +132,32 @@ record per the contract; git push/pull is the transport, no re-homing ever.
Design: `vscode-cowriting-plugin-content/specs/coauthoring-cross-rung-format.md`. Design: `vscode-cowriting-plugin-content/specs/coauthoring-cross-rung-format.md`.
## F6 — Diff-view toggle (Feature #17) ## F6 — Diff-view toggle (Feature #17, #19)
**Cmd/Ctrl-Alt-D** (or **Cowriting: Toggle Diff View**) flips a tracked **`Ctrl+Alt+D`** (the same chord on macOS — not `Cmd`; or **Cowriting: Toggle
document into a native `vscode.diff` against a **coauthoring baseline** — the Diff View**) flips the focused document into a native `vscode.diff` against a
readonly baseline on the left, your **live, editable** document on the right **coauthoring baseline** — the readonly baseline on the left, your **live,
(so you keep writing inside the diff; toggling again closes it). The diff editable** document on the right (so you keep writing inside the diff; toggling
answers "what did *I* change?" in one keystroke instead of git archaeology. again closes it). The diff answers "what did *I* change?" in one keystroke
instead of git archaeology.
- **Works on any file (#19):** any document you can edit — a file inside or
outside the workspace folder, or an **untitled** scratch buffer. Only a
non-text-editor focus warns. (Untitled buffers diff in-memory; saving makes
the baseline persist.)
- **Machine-factored baseline (INV-18):** the baseline initializes when a doc - **Machine-factored baseline (INV-18):** the baseline initializes when a doc
is first tracked and **advances automatically at every machine landing** is first seen and **advances automatically at every machine landing** (every
(every successful `applyAgentEdit` seam apply — INV-9). So text Claude landed successful `applyAgentEdit` seam apply — INV-9). So text Claude landed never
never shows as a change; everything the diff shows is operator-authored by shows as a change; everything the diff shows is operator-authored by
construction — no attribution filtering. construction — no attribution filtering.
- **Pin on demand:** **Cowriting: Pin Diff Baseline to Now** resets the - **Pin on demand:** **Cowriting: Pin Diff Baseline to Now** resets the
baseline to the current buffer for a deliberate "review my next pass" epoch; baseline to the current buffer for a deliberate "review my next pass" epoch;
the diff tab title names the epoch (`opened` / `Claude landed` / `pinned`). the diff tab title names the epoch (`opened` / `Claude landed` / `pinned`).
- **Pure view, repo-free (INV-19):** the baseline snapshot lives in VS Code - **Pure view, repo-free (INV-19):** the baseline snapshot lives in VS Code
workspace storage, **never** the repo — `.threads/`, the cross-rung contract **global** extension storage, keyed by a hash of the document URI, **never**
(INV-14..17), and `SCHEMA_VERSION` are untouched. Storage-unavailable the repo — `.threads/`, the cross-rung contract (INV-14..17), and
degrades to in-memory baselines + one warning. `SCHEMA_VERSION` are untouched. Storage-unavailable degrades to in-memory
baselines + one warning.
- **No LLM in CI:** host E2E (`test/e2e/suite/diffView.test.ts`) drives the same - **No LLM in CI:** host E2E (`test/e2e/suite/diffView.test.ts`) drives the same
programmatic seam ingress (propose + accept) the F4 suite uses. programmatic seam ingress (propose + accept) the F4 suite uses.
+11 -7
View File
@@ -6,10 +6,11 @@ rest of F6 needs no credentials and no network.
1. `npm run build`, launch the extension (F5 in VS Code opens the committed 1. `npm run build`, launch the extension (F5 in VS Code opens the committed
`sandbox/` playground), open `playground.md`. `sandbox/` playground), open `playground.md`.
2. Edit a sentence by hand, then **Cmd/Ctrl-Alt-D** (or run **Cowriting: Toggle 2. Edit a sentence by hand, then **`Ctrl+Alt+D`** (same chord on macOS — not
Diff View**). ✅ A diff opens: the readonly baseline on the left, your live `Cmd`; or run **Cowriting: Toggle Diff View**). ✅ A diff opens: the readonly
document on the right; the tab title reads `playground.md — my changes since baseline on the left, your live document on the right; the tab title reads
opened <time>`. Your hand edit shows as a change. `playground.md — my changes since opened <time>`. Your hand edit shows as a
change.
3. Keep typing **in the diff's right pane**. ✅ Editing continues in place; 3. Keep typing **in the diff's right pane**. ✅ Editing continues in place;
decorations/threads still work. Toggle again. ✅ The diff tab closes and the decorations/threads still work. Toggle again. ✅ The diff tab closes and the
normal editor is back. normal editor is back.
@@ -21,6 +22,9 @@ rest of F6 needs no credentials and no network.
now); the title reads `pinned <time>`. Type → your changes show against the now); the title reads `pinned <time>`. Type → your changes show against the
pin. pin.
6. Reload the window (Developer: Reload Window). ✅ Toggle: the baseline is the 6. Reload the window (Developer: Reload Window). ✅ Toggle: the baseline is the
same as before the reload (persisted in workspace storage, not the repo — same as before the reload (persisted in **global** extension storage, not the
INV-19; `git status` shows nothing new). repo — INV-19; `git status` shows nothing new).
7. Toggle on a file outside the workspace folder. ✅ A warning, no diff. 7. **Any file (#19):** open a file from *outside* the `sandbox/` folder, or a
new untitled buffer (`Cmd/Ctrl+N`), edit it, and `Ctrl+Alt+D`. ✅ The diff
opens there too — untitled buffers show `(unsaved)` in the title and diff
in-memory. Toggle with focus on a non-editor (e.g. the terminal) → warning.