Closes the F11 feature: makes the toolbar surface reachable end to end and
guards the edit controls. Per spec §6.4/§6.5/§7.2 SLICE-5.
- package.json: cowriting.showTrackChangesPreview added to editor/title
(when: editorLangId == markdown) — the minimal right-click → Open Review
Preview gateway (#41/#42 expand it later).
- trackChangesPreview: the gateway command accepts the tab's resource Uri
(palette/keybinding still fall back to the active editor); refresh() sends an
`authorable` flag on both render messages; `editControlsEnabled` test seam.
- webview: disable Pin + Ask-Claude on a non-authorable doc (Annotations stays
active — reading is always allowed); RenderMessage.authorable.
- host E2E: the editor/title gateway opens the preview + is markdown-guarded;
edit controls disabled on a non-authorable (read-only-scheme) markdown doc.
- docs: docs/MANUAL-SMOKE-F11.md (live smoke, 10 steps) + README F11 section +
intro line.
205 unit + 53 host E2E green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A whole-document Ask-Claude rewrite is diffed into hunks and surfaced as N
independent F4 proposals (one per changed hunk) — reusing the F4 single-range
model N times, no new model. Per spec §6.4/§7.2 SLICE-3.
- trackChangesModel: pure `diffToHunks(currentText, rewrittenText)` →
EditHunk[] (vscode-free, deterministic; diffWordsWithSpace, coalescing
adjacent add/remove runs; offsets index currentText).
- trackChangesPreview: `runEditAndPropose(document, target, instruction)` — the
shared host routine (selection → one single-range propose; document → diff →
one propose per hunk; never mutates the doc, INV-10); `askClaude` UI wrapper
(host showInputBox keeps LLM/secrets out of the sealed webview, INV-8/35);
injectable `editTurn` + `setEditTurnForTest` seam (no LLM in CI); the
`askClaude` inbound message branch; `cowriting.editDocument` command for #42
reuse.
- package.json: register cowriting.editDocument, palette-guarded on markdown.
- webview: ✦ Ask Claude to Edit Document button → { askClaude, scope:"document" }.
- unit: diffToHunks fixtures (zero/one/multi-hunk, wholesale, determinism).
- host E2E: stubbed multi-hunk rewrite → N matching proposals, doc untouched;
editDocument command registered + markdown-guarded.
205 unit + 49 host E2E green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Homes the orphaned cowriting.pinDiffBaseline command and gives the writer a
reachable Pin control in the preview toolbar. Per spec §7.2 SLICE-1
(docs/superpowers/specs/2026-06-12-f11-preview-toolbar-interaction-surface.md).
- trackChangesPreview: extract onDidReceiveMessage into handleWebviewMessage;
add the F11 `pinBaseline` intent → DiffViewController.pin(previewedDoc) (the
bound doc, not activeTextEditor — §6.7); ToolbarMsg union; receiveMessage test
seam exercising the real message→seam wiring (INV-35).
- webview: ⌖ Pin baseline button in #cw-header posting { type: "pinBaseline" };
theme-aware toolbar-button CSS (light/dark/high-contrast, disabled state).
- package.json: unhide pinDiffBaseline — commandPalette `when` false →
editorLangId == markdown (resolves the #34 orphan from the command side).
- host E2E (test/e2e/suite/f11Toolbar.test.ts): pinBaseline message clears the
change-marks + advances the baseline to `pinned`; palette `when` is reachable.
Also archives the F11 implementation plan to docs/superpowers/plans/.
197 unit + 47 host E2E green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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>
Code-quality follow-up: with editor decorations gone (Task 1), the visibility
toggle was dead/misleading — nothing reads `visible`. Remove the field,
toggle()/isVisible(), the cowriting.toggleAttribution registration, and its
package.json command + palette declarations (spec §6.2 retires it). renderActive/
render stay — they refresh the orphan status bar on editor switch.
E2E toggle assertions (attribution.test.ts, noWorkspace.test.ts) are updated in SLICE-4.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Spec §6.4: construct GlobalSidecarStore + SidecarRouter (CoauthorStore when root);
remove the no-root early-return + command stubs so F2/F3/F4 are real folder-less;
renderIfOpen gated by isAuthorable; editor-context menus widened to untitled;
export sidecarRouter on CowritingApi. activate now always returns the API.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
F6 §5/§6.4. Palette-visible commands; ctrl+alt+d (when editorTextFocus),
unbound in stock VS Code, user-remappable.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- extension.ts: with no folder open, every contributed coauthoring command now
registers a warning stub ('open a folder first') instead of being absent —
the palette no longer errors 'command not found'. Opening a folder reloads
the window and re-activates with a real root.
- .vscode/launch.json: the EDH now opens the repo as its workspace, so plain
F5 lands in a working state.
- package.json: editor/context menu entries for 'Ask Claude to Edit
Selection' and 'Add Coauthoring Thread on Selection', shown only when text
is highlighted in a file-scheme editor (editorHasSelection).
- E2E: second no-workspace pass (suite-no-workspace) pins the #8 regression.
Fixes#8. Fixes#9.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drives the extension's returned ThreadController API + asserts the on-disk
sidecar and rendered Comments state (spec §6.8 fallback). All 4 host tests
green against VS Code 1.124.0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Manifest declares the cowriting.showClineSdkInfo command; esbuild + vitest +
tsc tooling. @cline/sdk@0.0.46 as a runtime dependency. Per issue #2 (epic #1).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>