fix deletion of failed document uploads - #3366
Merged
nicoloboschi merged 2 commits intoAug 11, 2026
Merged
Conversation
deleteFailedUpload only had try/finally, but fetchApi both toasts and rethrows, and the handler is invoked from onClick without being awaited — a failed delete left an unhandled promise rejection. Match the sibling handlers in bank-operations-view, which catch and rely on the API client interceptor for the user-facing error.
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.
Problem
Failed file conversions appear in the Documents table without a document row, so the normal document deletion path cannot remove them. They remain visible until operation retention expires.
Fixes #3328.
Fix
Keep the backing operation ID on pending upload rows and expose the existing terminal-operation delete action for failed conversions. After deletion, refresh the pending upload list so the row disappears immediately.
Test
npm test --workspace @vectorize-io/hindsight-control-plane -- --run(123 passed)npx prettier --check hindsight-control-plane/src/components/documents-view.tsxRisk
Low. The action is shown only for failed file-conversion operations and reuses the same delete-operation API already used by the Operations view. Processing uploads and successful document rows are unchanged.