F12: inline editable proposed-change diff in the Markdown editor + Accept/Reject control parity (#64) #66
Reference in New Issue
Block a user
Delete Branch "s58-inline-editor-diff"
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?
Summary
F12 (#64): show Claude's proposed change inline in the Markdown editor — optimistically applied (editable, tinted insertions + struck-red non-editable deletion hints) — with
Accept ▾/Reject ▾(and Accept-all / Reject-all) reachable from both the editor (CodeLens + QuickPick) and the review webview. Reverses INV-10 (propose no longer leaves the buffer untouched) and INV-32 (editor no longer unconditionally clean).Spec:
coauthoring-inline-editor-diff.mdv0.1.1 (graduated, session 0058). Built in session 0059.What changed (INV-48…54)
landBaseline:falseopt (no baseline advance → stays pending); storesProposal.original+ re-fingerprints the anchor to the applied text (soresolve()keeps finding it). Reload-safe:originalcaptured once.decorationPlanfeeds the editor; the webview HTML uses the samewordEditHunksdiff.renderReviewdiffs againstlandedTextOf(current minus pending) so a proposed change renders once (as a proposal), not also as a landed diff; author spans + toolbar summary reconciled too.original.aftercontent; insertion tints over real buffer text.cowriting.rejectAllProposals.New
EditorProposalControllerowns the editor surface;ProposalControllergains optimistic-apply / finalize / revert / rejectAll.Tests
--user-data-dirto a short/tmppath so the host-E2E harness launches from a worktree (macOS socket-length fix).Review
A final adversarial review caught one CRITICAL (revert target clobbered on save+reload) — fixed with a reload-safe guard + regression E2E — and a minor toolbar double-count — fixed via the reconciled
landedTextOfsummary.Manual smoke (interactive F5) pending operator verification.
Fixes #64
🤖 Generated with Claude Code