Side-by-Side PDF Viewing, Mail Reupload, and Status Controls in Resolution & Mail Detail Pages
Executive summary
This QA release bundles several mail and document workflow upgrades (feature PRs #333, #338, #340). The mail/document resolution detail pages now show a resizable side-by-side PDF viewer, users can reupload mail files and preview documents inline, and the batch mail detail page gains an inline status selector. The release also migrates the frontend's dependency tooling from npm to pnpm.
Why this was needed
Reviewers previously had to open documents separately from resolution details, making it hard to cross-check a file against its metadata. There was also no in-app way to replace an incorrectly uploaded mail file or change a mail's processing status from the detail view. The dependency tooling migration to pnpm standardizes the build and resolves the previous mix of package-lock.json and pnpm-lock.yaml.
Client / user impact
- Reviewers can view the selected envelope or document PDF beside resolution details in a panel they can resize (and double-click to reset), with the viewer auto-hiding on the Activity Log tab.
- Authorized users (assigned to the resolution and holding the manage-resolution permission) can reupload a mail's envelope file directly from the viewer, with success/error toasts.
- A document 'preview' (eye icon) and download action are now grouped on document rows for quicker access.
- On the batch mail detail page, users can change a mail's status inline, limited to the transitions allowed for the current status.
- Grid column-value filtering now refreshes correctly when a search term is applied.
Technical scope
- Resizable PDF viewer: Mail resolution detail page (
resolution-center/mail/[id]/page.tsx) andMetadataTab.tsxrebuilt aroundreact-resizable-panels(PanelGroup/Panel/PanelResizeHandle), renderingMultiPDFViewer; panel layout persisted tolocalStorage. Tab content moved toforceMount+hiddento keep state across tabs. - File selection:
DocumentsTabnow takesonFileSelect/selectedFileType/selectedDocumentIdcallbacks so the chosen envelope/document drives the viewer. - Mail reupload:
ReuploadMaildialog wired viauseReuploadMailMutation, gated by assigned-user check +PERMISSIONS.RESOLUTION.MANAGE_RESOLUTION. - Document preview/download: eye + download actions added in
MailDocuments.tsxandDocumentsTab.tsx. - Status selector: batch mail page (
batches/mails/[id]/page.tsx) adds aSelectdriven by newuseGetAllStatusquery anduseUpdateMailStatusMutation, enforcingallowed_transitions. NewgetAllStatusservice +status.querieshook added. - Grid fix:
useGetColumnValuesquery key now includesfilters.search. - Tooling: removed
package-lock.json(13,171 lines), addedpnpm-lock.yaml, added@mantine/formtopackage.json. - Cleanup: removed stray
console.loginmail.services.ts; removed a validation-error branch inerrorhandler.utils.ts; removed unused imports (Badge, ChevronLeft, DropdownMenu) across detail pages.
Risk & mitigation
Moderate. The detail-page layout was substantially rewritten (panel groups, forceMount tab content, full-height containers), so scrolling, sticky headers, or empty PDF states could regress. The pnpm migration changes how dependencies resolve; a stale lockfile or node_modules could cause build/runtime drift. Removing a branch in errorhandler.utils.ts may alter how validation (detail-object/array) API errors surface. Mitigation: verify a clean pnpm install/build, exercise all detail tabs, and confirm reupload permission gating and status transition limits.
QA validation focus
- Open a mail and document resolution: confirm the PDF viewer appears beside details, resizes via the handle, resets on double-click, and hides on the Activity Log tab.
- Switch the selected file in DocumentsTab and confirm the viewer updates to the correct envelope/document.
- As an assigned user with manage-resolution permission, reupload a mail file; confirm success toast and refreshed data. Confirm the Reupload button is hidden for unauthorized users.
- Use the eye/preview and download actions on document rows.
- On the batch mail detail page, change a mail's status; confirm only allowed transitions are offered and the update succeeds.
- Apply a search term in a grid column filter and confirm results refresh.
- Verify a clean
pnpm installand production build with no missing dependencies.