QA Release (March 10): Mail Backend Migration, Batch Document-Type Pagination, Standardized Date Formatting, and Admin Fixes
Executive summary
This release promotes 29 commits from development into the QA environment across the Mail, Admin, and Vendor apps. The headline items are migrating the Mail app to the March 10 backend API contract, adding paginated document-type navigation to the batch documents sidebar, and standardizing all date displays to the US MM/DD/YYYY format. It also bundles a batch of bug fixes for admin rules, role permissions, tenant management, and session-expiry handling.
Why this was needed
The backend evolved its bulk-operation and sharing API contract, so the Mail frontend had to be realigned to keep batch, folder, and share actions working. Several admin surfaces had visible defects: the Edit Rule form opened empty and rule update/delete calls returned 405 errors, the Rules grid Active column and the Users Last Login column rendered incorrectly, and clicking Select All or pagination inside the Edit Role dialog triggered an unintended auto-save. Date formats were inconsistent across apps (including a vendor screen using European dd/MM/yyyy), and the batch document-type sidebar loaded a fixed cap of 50 types with only client-side search.
Client / user impact
Clients see consistent US-style dates (MM/DD/YYYY) everywhere, with the vendor Files tab no longer showing day/month transposed. Admins can edit rules with the form correctly pre-filled, and rule create/edit/delete now succeed instead of failing. Role permission edits only save when the user clicks Save. The batch documents sidebar now paginates system and custom document types (5 per page) with server-side debounced search, so large tenants can browse all types. Duplicate session-expiry toasts are suppressed and expiry redirects are smoother. The non-functional Last Login column and bulk delete/export on the tenants list (which were not backed by working APIs) were removed to avoid misleading controls.
Technical scope
- Mail backend API migration (#844): moved
grid_status_id/entity_idfrom request bodies to URL query params via a newbuildBulkQueryParams()helper for select-all bulk endpoints; renamedbatch_status->target_statusacross services/mutations/UI; removed stale fields (grid_status_id,tenant_id,subtenant_ids) from many generated API model types; addedisConflictError()and 409 handling on folder create/update. - Batch document-type pagination (#843): replaced the hardcoded
page=1/limit=50fetch with theusePaginatedDocumentTypeshook; system, custom, and search sections now render pagination controls and use server-side debounced search. - Date standardization (#835): new
@dsm/ui/utils/format-datewithformatDateOnly,formatDateTime,formatDateTimeFull; ~22 call sites across admin/mail/vendor switched fromtoLocaleStringto the shared formatter; fixed vendor FilesTab European-format bug;.npmrchoistsdate-fns. - Admin rule fixes (#836, #837): Edit Rule modal accepts
initialRuleDatafor immediate pre-fill and deriveseffectiveRuleId; rule update uses the correct ID; delete switched toPOST /v1/rules/bulk-delete;is_activenow renders an Active/Inactive badge. - Other fixes: added
type="button"to non-submit buttons in RoleFormDialog to stop auto-save (#840); removed the Last Login column andlast_login/login_countfromAdminUser(#838); removed tenant bulk actions anduseBulkDeleteTenants(#839); session-expiry utility plusMailCookieAuthProvider; docs-search-index route now requiresSTRAPI_API_TOKEN, filters records by user permissions server-side, and setsCache-Control: private, no-store.
Risk & mitigation
Moderate. The Mail API migration touches many bulk/share/folder paths and removes fields from generated types, so a frontend/backend contract mismatch could break batch operations or sharing if the QA backend is not on the matching contract. The date refactor is broad (~22 files) but mechanical; the main risk is an unstyled/incorrect date in a missed call site. Mitigation: the changes are isolated to the QA environment for verification before production promotion, type removals are compile-checked, and the date logic is centralized in one tested utility.
QA validation focus
- Mail batch bulk actions with select-all (assign, delete, update) succeed and send status/entity as query params, not in the body.
- Folder create/update with a duplicate name surfaces the inline 'already exists' error (409 handling).
- Batch documents sidebar paginates system and custom document types (5/page) and search returns server-side results with debounce.
- Admin: Edit Rule opens pre-filled; create, edit, and delete rules all succeed (no 405); Rules grid shows Active/Inactive badges.
- Edit Role dialog: Select All, pagination, and transfer arrows do NOT trigger a save; only Save Changes persists.
- Dates render as MM/DD/YYYY across admin, mail, and vendor; confirm the vendor Files tab is no longer dd/MM/yyyy.
- Session expiry shows a single toast and redirects to login cleanly; no duplicate toasts.
- Confirm the Users grid no longer shows Last Login and the tenants list no longer shows checkboxes/Export/Delete bulk controls.