Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35e9884ac6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ? this.webDocs()?.length > 0 | ||
| : this.sourceType()[0] === KDocumentSourceType.FileSystem ? !this.fileSystemForm()?.invalid : false | ||
| return this.sourceType()[0] === KDocumentSourceType.LocalFile | ||
| ? !!this.files()?.length && this.files().every((file) => file.status() === 'done' && !!file.document()) |
There was a problem hiding this comment.
Handle failed uploads before gating next step
This new gate requires every local file to reach done, which turns upload errors into a hard blocker: KnowledgeFileUploader sets status = 'error' on failure, and the local-file UI only shows a delete action once progress() >= 100 (otherwise it renders a non-removal progress button), so a failed upload can become non-removable while nextStepAvailable stays false forever. In that case users cannot proceed with successfully uploaded files and must restart the flow.
Useful? React with 👍 / 👎.
Motivation
filePath(nofileUrl).Description
nextStepAvailableinstep.component.tsto checkfile.status() === 'done'and thatfile.document()exists.fileUrlorfilePathis present by changing the loader condition inpreview.component.tstorequest.fileUrl || request.filePath.KnowledgeFileUploader(knowledgebase.service.ts) by fillingfileUrlfromevent.body.fileUrl ?? event.body.urland settinguploadedUrlaccordingly to cover different backend response shapes.Testing
yarn nx run cloud:lint; the run failed due to an existing repository-level lint/runtime configuration issue (ENOENT: no such file or directory, open '/workspace/xpert/apps/cloud/src/*') that is unrelated to these changes. No unit/integration tests were added for this UI/data-flow change in this PR.Codex Task