Vendor Portal: File Re-upload, Bulk Download, and Upload Center Details
Executive summary
This release brings several usability improvements to the Vendor Portal's file management screen. Vendors can now replace an existing file with a corrected version, select multiple files at once to download them as a single ZIP archive, and see the entity type on each upload center card. A backend-compatibility fix to the bulk-export request is also included. These changes have reached the QA/testing environment.
Why this was needed
Vendors previously had no way to correct a file that was uploaded in error short of contacting support, and could only download files one at a time. Upload center cards also omitted the entity type, making it harder to tell similar centers apart. In addition, the existing bulk-export request did not match the format the backend expects, so multi-file ZIP downloads needed to be fixed before the new selection feature could work end to end.
Client / user impact
- Vendors can replace a previously uploaded file directly from the file list via a new "Re-upload file" action, with the list refreshing automatically on success.
- A new selection workflow lets vendors check individual files (or all files on the page) and download them together as a ZIP using a "Download Selected" button, with a live selected-count and a "Clear" control.
- Upload center cards now display the entity type alongside the entity name, improving at-a-glance identification.
- The dialog no longer closes unexpectedly while the file picker is open during a re-upload.
Technical scope
Bundles feature PR #784 (feat/vendor-reupload-file) into QA. Scope is limited to the apps/vendor frontend (7 files, +301/-12):
- ViewFilesModal.tsx: adds a re-upload action (FileStack picker driven, using a
useRefto avoid stale-closure issues), a checkbox column with select-all/indeterminate state, selected-count plus Clear/Download-Selected controls wired touseExportMailsZip, andonInteractOutside/onPointerDownOutsideguards so the dialog stays open while the picker is active. - vendor.services.ts:
exportMailsZipnow POSTs the rawmail_idsarray as the body withcollection_nameas a query parameter, to match the backend contract. - vendor.types.ts:
VendorMailReuploadRequestchanged fromfilestack_handleto{ handle, filename }; response type updated toold_file_path/new_file_path. - useFilestackPicker.ts: adds
rootId: "filestack-picker-root"so the picker renders at body level. - globals.css: ~45 lines of FileStack z-index/pointer-event overrides so the picker sits above Radix Dialog overlays.
- UploadCenterCard.tsx: renders
entity_typewhen present. - vendor.mutations.ts: re-upload success toast no longer reads the (now-removed)
response.message.
Risk & mitigation
Low-to-moderate, frontend-only and scoped to the vendor file modal. The re-upload and ZIP-export request shapes were realigned to the backend contract, so both depend on the matching backend endpoints behaving as expected. A commit note flags a pending backend item (vendor /me endpoint needs to return a CSRF token for cross-origin support), so re-upload may be blocked until that lands. The global FileStack z-index !important overrides are broadly scoped to .fsp-* selectors and should be checked for unintended effects on any other screen using the picker. Mitigation: verify against the QA backend before promotion and confirm the picker/dialog stacking on all upload surfaces.
QA validation focus
- Open a file's Re-upload action; confirm the FileStack picker renders above the modal, supports drag-and-drop, and that the dialog does not close while the picker is open.
- Complete a re-upload and verify the file list and upload-center counts refresh and a success toast appears; cancel/error a re-upload and confirm state resets cleanly.
- Select individual files and "Select all on this page"; verify the indeterminate state, the selected count, Clear, and that Download Selected produces a ZIP of exactly the chosen files.
- Confirm the bulk export uses the correct collection name and the corrected request format (mail_ids in body, collection_name as query param).
- Verify upload center cards show the Type field when an entity type is present and omit it otherwise.