QA Promotion: Wider Image Upload Support, Bulk-Action Reliability Fixes, and Admin Grid Improvements
Executive summary
This release promotes 32 commits from development into the QA environment, bundling several mail- and admin-workflow fixes. Highlights include broader image-upload support (TIFF, BMP, GIF, WEBP), more reliable bulk delete and bulk status-change operations, correct handling of long-running (async) jobs, and a set of admin-grid corrections for folders, rules, organizations, and document types.
Why this was needed
A number of admin and mail workflows were silently failing or behaving inconsistently: bulk-delete requests for organizations, departments, and rules returned errors because of a request-format and ID-field mismatch with the backend; document status changes had no effect because the wrong field name was sent; the 'assign user before changing status' prompt never appeared; deactivated folders disappeared with no way to re-enable them; and long-running bulk jobs showed a false success without tracking progress. These needed correcting before further QA validation.
Client / user impact
Users can now upload a wider range of image formats across the mail, document, and batch upload flows. Bulk delete, bulk status changes, and the assign-user prompt work correctly, including across large 'select all' selections and asynchronous jobs that report live progress. Admins can see and re-enable inactive folders, view only active departments, and see a disabled Delete button with an explanatory tooltip when they lack permission. Rule removal is now clearly labeled 'Deactivate' to reflect that rules are reversible, not permanently deleted.
Technical scope
Frontend-only batch (apps: mail, admin, auth). Grounded in the diff:
- Expanded accepted image types to TIFF/TIF/BMP/GIF/WEBP in upload components (e.g.
FileUploader.tsx) alongside existing PDF/ZIP/JPG/PNG. - Bulk-delete endpoints switched from
DELETEwith query params toPOSTwith a JSON body; removed unused query-builder utilities (PR #881 family). - Mail status handling: detect backend
ASSIGNMENT_REQUIRED(422) viaerror.error.code, extractunassigned_mails, preserve full select-allselectionStatefor retry, and handle async HTTP 202 viauseBulkJobProgress(MailContents.tsx,UpdateMailStatusModal.tsx). - Corrected document-status payload field from
document_statustotarget_status(document-basic-details.tsx). - Rule bulk actions now extract IDs via
rule_id ?? id; 'Delete' relabeled to 'Deactivate' across rule modals (#885). - Admin grids: inactive folders shown via
is_active=null, pagination reset to page 1 on folder/status change using set-state-during-render (InboxGrid,MailGrid,FolderTab), and disabled Delete button with permission tooltip onOrganizationTab. - Removed duplicate document-type creation path in
DocumentTypestab.tsx(#884). BulkOperationProgressnow polls alongside WebSocket and prefers whichever source has more progress.- Vercel preview cross-app redirect URLs reconstructed from branch ref + team slug with the documented hash fallback (#882).
Risk & mitigation
Moderate. The changes touch shared grid, upload, and bulk-action code paths used across mail and admin, so regressions could affect multiple screens. The new image types depend on backend conversion-to-PDF support, and async (202) handling depends on the backend correctly queuing jobs and emitting progress events. Mitigation: this is a QA-stage promotion intended specifically for full regression testing before any production release; changes are additive/corrective and several restore previously broken behavior.
QA validation focus
- Upload TIFF, BMP, GIF, and WEBP via AddMails, AddDocumentModal, and batch upload; confirm acceptance and processing.
- Bulk delete organizations, departments, and rules; confirm success with no 422 errors.
- Trigger a status change requiring assignment in both explicit and 'select all' modes; confirm the assign-user prompt opens and the transition completes.
- Trigger a large bulk status change that runs async (202); confirm the progress panel appears, advances, and the grid refreshes after reload.
- Change a document status from the details page; confirm the badge updates immediately.
- Verify inactive folders appear in the admin grid and can be reactivated; departments show only active records.
- Switch folders/status filters from a high page number; confirm the grid resets to page 1.
- Confirm the Delete button is disabled with a tooltip when permission is missing, and rule actions read 'Deactivate'.