fix: aggregate knowledge base notifications to prevent toast storm#13284
Merged
DeJeune merged 1 commit intoCherryHQ:mainfrom Mar 7, 2026
Merged
fix: aggregate knowledge base notifications to prevent toast storm#13284DeJeune merged 1 commit intoCherryHQ:mainfrom
DeJeune merged 1 commit intoCherryHQ:mainfrom
Conversation
GeorgeDong32
reviewed
Mar 7, 2026
Collaborator
GeorgeDong32
left a comment
There was a problem hiding this comment.
代码审查
✅ 总体评价
这是一个高质量的 bug 修复,有效解决了批量添加知识库项目时的"通知风暴"问题。核心改动逻辑清晰,代码组织良好。
🟡 建议:通知标题优化
sendBatchNotification 方法中,通知标题统一使用 t('common.knowledge_base')("知识库"),建议根据处理结果动态设置更具辨识度的标题:
当前代码:
NotificationService.getInstance().send({
id: uuid(),
type,
title: t('common.knowledge_base'), // 统一使用"知识库"
message,
...
})建议改进:
const title = failed === 0
? t('notification.knowledge.batch_success_title') // "知识库处理成功"
: failed > 0 && succeeded > 0
? t('notification.knowledge.batch_mixed_title') // "知识库处理完成"
: t('notification.knowledge.batch_error_title') // "知识库处理失败"
NotificationService.getInstance().send({
id: uuid(),
type,
title,
message,
...
})这样用户可以通过通知标题快速识别处理结果,而不需要阅读详细内容。
结论:建议合并,上述为可选改进。
eeee0717
approved these changes
Mar 7, 2026
DeJeune
approved these changes
Mar 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #12989
CleanShot.2026-03-07.at.20.55.12.mp4
CleanShot.2026-03-07.at.20.51.49.mp4