Native surfaces migration — evolve the extension onto VS Code's native review surfaces (9-task plan, spec v0.2.1) #72
Reference in New Issue
Block a user
Delete Branch "session-0065"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Executes the approved migration plan
plans/2026-07-01-native-surfaces-migration.md(from graduated Solution Designcoauthoring-native-surfaces.mdv0.2.1, session 0064) end to end — session 0065, executing-plans.What ships
✦ Coedit this Document with Claude/Stop editing with Claude; persisted set;cowriting.isCoediting/baselineModecontext keys.GitBaselineAdapteron the built-in Git extension; INV-18 machine-landing advance retired (approved);pinDiffBaseline→markReviewed(snapshot-only, D14).cowriting-baseline:content provider + SourceControl QuickDiff (gutter bars),Review Changesnative diff,✦ Coediting · N changesstatus bar, purecountLineHunks.runEditAndPropose+ seams out of the webview controller ahead of its sunset.Ask Claudeopens a focused native comment; every human comment on a coedited doc runs a turn → machine reply (INV-8 onBehalfOf) →✦ Make this editoffer → pending proposals (INV-5); input webview deleted.cowriting.annotationstoggle, mermaid rendering viamarkdown.previewScripts(Q4 confirmed) including intra-diagram mermaid diff parity (INV-29) with body-matched fence queue.trackChangesPreview.ts+ client assets deleted; ⌘⌥R →Review Changes;Open Cowriting Review Previewwrapper; ✓ Keep / ✗ Reject (+ Keep all) lens copy (PUC-2); README rewritten to the native-surface map (DOC-2); coverage moved in the same commit.npm run smoke:native(real-SDK, operator-run).Verification
Follow-ups filed
Owed operator gestures (plan definition of done)
npm run smoke:native(rung 3, real SDK) — one green run reported to the session transcriptNo §9 web pipeline applies (VS Code extension — spec §7.2).
🤖 Generated with Claude Code
Task 2 of the native-surfaces migration plan. GitBaselineAdapter resolves a document's HEAD blob via the built-in vscode.git extension (hardened with a .git/logs/HEAD watch that nudges repo.status(), since the git extension's own watcher doesn't reliably notice out-of-band commits on non-workspace-folder repos in the E2E host). DiffViewController is reworked into a baseline router: head mode (git-tracked, never persisted, re-read on commit) vs snapshot mode (captured on CoeditingRegistry entry, re-pinned by "Mark Changes as Reviewed" — renamed from cowriting.pinDiffBaseline, D14). The shipped machine-landing baseline advance (#48/INV-18) is retired: a landed Claude edit now stays a visible change-since-baseline until commit or review (INV-7/D21). Legacy on-disk reasons ("opened"/"machine-landing") migrate to "entered" via BaselineStore.normalizeReason on load. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>Moves runEditAndPropose, the askClaude gate/prompt/progress wrapper, the EditTarget type, the editTurn/askEditInstruction/turnSeq state, and the cowriting.editDocument command registration out of TrackChangesPreviewController into a new EditFlow (src/editFlow.ts), reachable from the review webview (delegates) and, from Task 6 on, the thread controller. extension.ts now constructs EditFlow before the preview controller and routes acceptAllProposals/rejectAllProposals directly to ProposalController, dropping the preview-controller indirection. E2E suites that drove the old trackChangesPreviewController.{setEditTurnForTest,runEditAndPropose,askEditInstruction} seams now drive the same seams on editFlow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>Code review of 705de31's mermaid-diff wiring: buildMermaidQueue's overrides were consumed positionally per rendered mermaid fence, so a fence the queue didn't know about (a pending proposal's optimistic apply inserting a whole new mermaid block, or annotateSource's committed-deletion reinsert) shifted every later override by one and substituted the wrong diagram's augmented source instead of the documented verbatim fallback. Queue entries now carry {curBody, source} and are matched to fences by body (first unconsumed match, scanning forward) so a non-matching fence renders verbatim without consuming anything and a later matching fence still gets its augmentation. Also resets the per-render consumed state in the renderer.render wrapper, since VS Code can call md.parse()/renderer.render() separately and replay cached tokens without a fresh parse. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>