As an HOA admin,
I want to upload my community's PDF bylaws and have them immediately available to the AI,
so that residents can get accurate, document-grounded answers without me summarizing anything manually.
Acceptance Criteria
Givena real PDF with a text layer is uploaded (≤ 10MB)
Whenthe admin submits the upload form
Thentext is extracted via pdfjs-dist, appended to neighborhoods.bylaws, and the AI uses it for subsequent chat queries within 30 seconds
Givena scanned PDF (image-only, <50 extractable chars)
Whenupload is submitted
ThenTesseract OCR runs automatically, user sees a loading indicator with "Processing scanned document…", and text is appended on completion. User is not required to choose OCR manually.
Givena file exceeding 10MB or an unsupported type (e.g. .docx)
Whenfile is selected
Thena toast error appears before upload begins: "File must be PDF, TXT, or MD under 10MB." No upload attempt is made.