Inline editable proposed-change diff in the Markdown editor + Accept/Reject controls in both surfaces #64

Closed
opened 2026-06-26 12:45:05 +00:00 by benstull · 0 comments
Owner

Summary

When Claude proposes an edit, also show the proposed change inline in the Markdown editor (not only in the review webview): human-editable, with a track-changes diff that matches the webview and the post-accept result exactly.

Replace the per-proposal / glyph buttons with labelled Accept / Reject controls, each with a dropdown () for Accept all / Reject all. All four actions must be reachable from both the Markdown editor and the review webview.

Decided forks (brainstorming session 0058)

  • Editor model = optimistic apply + decorations. On propose, the editor buffer becomes the would-be-accepted text (insertions are real, editable, tinted; deletions shown as struck-red non-editable hints). Accept = finalize-in-place; Reject = revert. Reverses INV-32 (clean editor) and INV-10 (propose never touches the buffer).
  • Timing = on proposal (turn complete), not live token-stream into the editor (that stays in #60's notification/OutputChannel).
  • Editor affordance = CodeLens Accept ▾ / Reject ▾ above each block; opens a QuickPick (this proposal / all proposals). Webview keeps HTML buttons with the same dropdown.
  • New EditorProposalController; ProposalController gains finalize-in-place / revert-in-place / reject-all; single shared pure diff feeds both surfaces.

Acceptance

  • Proposing shows the decorated, editable diff in the editor; editing the inserted text then accepting keeps the edits; rejecting reverts the block.
  • Accept / Reject / Accept-all / Reject-all all work from both editor and webview; editor and webview show the same diff for the same proposal.
  • Saving while a proposal is pending persists the proposed (accepted-result) text.

Spec: specs/coauthoring-inline-editor-diff.md (brainstorming session 0058).

## Summary When Claude proposes an edit, also show the proposed change **inline in the Markdown editor** (not only in the review webview): human-editable, with a track-changes diff that matches the webview and the post-accept result exactly. Replace the per-proposal `✓`/`✗` glyph buttons with labelled **Accept** / **Reject** controls, each with a dropdown (`▾`) for **Accept all** / **Reject all**. All four actions must be reachable from **both** the Markdown editor and the review webview. ## Decided forks (brainstorming session 0058) - **Editor model = optimistic apply + decorations.** On propose, the editor buffer becomes the would-be-accepted text (insertions are real, editable, tinted; deletions shown as struck-red non-editable hints). Accept = finalize-in-place; Reject = revert. Reverses INV-32 (clean editor) and INV-10 (propose never touches the buffer). - **Timing = on proposal** (turn complete), not live token-stream into the editor (that stays in #60's notification/OutputChannel). - **Editor affordance = CodeLens `Accept ▾ / Reject ▾`** above each block; `▾` opens a QuickPick (this proposal / all proposals). Webview keeps HTML buttons with the same dropdown. - New `EditorProposalController`; `ProposalController` gains finalize-in-place / revert-in-place / reject-all; single shared pure diff feeds both surfaces. ## Acceptance - Proposing shows the decorated, editable diff in the editor; editing the inserted text then accepting keeps the edits; rejecting reverts the block. - Accept / Reject / Accept-all / Reject-all all work from **both** editor and webview; editor and webview show the same diff for the same proposal. - Saving while a proposal is pending persists the proposed (accepted-result) text. Spec: `specs/coauthoring-inline-editor-diff.md` (brainstorming session 0058).
benstull added the priority/P2type/feature labels 2026-06-26 12:45:16 +00:00
Sign in to join this conversation.