fix(kb): distinguish loading errors from empty states - #9578
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new error-with-retry UIs in KBList, KBDetail, and DocumentDetail share very similar structure; consider extracting a small reusable component (icon + message + retry button) so the layout and behavior stay consistent and easier to adjust later.
- In DocumentDetail.vue,
loadErrorandchunksLoadErrorare used alongside snackbars; if the intent is for inline error UI to be the primary feedback, you might want to reduce or conditionally suppress duplicate snackbar messages to avoid noisy, redundant error reporting.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new error-with-retry UIs in KBList, KBDetail, and DocumentDetail share very similar structure; consider extracting a small reusable component (icon + message + retry button) so the layout and behavior stay consistent and easier to adjust later.
- In DocumentDetail.vue, `loadError` and `chunksLoadError` are used alongside snackbars; if the intent is for inline error UI to be the primary feedback, you might want to reduce or conditionally suppress duplicate snackbar messages to avoid noisy, redundant error reporting.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Failed knowledge base requests currently fall through to empty or zero-value content, which makes service failures look like missing data.
Modifications / 改动点
Screenshots or Test Results / 运行截图或测试结果
Verification steps:
cd dashboard && pnpm typecheckcd dashboard && node --test tests/*.test.mjs(36 passed)uv run ruff format .(499 files unchanged)uv run ruff check .(passed)The change reuses the existing AstrBot empty-state, alert, and tonal button styles. No global layout or theme styles were changed.
Knowledge base loading failure with retry action:
Checklist / 检查清单
Summary by Sourcery
Improve error handling and user feedback for knowledge base list, detail, and document chunk views.
Bug Fixes:
Enhancements:
Summary by Sourcery
Improve error handling and user feedback for knowledge base list, detail, and document views when backend requests fail.
Bug Fixes:
Enhancements: