FE-665: Show word-level diff on staged edits in side-chat#107
FE-665: Show word-level diff on staged edits in side-chat#107kostandinang wants to merge 2 commits into
Conversation
PR SummaryLow Risk Overview Updates the side-chat staged changes list to optionally render an expandable Includes new unit/RTL tests covering the diff component and the staged-edit expander behavior, plus a new Ladle primitives story for visual review, and adds Reviewed by Cursor Bugbot for commit e2cbbab. Bugbot is set up for automated code reviews on this repo. Configure here. |
🤖 Augment PR SummarySummary: Adds word-level diff visualization for staged Changes:
Technical Notes: The diff UI renders nothing when there’s no effective change (identical inputs), and the expander is only shown for edit patches that include both strings and differ to avoid changing behavior for legacy staging paths. 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2b2358e. Configure here.
adcd9e0 to
02370e5
Compare
02370e5 to
958ea5b
Compare
Prevent the impact chip and discard button from drifting vertically when an edit diff is expanded so staged rows stay visually anchored to the summary line. Co-authored-by: Cursor <cursoragent@cursor.com>
958ea5b to
e2cbbab
Compare


What
Adds a
<ContentDiff>word-level diff primitive and wires it into the side-chat staged-edit row.Stacked on #105. First of two FE-665 slices — #108 wires the same primitive into
PatchListOverlay.Linear: FE-665.
Why
Today's staged-patch row shows only a summary like "Edit: rephrase wording" — users either trust the model or click Apply to find out what changed.
How
jsdiff. Renders nothing when inputs are equal or empty.<details>expander next to the summary. Non-edit rows / edits without diff data are unchanged.diff@^8.0.4.Follow-up (unblocked by this)
PatchListOverlayconsumer (lands in FE-665: Show per-patch diffs in the staged-changes overlay #108).Test plan