Vendor large-PDF performance, pickup charge dialog fix, and task page cleanup (QA)
Executive summary
This QA release promotes a batch of fixes from development. The vendor PDF splitter now stays responsive when handling very large files, the admin pickup-charge dialog fits and scrolls correctly within the screen, and a redundant "Browse All Files" control was removed from the vendor task detail page.
Why this was needed
Opening or splitting large PDFs in the vendor portal could make the browser sluggish or unresponsive because every page was rendered and parsed up front. Separately, the admin pickup-charge form could overflow the screen on smaller displays, hiding its action buttons, and the vendor task page carried a duplicate "Browse All Files" entry point that was no longer needed.
Client / user impact
- Vendor users can configure and run splits on large, multi-page PDFs without the upload modal freezing.
- For large files, page thumbnails are intentionally skipped and a clear "Large PDF mode" notice is shown; any single page can still be inspected on demand via a preview action.
- The admin pickup-charge create/edit dialog now stays within the viewport with a scrollable body and a fixed footer, so the Save/Cancel buttons remain reachable.
- The vendor task detail page is cleaner, with the obsolete "Browse All Files" button and its dialog removed.
Technical scope
Batch promotion of dev into qa (9 commits, 9 files). Notable changes:
- Large-PDF splitter performance (PRs #1049 and follow-ups,
packages/ui/src/pdf-splitter): thumbnails are skipped above thresholds (MAX_THUMBNAIL_RENDER_PAGES= 60,MAX_THUMBNAIL_RENDER_BYTES= 50MB); a newLightweightPageListrenders dense page rows with an on-demandPdfPagePreviewDialog; below threshold, thumbnails now render lazily viaIntersectionObserver(LazyThumbnailRenderer).splitPdf.tsreads page counts through the PDF.js worker (with a pdf-lib fallback) and yields to the event loop during large split jobs. - Upload modal (
apps/vendor/.../UploadModal/FileList.tsx): PDF page-count reads are batched (3 at a time) with yields and a PDF detection fix (MIME +.pdfextension fallback). - Browse All Files removal (PR #1048,
apps/vendor/.../tasks/[taskId]/page.tsx): removed theTaskOriginalsDialogand its trigger button. - Pickup charge dialog (PR #1050,
apps/mail/.../PickupChargeFormDialog): height-capped, scrollable body with a bordered sticky footer and responsive grid columns.
Risk & mitigation
Low-to-moderate. The shared pdf-splitter package is used across vendor surfaces, so a regression could affect page selection or split output. The PDF.js page-count path is new but retains the prior pdf-lib method as a fallback. The dialog change is layout-only (CSS classes). Mitigation: exercise both small and large PDFs in QA, and confirm split outputs are byte-correct.
QA validation focus
- Open the vendor PDF splitter with a small PDF: verify thumbnails render lazily on scroll and page selection still works.
- Open with a large PDF (>60 pages or >50MB): confirm the "Large PDF mode" notice appears, no thumbnails render, the page list loads, and the per-page preview (eye) action opens the correct page.
- Run a split on a large PDF: confirm the modal stays responsive and the resulting files contain the correct pages.
- In the vendor upload modal, add many PDFs at once and confirm page counts populate progressively without freezing.
- Confirm the vendor task detail page no longer shows a "Browse All Files" button for large tasks and the file list still renders.
- Open the admin pickup-charge create/edit dialog (including on a short window): confirm the body scrolls and Save/Cancel stay visible and clickable.