Skip to content

feat(tiptap): SuggestionReviewPopover — step-through diff review - #255

Merged
suleimansh merged 3 commits into
mainfrom
feat/suggestion-review-popover
Jun 19, 2026
Merged

feat(tiptap): SuggestionReviewPopover — step-through diff review#255
suleimansh merged 3 commits into
mainfrom
feat/suggestion-review-popover

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Summary

Test plan

  • Open a post with a RichText content field in the pro playground
  • Trigger an AI fix (field chat or sidebar chat) that produces multiple replace ops
  • Popover appears centered above the first changed word with "old → new" preview and ‹ 1/3 › ✕ ✓ controls
  • / navigate between changes; rejects / accepts and advances
  • Works in both aiDiffView('inline') and aiDiffView('lines') modes
  • No per-field accordion banner under the editor

Replaces scattered per-region DiffRegionControls overlays with a single
floating popover that steps through pending inline-diff suggestions one
at a time. Compact action row (step counter + icon ✕/✓ buttons with
prev/next navigation), centered over the changed word, works in both
inline and lines diff modes.

- New SuggestionReviewPopover: virtual-element anchor (prefers deleted
  element, falls back to coordsAtPos so lines mode always positions
  correctly), extractChangedPair shows "tst → test" not the full paragraph,
  textBetween(..., ' ', ' ') avoids hard-break concatenation
- WORD_DIFF_MIN_SIMILARITY lowered to 0 so all word pairs get intra-line
  highlights regardless of similarity score
- SuggestionBanner redesigned: inline "x → y" accordion rows, resolved
  count tracking; no longer rendered inside TiptapEditor (dropped in
  favour of the popover + future global banner #254)
- Closes #249; filed #253 (popover for all field types) and #254
  (global banner)
@suleimansh suleimansh added enhancement New feature or request area:ai @rudderjs/ai package labels Jun 19, 2026
Comment thread packages/tiptap/src/react/TiptapEditor.tsx Fixed
@suleimansh
suleimansh merged commit 18b9794 into main Jun 19, 2026
2 checks passed
@suleimansh
suleimansh deleted the feat/suggestion-review-popover branch June 19, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai @rudderjs/ai package enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant