F10: interactive track-changes review in the markdown preview (#29) #30

Merged
benstull merged 17 commits from f10-interactive-review into main 2026-06-12 07:39:51 +00:00
Owner

Summary

F10 (#29) — interactive track-changes review in the markdown preview. Resolves the surface-collision friction (F6 raw diff + F3 attribution + F4 threads colliding on the same text) into one model: write left, review right.

  • Clean editor (INV-32): strip F3 attribution decorations + F4 in-editor proposal threads; hide F6 two-pane diff (ctrl+alt+d) and retire the attribution toggle. F3 spansFor, F4 accept/reject logic, and the F6 baseline stay as data layers.
  • One combined pure render (INV-33): new vscode-free renderReview(baseline, current, authorSpans, proposals) overlays the F7 baseline diff (added/changed prose author-colored via the salvaged F9 colorByAuthor sentinels; deletions struck) with pending F4 proposals as blue cw-proposal blocks carrying ✓/✗. Plus renderPlain for the off-state.
  • Interactive (INV-34): the preview collapses F9's two modes into one annotations on/off toggle; ✓/✗ post intent to the host, which routes through the existing F4 acceptById/rejectById seam — the webview never mutates the document. Status-bar indicator surfaces pending proposals when no preview is open (PUC-6).
  • Supersedes F9 INV-26 (authorship now combined with the diff; renderAuthorship + segmented control removed) and drops F6's any-file reach as a user goal (markdown-only).

Spec: specs/coauthoring-interactive-review.md (§7.2 slices SLICE-1..4). Plan: docs/superpowers/plans/2026-06-11-f10-interactive-review.md.

Known v1 deferral: resolved proposals render as trailing cw-proposal blocks rather than inline-at-anchor (spec §2/§6.2) — deterministic, never-dropped (INV-34); inline placement is a candidate follow-up.

Test Plan

  • npm test — 189 unit (vitest, vscode-free): renderReview/renderPlain/colorByAuthor incl. duplicate-block coloring + determinism.
  • npm run test:e2e — 46 + 5 host E2E green: open / annotations toggle / propose→accept→reject / clean-editor (INV-32) / hidden-F6 / status-bar (PUC-6).
  • npm run build — clean typecheck + webview bundle.
  • Manual webview smoke per docs/MANUAL-SMOKE-F10.md (visual + real ✓/✗ clicks — sealed sandbox, not E2E-asserted).

🤖 Generated with Claude Code

## Summary F10 (#29) — **interactive track-changes review in the markdown preview**. Resolves the surface-collision friction (F6 raw diff + F3 attribution + F4 threads colliding on the same text) into one model: **write left, review right**. - **Clean editor (INV-32):** strip F3 attribution decorations + F4 in-editor proposal threads; hide F6 two-pane diff (`ctrl+alt+d`) and retire the attribution toggle. F3 `spansFor`, F4 accept/reject logic, and the F6 baseline stay as **data layers**. - **One combined pure render (INV-33):** new vscode-free `renderReview(baseline, current, authorSpans, proposals)` overlays the F7 baseline diff (added/changed prose author-colored via the salvaged F9 `colorByAuthor` sentinels; deletions struck) **with** pending F4 proposals as blue `cw-proposal` blocks carrying ✓/✗. Plus `renderPlain` for the off-state. - **Interactive (INV-34):** the preview collapses F9's two modes into one **annotations on/off** toggle; ✓/✗ post intent to the host, which routes through the existing F4 `acceptById`/`rejectById` seam — the webview never mutates the document. Status-bar indicator surfaces pending proposals when no preview is open (PUC-6). - **Supersedes** F9 INV-26 (authorship now combined with the diff; `renderAuthorship` + segmented control removed) and drops F6's any-file reach as a user goal (markdown-only). Spec: `specs/coauthoring-interactive-review.md` (§7.2 slices SLICE-1..4). Plan: `docs/superpowers/plans/2026-06-11-f10-interactive-review.md`. **Known v1 deferral:** resolved proposals render as trailing `cw-proposal` blocks rather than inline-at-anchor (spec §2/§6.2) — deterministic, never-dropped (INV-34); inline placement is a candidate follow-up. ## Test Plan - [x] `npm test` — 189 unit (vitest, vscode-free): `renderReview`/`renderPlain`/`colorByAuthor` incl. duplicate-block coloring + determinism. - [x] `npm run test:e2e` — 46 + 5 host E2E green: open / annotations toggle / propose→accept→reject / clean-editor (INV-32) / hidden-F6 / status-bar (PUC-6). - [x] `npm run build` — clean typecheck + webview bundle. - [ ] Manual webview smoke per `docs/MANUAL-SMOKE-F10.md` (visual + real ✓/✗ clicks — sealed sandbox, not E2E-asserted). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
benstull added 17 commits 2026-06-12 07:39:33 +00:00
Plan for #29 (F10) from specs/coauthoring-interactive-review.md — clean editor +
preview as the single interactive review surface (annotations on/off; ✓/✗ on
pending F4 proposals). 4 slices, 14 tasks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Includes the PUC-6 status-bar indicator (updateStatus + show/dispose hooks)
since the constructor subscription references it (one file, no intermediate
broken build).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code-quality polish: the webview panel title read 'Track changes: <name>' but
F10 makes the preview the single review surface. Match the 'Open Review Preview'
command rename.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds test/e2e/suite/f10Review.test.ts covering the F10 flow: open preview
(mode "on", fresh baseline all-unchanged), type → cw-by-human span, propose →
cw-proposal block with ✓/✗, accept → lands + baseline advances + block clears,
reject → vanishes + doc untouched, toggle off → renderPlain has no cw- marks,
status-bar PUC-6 (indicator with no panel, hidden once opened), and the
clean-editor INV-32 facts (retired toggleAttribution, F6 ctrl+alt+d hidden).

Rewrites the obsolete F9 authorship-mode test as an F10 review test
(cw-by-claude in the on-state render; getMode defaults to "on"). Updates
attribution.test.ts (drops the retired isVisible/toggleAttribution toggle,
asserts the toggle is gone) and noWorkspace.test.ts (toggleAttribution +
acceptProposal/rejectProposal are retired, preview-only — INV-32).

Honesty fix in the status-bar seam: hideStatus() clears statusItem.text so
statusText() reports undefined when the indicator is hidden (it previously
returned its stale last value after a panel opened).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds docs/MANUAL-SMOKE-F10.md (clean editor → edit → propose → ✓/✗ →
Annotations toggle → status-bar PUC-6 → theming → cleanliness) following the
F7/F9 smoke format. Adds the F10 "write left / review right" section to the
README feature list and notes F6's two-pane diff and F9's authorship view are
retained only as data layers, not separate user surfaces.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
benstull merged commit 4160890956 into main 2026-06-12 07:39:51 +00:00
Sign in to join this conversation.