Skip to content

feat: render outdated comments inline when lines leave diff hunks#325

Merged
tomasz-tomczyk merged 4 commits intomainfrom
feat/outdated-diff-comments
Apr 21, 2026
Merged

feat: render outdated comments inline when lines leave diff hunks#325
tomasz-tomczyk merged 4 commits intomainfrom
feat/outdated-diff-comments

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • When a comment's line disappears from diff hunks (e.g., agent undoes a change), the comment was invisible inline — only visible in All Comments panel
  • Added appendOutdatedDiffComments() that detects unrendered comments after hunk rendering and shows them at the bottom of the diff section with "Outdated" badge
  • Uses existing outdated-badge CSS (same as orphaned files from feat: surface orphaned comments on removed files #279)
  • Full CRUD: edit, delete, resolve all work on outdated comments

Review

  • Code review: passed (CSS gap and test convention deviation fixed)
  • TDD verified: 3/5 tests fail without fix, 5/5 pass with fix

Test plan

🤖 Generated with Claude Code

tomasz-tomczyk and others added 2 commits April 21, 2026 15:34
When a reviewer comments on a diff line and the agent undoes that change,
the file stays in the diff but the commented lines disappear from hunks.
The comment existed in file.comments but had no inline anchor — invisible
except in the All Comments panel.

- Add appendOutdatedDiffComments() that detects unrendered comments after
  hunk rendering and shows them at the bottom of the diff section
- Uses existing outdated-comment/outdated-badge CSS classes (same as
  orphaned file comments from PR #279)
- Called from both renderDiffUnified and renderDiffSplit
- Full CRUD support: edit, delete, resolve all work on outdated comments

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… round-complete

- Add border-top and padding for .outdated-diff-comments section to
  visually separate it from diff hunks
- Remove unnecessary round-complete call in E2E test beforeEach (follows
  project convention — only clearAllComments needed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tomasz-tomczyk and others added 2 commits April 21, 2026 15:52
- Replace inline request.post calls with addComment from ./helpers (5 occurrences)
- Add expect(keys.size).toBeGreaterThan(0) guard in findNonHunkLine to
  prevent vacuous passes if diff API response shape doesn't match

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restore threading.spec.ts and activeReplyForms code that were
accidentally included from the fix/reply-form-font-size branch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 3f653ed into main Apr 21, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the feat/outdated-diff-comments branch April 21, 2026 15:05
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