Problem
PDF document upload can appear to do nothing after a user selects a file, while image upload continues to work.
The current chat document upload path has a couple of UX/failure cases that can look like the document never attached:
UnifiedChat.tsx checks file extensions case-sensitively, e.g. file.name.endsWith(".pdf"). Files named .PDF can pass the picker but miss all document-processing branches.
- If PDF extraction returns no usable text, the UI does not attach the document and may only show a generic
Failed to process document message, depending on where the failure occurs.
- Support docs say PDFs must be text-based and under 10MB, but the app does not clearly surface that distinction to the user at selection time.
Suggested investigation/fix
- Normalize selected document filenames before extension checks (
toLowerCase() or MIME/type-based handling).
- Add an explicit unsupported-document branch so valid-looking picker selections cannot no-op.
- Surface a more specific error when PDF text extraction fails or returns empty text, especially for scanned/image-only PDFs.
- Confirm behavior on current macOS desktop, iOS, and Android builds with:
- lowercase
.pdf
- uppercase
.PDF
- text-based PDF under 10MB
- scanned/image-only PDF under 10MB
- PDF over 10MB
Relevant code
frontend/src/components/UnifiedChat.tsx: handleDocumentUpload
frontend/src-tauri/src/pdf_extractor.rs: extract_document_content
docs/support-faq.md: file upload support guidance
Problem
PDF document upload can appear to do nothing after a user selects a file, while image upload continues to work.
The current chat document upload path has a couple of UX/failure cases that can look like the document never attached:
UnifiedChat.tsxchecks file extensions case-sensitively, e.g.file.name.endsWith(".pdf"). Files named.PDFcan pass the picker but miss all document-processing branches.Failed to process documentmessage, depending on where the failure occurs.Suggested investigation/fix
toLowerCase()or MIME/type-based handling)..pdf.PDFRelevant code
frontend/src/components/UnifiedChat.tsx:handleDocumentUploadfrontend/src-tauri/src/pdf_extractor.rs:extract_document_contentdocs/support-faq.md: file upload support guidance