-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/file upload text extraction #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Resolved conflicts by keeping both Workspace and Demos navigation items, and all page imports (TranslatorTestPage, PromptTestPage, and WorkspacePage). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…examples - Revised application overview to include interactive demos and practical implementations of Chrome's AI APIs. - Added detailed features section outlining integrations with Rewriter, Translator, and Prompt APIs. - Introduced new UI components and developer experience enhancements. - Included API usage examples for Rewriter, Translator, and Prompt services. - Updated browser requirements and next steps for future development.
- Added default language support ('en') in TextInputPanel and rewriter options.
- Updated ChromeAiDiagnostics to reflect prompt API availability status.
- Improved download progress handling in PromptTest, RewriterTest, and TranslatorTest to manage undefined values.
- Enhanced TranslatorTest with lazy initialization notes and improved error handling for service initialization.
- Updated translator API to require source and target language parameters for availability checks.
- Refined documentation for global AI API capabilities and added logging for debugging purposes.
…arget language parameters
- Modified the availability check for the Translator API to include specific source ('en') and target ('es') language parameters, enhancing accuracy in detecting service availability.
- Introduced a new env.example file containing placeholders for API keys, facilitating easier setup for development and testing environments.
- Introduced a new file upload system supporting TXT, PDF, and DOCX formats with automatic text extraction. - Added components for file upload dropzone, file list display, and extraction progress tracking. - Implemented a custom hook for managing file uploads, including validation, progress tracking, and error handling. - Enhanced the WorkspacePage to toggle between text input and file upload modes, integrating extracted text into the processing workflow. - Updated README with new file upload features and usage instructions.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Added a new URL input component for extracting article content from web pages. - Integrated content extraction functionality using Mozilla Readability for clean article parsing. - Enhanced the WorkspacePage to support URL input alongside text and file modes, allowing users to extract and process content from URLs. - Introduced a custom hook for managing content extraction state, including loading, success, and error handling. - Updated README to reflect new URL extraction capabilities and usage instructions.
…-extraction # Conflicts: # README.md # env.example # package-lock.json # package.json # src/pages/workspace/WorkspacePage.tsx # src/routes/app-router.tsx
seshxn
approved these changes
Oct 15, 2025
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
Comprehensive security and robustness improvements to the file upload feature (TXT, PDF, DOCX). This PR
addresses critical security vulnerabilities, adds retry logic, implements proper resource cleanup, and
enhances the user experience with intelligent timeout scaling and duplicate detection.
Closes: File Upload Text Extraction feature card
✅ What Changed
🔒 Security Fixes
🛡️ Robustness Improvements
⚡ Performance Enhancements
📚 Documentation
🔧 Technical Details
Files Modified (7 files)
Files Deleted (1 file)
Key Implementation Details
Magic Numbers Validated:
Timeout Calculation:
timeout = 5000ms (base) + ((fileSizeMB - 1) * 2000ms)
// Examples:
// 0.5 MB → 5s
// 2 MB → 7s
// 5 MB → 13s
// 10 MB → 23s
Retry Logic:
🧪 Testing
Build Status
✓ TypeScript compilation: SUCCESS
✓ ESLint: 0 errors, 0 warnings
✓ Vite build: SUCCESS
✓ Bundle: 1.3 MB (374 KB gzipped)
Manual Testing Checklist
📊 Impact
Security
Reliability
Performance
User Experience
🚀 Migration Notes
Required Actions
Breaking Changes
None - fully backward compatible
Environment Variables
Optional: Custom PDF.js worker URL (default: local worker)
VITE_PDFJS_WORKER_URL=
📝 Related Issues/PRs
✅ Checklist
Ready for review! 🎉
This PR delivers a secure, robust, and performant file upload system with comprehensive error handling and
excellent user experience.