Skip to content

feat: preview ChangeSets inline - #20

Merged
yuyukosama2004 merged 1 commit into
mainfrom
codex/r3-inline-changeset-preview
Jul 20, 2026
Merged

yuyukosama2004 merged 1 commit into
mainfrom
codex/r3-inline-changeset-preview

Conversation

@yuyukosama2004

Copy link
Copy Markdown
Owner

What changed

  • add a Tiptap/ProseMirror decoration extension for pending ChangeSet operations
  • mark replace/delete targets in the live editor without changing document JSON
  • render insert/replace proposals as non-editable inline widgets at stable node anchors
  • keep widgets ordered semantically at shared block boundaries
  • synchronize the active review batch from the ChangeSet panel into the editor
  • clear resolved or hidden previews immediately
  • add focused extension and panel synchronization tests

Why

R3 requires authors to see AI edits in their actual manuscript context before deciding. The review panel from #18 supplied decisions and side-by-side previews, but did not show where each proposal lands in the document.

Safety

The preview is a pure ProseMirror Decoration layer. It is excluded from editor JSON, history, autosave, versions, and canonical content. Proposal text is inserted with textContent, not HTML.

Validation

  • npm run format
  • npm run lint
  • npm test -- --run — 69 passed
  • npm run build
  • focused preview/order tests after final adjustment — passed
  • isolated browser E2E with all four operation types
  • accepted one replacement: draft revision advanced, editor reloaded, resolved decoration disappeared, remaining pending decorations stayed visible
  • browser console: no runtime errors

@yuyukosama2004
yuyukosama2004 marked this pull request as ready for review July 20, 2026 09:40
@yuyukosama2004
yuyukosama2004 merged commit 2b275d4 into main Jul 20, 2026
2 checks passed
@yuyukosama2004
yuyukosama2004 deleted the codex/r3-inline-changeset-preview branch July 20, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant