fix(knowledge): show failure status on folders whose subtree contains failed files (IKC813) - #2402
Open
yaojin3616 wants to merge 1 commit into
Open
fix(knowledge): show failure status on folders whose subtree contains failed files (IKC813)#2402yaojin3616 wants to merge 1 commit into
yaojin3616 wants to merge 1 commit into
Conversation
… failed files Gitee IKC813: in a multi-level knowledge file tree, when a subfolder contained a failed file, every ancestor folder looked clean because both list renderers ignored the backend-computed `has_failed_files` for folder rows. - FileListRow StatusBadge now renders the error pill when a folder has hasFailedFiles (covers the desktop list view). - FileCard renderStatusOverlayTag no longer unconditionally excludes folders: a folder with hasFailedFiles shows the same error pill in the card view and the H5 list row. - Regression tests pin the folder rollup behavior for both renderers.
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.
Summary
has_failed_filesfor every folder level (recursive path-prefix rollup inknowledge_space_service._handle_file_folder_extra_info), but the two file-list renderers in the client app never displayed it for folder rows:FileListRow.tsxStatusBadgeonly keyed offfile.status(folders have no status) → returned null.FileCard.tsxrenderStatusOverlayTaghard-excluded folders (if (!isAdmin || isFolder) return null).Changes
src/frontend/client/src/pages/knowledge/SpaceDetail/FileListRow.tsx: folder withhasFailedFiles === truenow renders the error tone status pill (失败).src/frontend/client/src/pages/knowledge/SpaceDetail/FileCard.tsx: folder branch added torenderStatusOverlayTag— error pill shows on the card overlay and the H5 list row; admin-gated to match the existing file behavior.FileListRow.folderStatus.test.tsxpins the rollup display for both renderers (folder with failures / clean folder / success file).Verification
eslintclean on all touched files.tsc-strictpasses for touched files (6 pre-existing errors remain in unrelatedLinsight/Executionfiles, present onmain).canvas.nodenative module in this environment (pre-existing, affects all client jest suites) — tests will be exercised by CI.