From 810143be87946606e6a05e6afec3d1fd12576ab9 Mon Sep 17 00:00:00 2001 From: Peng Xiao Date: Tue, 8 Jul 2025 11:27:34 +0800 Subject: [PATCH] fix(core): should be able to unresolve a resolved comment (#13078) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### PR Dependency Tree * **PR #13078** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) ## 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. --- .../affine/inlines/comment/src/inline-comment-manager.ts | 6 ------ .../frontend/core/src/components/comment/sidebar/index.tsx | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/blocksuite/affine/inlines/comment/src/inline-comment-manager.ts b/blocksuite/affine/inlines/comment/src/inline-comment-manager.ts index 6568b42fa8..48ae4b1ffd 100644 --- a/blocksuite/affine/inlines/comment/src/inline-comment-manager.ts +++ b/blocksuite/affine/inlines/comment/src/inline-comment-manager.ts @@ -74,12 +74,6 @@ export class InlineCommentManager extends LifeCycleWatcher { ...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 // which means the comment may be removed or resolved in provider side difference(commentsInEditor, commentsInProvider).forEach(comment => { diff --git a/packages/frontend/core/src/components/comment/sidebar/index.tsx b/packages/frontend/core/src/components/comment/sidebar/index.tsx index 5d4f79d622..b14ed84e6b 100644 --- a/packages/frontend/core/src/components/comment/sidebar/index.tsx +++ b/packages/frontend/core/src/components/comment/sidebar/index.tsx @@ -362,7 +362,7 @@ const CommentItem = ({ data-menu-open={menuOpen} data-editing={isEditing} > - {!comment.resolved && canResolveComment && ( + {canResolveComment && (