Skip to content

fix: include comment trees with pending replies in review filter - #10329

Open
kindaokay wants to merge 1 commit into
halo-dev:mainfrom
kindaokay:fix/comment-list-pending-filter
Open

kindaokay wants to merge 1 commit into
halo-dev:mainfrom
kindaokay:fix/comment-list-pending-filter

Conversation

@kindaokay

Copy link
Copy Markdown

Add status.pendingReplyCount maintained by ReplyEventReconciler and query it in CommentQuery when filtering by approval state, so the console comment list no longer hides pending replies under approved root comments.

What type of PR is this?

  • Feature
  • Bug fix
  • Improvement
  • Cleanup
  • Documentation

What this PR does / why we need it:

后台评论管理按"待审核"筛选时,只有根评论(Comment)参与过滤,挂在已审核根评论下的待审核回复(Reply)永远不可见(#10236)。

本 PR 在 Comment.status 新增 pendingReplyCount,由现有的 ReplyEventReconciler 与 visibleReplyCount 同批维护,并注册索引。CommentQuery 新增 approved 查询参数,approved=false 时按 spec.approved=false OR status.pendingReplyCount>0 过滤,使包含待审核回复的整棵评论树都能被筛出。控制台在筛选生效时自动展开命中树,并在"N 条待审核回复"处展示计数入口。

存量数据:reconciler 启动时对 pendingReplyCount IS NULL 且有回复的评论入队回填,一次性的,稳态启动开销为空查询。新增 CommentQueryTest 覆盖三种筛选语义。

Which issue(s) this PR fixes:

Fixes #<10236>

Special notes for your reviewer:

涉及 LLM 辅助开发(本 PR 代码已经过逐文件人工审查并在本地按 issue 复现步骤验证)。api-docs 与 ui/packages/api-client 变更为 generateOpenApiDocs + api-client:gen 重新生成的产物。

Does this PR introduce a user-facing change?

评论管理列表按“待审核”筛选时,包含待审核回复的评论树不再被遗漏

Add status.pendingReplyCount maintained by ReplyEventReconciler and
query it in CommentQuery when filtering by approval state, so the
console comment list no longer hides pending replies under approved
root comments.
@CLAassistant

CLAassistant commented Sep 19, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@sonarqubecloud

Copy link
Copy Markdown

@kindaokay

Copy link
Copy Markdown
Author
ec16b92ab7020c8eb9cf4cb12b4e4c4a 效果如上

This branch has not been deployed

No deployments
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.

2 participants