Server-Side Spreadsheet Export, Plus Mail/Vendor/Docs Fixes (QA)
Executive summary
This QA batch promotes a set of frontend changes to the testing environment. The headline item is a new server-side XLSX export: exporting a grid (Inbox, Mails, Documents, Batches) now hands the work to the backend so the entire filtered dataset can be exported (up to ~50K rows) instead of just the rows on the current page, with live progress and an automatic download when ready. The batch also bundles several reliability fixes across Mail, Vendor, the documentation portal, and Admin.
Why this was needed
The previous Excel export ran entirely in the browser and could only export the rows visible/selected on the current page, with no way to export a full filtered result set and a risk of hitting browser memory limits on large selections. Separately, help-page videos were auto-playing (with audio) on load, the documentation AI chatbot read a misnamed environment variable, the batch-upload form let users submit without a required Upload Center (causing backend errors), and several permission strings had drifted out of sync with backend renames, silently hiding bulk actions.
Client / user impact
- Full-data export: users can export every row matching the current filters/search (not just the visible page) from Inbox, Mails, Documents, and Batches. Export buttons now show the item count, and the file downloads automatically once the background job finishes.
- Quieter help pages: embedded help videos no longer auto-play or blast audio on load; manual playback still works with sound.
- Working AI docs chat: the documentation assistant now authenticates correctly.
- Fewer failed batch uploads: the Upload Center field is now clearly required, preventing rejected submissions.
- Restored bulk actions: bulk "Update Status" and related buttons reappear for users whose permissions had been hidden by mismatched permission keys. In the Inbox, Mark as Read is now an inline bulk action and Move to Folders moves into the "More Actions" overflow menu.
Technical scope
Grounded in the diff. Frontend monorepo (Next.js); env is QA.
- Server-side grid export (new feature): new
ServerExportModal,grid-exportmutation/query/types, routes forPOST /api/v1/grid-columns/exportGridData/{module}and a status-polling endpoint. Wired into Batches, Batch Mails, Inbox, Inbox Mails, Documents, and Document Grid; sends filters + sort/search/status as query params and a raw filters dict as the body. - Background-job plumbing:
bulk-job.storegains agridExportoperation anddownloadUrl;BulkOperationProgressadds indeterminate export status config, WebSocket-primary + polling-fallback tracking, and auto-download of the presigned S3 file on completion; WebSocket hook/types capturedownload_url/filename. Old client-sideExportExcelModal/useExcelExportare deprecated (kept, not deleted). - Help video autoplay fix (
VideoRenderer.tsx): removesautoplayfrom the iframe allow-list and setsautoplay=0on embed URLs. - Docs AI chat env fix (
api/docs-chat/route.ts): readsSTRAPI_URL/STRAPI_API_TOKENwith||fallbacks so empty strings fall through. - Batch upload validation: Upload Center marked required with form validation and disabled submit.
- Permission sync (
Permissions.ts): pluralizesview_comments/view_resolutions/manage_resolutions, renames entity→tenant access keys, removes deadMARK_AS_RESOLVED. - Inbox bulk actions reorder (
InboxGrid.tsx): Mark as Read promoted inline; Move to Folders forced to overflow. - Vendor cleanup: removes the file lifecycle "trace" feature (~362-line modal plus its route/service/query/types) that 404'd for non-Filestack files; fixes Filestack sidebar hover z-index and View-button hover text color.
- Admin: disables sorting on the Tenants table "Type" column.
Risk & mitigation
Moderate. The export feature is the main risk surface: it depends on the backend export endpoints, WebSocket job_completed events, and presigned S3 URLs all working in QA; a mismatch in the request body shape or filter format could yield empty/incorrect exports or 500s. Auto-download relies on browser behavior (popup/download settings). Permission-string renames are tightly coupled to specific backend IAM migrations—if QA backend is on a different migration, gated actions could still be hidden or wrongly shown. Mitigation: the old client-side export path is only deprecated (not removed) and could be reverted to; verify against the QA backend before promoting to Production.
QA validation focus
- Export from each surface (Inbox, Inbox Mails, Batches, Batch Mails, Documents, Document Grid) with filters/search/sort applied; confirm the XLSX contains the full filtered set, not just the current page, and that the row count matches the button count.
- Confirm the progress panel shows export status and the file auto-downloads on completion; test the failure path (no leftover spinner, error shown).
- Verify help-page videos do not auto-play on load and have no audio until manually played; confirm manual playback has sound.
- Confirm the documentation AI chatbot returns answers on QA.
- Try submitting a batch upload without an Upload Center: submit should be blocked with a required indicator.
- Verify bulk Update Status and resolution/comment bulk actions appear for permitted roles; in the Inbox confirm Mark as Read is inline and Move to Folders is in "More Actions".
- In Vendor, confirm files open/preview with no trace button and correct hover styling; in Admin, confirm the Tenants "Type" column header is not sortable.
- Regression: ensure no console errors and that other bulk operations (download, assign, delete) still work.