Skip to content

fix(diff): close deleted comments#675

Merged
matt2e merged 2 commits intomainfrom
deleting-comments-should-close-comment
May 1, 2026
Merged

fix(diff): close deleted comments#675
matt2e merged 2 commits intomainfrom
deleting-comments-should-close-comment

Conversation

@matt2e
Copy link
Copy Markdown
Contributor

@matt2e matt2e commented May 1, 2026

Summary:

  • Close comment navigation and editor state when deleted comments disappear.
  • Resolve tracked line and range comments from the latest comments prop and cover deleted-comment behavior with tests.

matt2e added 2 commits May 1, 2026 16:17
…ent tests

- Extract clearRangeSelection() helper in DiffViewer.svelte to replace
  manual nulling of commentingOnRange, commentEditorStyle, and
  editingRangeCommentId. This mirrors clearLineSelection() and ensures
  future state additions aren't missed.
- Use clearRangeSelection() in the diff-change reset effect, the
  missing-comment effect, handleCommentCancel, post-add cleanup, and
  the Escape key handler.
- Use clearLineSelection() in the diff-change reset effect instead of
  duplicating its logic inline.
- Add test cases for the editingCommentId fallback path in
  resolveTrackedComment (range-comment scenario where activeComment is
  null but editingCommentId is set).
@matt2e matt2e requested review from baxen and wesbillman as code owners May 1, 2026 06:34
@matt2e matt2e merged commit 485ddd6 into main May 1, 2026
6 checks passed
@matt2e matt2e deleted the deleting-comments-should-close-comment branch May 1, 2026 06:41
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