feat: implement bulk document management and fix upload pipeline#526
Open
riyapetle wants to merge 6 commits into
Open
feat: implement bulk document management and fix upload pipeline#526riyapetle wants to merge 6 commits into
riyapetle wants to merge 6 commits into
Conversation
param20h
previously approved these changes
Jun 7, 2026
Owner
|
CI checks chck them and update @riyapetle |
Author
|
Hey @param20h, I have fixed the TypeScript/linting errors and pushed the updates. Could you please approve the workflows to run the CI checks again? |
param20h
previously approved these changes
Jun 11, 2026
Owner
|
solveee |
…end tests for coverage
param20h
previously approved these changes
Jun 11, 2026
Owner
|
ci chcks failing |
param20h
approved these changes
Jun 11, 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.
🚀 Overview
This PR introduces a highly requested Bulk Document Management feature, including a new Recycle Bin (Trash) system for safe recovery of deleted files. It also resolves critical backend issues related to background task ingestion, dependency conflicts, and development hot-reloading that were causing document uploads to hang and crash.
✨ Features & Enhancements
Checkbox Selection: Added interactive checkboxes alongside documents in the DocumentSidebar, visible on hover.
Bulk Action Bar: Implemented a slide-up Bulk Actions Bar that dynamically appears when documents are selected, allowing for multi-select deletion.
New API Endpoints: Added /bulk-delete, /restore, and /permanent-delete POST endpoints to the FastAPI backend to handle arrays of document IDs securely.
Active vs Trash Views: Built a toggle tab in the sidebar allowing users to seamlessly switch between "Active" documents and the "Recycle Bin".
Safe Restoration: Added functionality to restore soft-deleted documents back to the Active view.
Permanent Deletion: Added permanent deletion actions that safely remove the file from the disk and purge the associated vector embeddings from ChromaDB.
🐛 Bug Fixes
Dependency Conflict: Resolved an underlying conflict between python-magic and python-magic-bin on Windows which caused the backend Python process to crash silently during MIME-type validation.
Uvicorn Hot-Reload Loop: Updated the Makefile dev-backend command to use --reload-dir app instead of an ambiguous exclude glob. This prevents Uvicorn from infinitely restarting mid-upload when files are written to the ./data/uploads/ directory.
Bypassed Celery for Local Dev: Removed the blocking process_document.delay() Celery queue check during uploads. By routing directly to FastAPI's built-in BackgroundTasks, uploads now instantly return a 202 Accepted response while processing happens asynchronously.
Route Precedence: Repositioned the GET /trash endpoint above the GET /{document_id} wildcard route in documents.py to prevent FastAPI from mistaking "trash" for a document ID.
🧪 How to Test
Launch both the Next.js frontend and the FastAPI backend.
Upload multiple PDF files (notice how fast it uploads now without timing out).
Hover over documents in the sidebar and check the boxes.
Click Delete on the Bulk Actions bar to soft-delete them.
Toggle to the Recycle Bin tab at the top of the sidebar.
Select documents in the Trash and verify that you can Restore them or delete them Forever.
closes #422