Implement Global File Drop Handler with Toast Notifications and Project Selection#1
Closed
Implement Global File Drop Handler with Toast Notifications and Project Selection#1
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: diecodev <51871681+diecodev@users.noreply.github.com>
Co-authored-by: diecodev <51871681+diecodev@users.noreply.github.com>
Co-authored-by: diecodev <51871681+diecodev@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] # Global File Drop Handler
Crea un **handler global de drop de archivos** para la aplicación con el siguiente comportamiento:
## Casos de uso
### 1. Drop global (fuera de proyectos en el sidebar)
- **Si el usuario está situado en un proyecto:**
...
Implement Global File Drop Handler with Toast Notifications and Project Selection
Sep 24, 2025
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.
This PR implements a comprehensive global file drop handler system that allows users to drag and drop PDF files anywhere in the application with intelligent project routing and persistent status notifications.
Overview
The implementation provides a seamless drag-and-drop experience for PDF statement uploads with context-aware project selection and real-time feedback through toast notifications that persist across navigation.
Key Features
🎯 Smart Drop Zones
🔒 File Validation
🎨 User Experience
⚙️ Technical Implementation
/py-api/projects/{project_id}/statementsendpointComponent Architecture
Usage Examples
Scenario 1: Global drop with current project
Scenario 2: Global drop without current project
Scenario 3: Cross-project drop
Files Added/Modified
components/global-file-drop-handler.tsx- Main drop handler componentcomponents/ui/toast.tsx- Toast notification systemcomponents/ui/project-selector-dialog.tsx- Project selection modalcomponents/ui/cross-project-confirmation.tsx- Cross-project confirmationstores/toast-store.ts- Toast state managementlib/file-validation.ts- PDF validation utilitiespublic/upload-worker.js- Background file processingapp/o/[org-slug]/(sidebar)/layout.tsx- Integration pointapp/o/[org-slug]/(sidebar)/components/projects/project-item.tsx- Added drop target attributesThe implementation follows existing code patterns and maintains consistency with the current UI/UX design while adding powerful new functionality for file management.
Created from VS Code via the GitHub Pull Request extension.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.