F6 #34: delete the dead two-pane diff-view UI, keep the baseline data layer

F10 (#29) made the rendered preview the single review surface and hid the F6
two-pane vscode.diff view (command + ctrl+alt+d set when:false). This removes
that now-unreachable view code:

- DiffViewController: drop toggle/findDiffTab/epochLabel/isDiffOpen, the
  `cowriting-baseline:` TextDocumentContentProvider + BASELINE_SCHEME + baselineUri
  + the content-provider change emitter, and the toggleDiffView command. The
  baseline DATA layer is fully intact — ensureBaseline/advance/pin/capture,
  getBaseline, baselineFilePath, onDidChangeBaseline, persistence (INV-19), and
  the machine-landing auto-advance (INV-18) that F7/F10 consume.
- package.json: remove the toggleDiffView command, its commandPalette entry, and
  the ctrl+alt+d keybinding.
- E2E: diffView suite keeps the baseline-data-layer tests, drops the two-pane
  view tests; the F10 + no-workspace suites assert toggleDiffView is now absent
  (was: declared-but-hidden).

Deliberate deviation from the issue's literal acceptance: pinDiffBaseline is
KEPT. The canonical Solution Design (coauthoring-interactive-review.md §6.7)
scopes the removal to the two-pane VIEW only ("keep the controller + baseline
store"); pin() lives in the baseline lifecycle (§6.4), never touches vscode.diff,
and is exercised by live F7 baseline-reset tests. Where the P3 capture draft and
the approved spec conflict, the spec wins (documentation-leads-automation).

194 unit + 49 E2E green; typecheck + build clean. No F7/F10 behavior change.

Closes #34

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ben Stull
2026-06-12 02:10:14 -07:00
parent fd263ec674
commit 3520397e41
6 changed files with 64 additions and 199 deletions
+8 -7
View File
@@ -50,13 +50,14 @@ export function activate(context: vscode.ExtensionContext): CowritingApi | undef
}),
);
// --- F6: diff-view toggle (Features #17 + #19) — workspace-INDEPENDENT ---
// F6 works on ANY diffable doc (file or untitled), so it is constructed
// regardless of whether a folder is open, and its commands are always live
// (never stubbed). Baseline lives in VS Code's per-extension GLOBAL storage
// (always present), never the repo (INV-19). The machine-landing advance is
// wired in the with-root branch below (landings only occur on workspace files
// through the seam). The controller self-wires baseline capture on open.
// --- F6: baseline data layer (Features #17 + #19) — workspace-INDEPENDENT ---
// The two-pane vscode.diff VIEW was removed in #34 (F10's rendered preview is
// the single review surface); only the baseline store survives, consumed by
// F7/F10. It tracks a baseline for ANY diffable doc (file or untitled), so it
// is constructed regardless of whether a folder is open. Baseline lives in VS
// Code's per-extension GLOBAL storage (always present), never the repo
// (INV-19). The machine-landing advance is wired below. The controller
// self-wires baseline capture on open.
const baselineStorageDir = context.globalStorageUri?.fsPath;
const baselineStore = baselineStorageDir ? new BaselineStore(baselineStorageDir) : null;
const diffViewController = new DiffViewController(baselineStore);