fix(core): should be able to unresolve a resolved comment (#13078)

#### PR Dependency Tree


* **PR #13078** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* The resolve comment button is now always visible to users with
permission to resolve comments, regardless of the comment's current
status.

* **Refactor**
* Adjusted internal comment resolution logic to streamline how missing
comments are handled between the provider and the editor.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Peng Xiao
2025-07-08 11:27:34 +08:00
committed by GitHub
parent 61da63a4a0
commit 810143be87
2 changed files with 1 additions and 7 deletions

View File

@@ -74,12 +74,6 @@ export class InlineCommentManager extends LifeCycleWatcher {
...new Set([...inlineComments, ...blockComments]), ...new Set([...inlineComments, ...blockComments]),
]; ];
// resolve comments that are in provider but not in editor
// which means the commented content may be deleted
difference(commentsInProvider, commentsInEditor).forEach(comment => {
provider.resolveComment(comment);
});
// remove comments that are in editor but not in provider // remove comments that are in editor but not in provider
// which means the comment may be removed or resolved in provider side // which means the comment may be removed or resolved in provider side
difference(commentsInEditor, commentsInProvider).forEach(comment => { difference(commentsInEditor, commentsInProvider).forEach(comment => {

View File

@@ -362,7 +362,7 @@ const CommentItem = ({
data-menu-open={menuOpen} data-menu-open={menuOpen}
data-editing={isEditing} data-editing={isEditing}
> >
{!comment.resolved && canResolveComment && ( {canResolveComment && (
<IconButton <IconButton
variant="solid" variant="solid"
onClick={handleResolve} onClick={handleResolve}