All updates
ProductionQAFrontend

QA Build (7 Oct 2025): Mail Sharing Attachments, Cleaner Mail & Document Screens, and a Codebase Hardening Pass

PR #503pixbox-supportOct 7, 2025 · 16:40 UTC
QAOct 6, 2025
ProductionOct 7, 2025

Executive summary

This QA build bundles several merged changes (PRs #495, #496, #467, #498, #499, #497). The headline user-facing addition is file attachment support when sharing mail externally by email. It also tidies up the mail and document detail screens, fixes data-grid filter/search resets when switching status, and includes a large internal type-safety and dead-code cleanup that improves stability without changing behavior.

Why this was needed

Two needs drove this build. First, users sharing mail outside the system by email could not include file attachments — the capability existed only as disabled, commented-out code. Second, the codebase had accumulated loose typing (any), disabled lint rules, dead pages, and unfinished UI (e.g. a non-functional inline "Edit Details / Save Changes" control on the mail detail screen). Cleaning these up reduces the chance of silent runtime errors and removes confusing half-built controls before they reach users.

Client / user impact

  • Users can now attach files when sharing mail externally via email, with file-type icons, attachment badges, and a remove control.
  • The data grid more reliably clears filters and search text when the status changes, so stale filters no longer hide results.
  • The mail detail screen no longer shows a non-working inline "Edit Details / Save Changes" control, and the organization switcher now shows subclient and client name for clearer context.
  • Most changes are internal hardening; end users should see steadier behavior and fewer edge-case errors rather than new screens.

Technical scope

  • Mail sharing attachments (PR #499 / feat-mail-details-bonus): activated the previously commented-out attachment block in ShareViaMailDialog.tsx, wiring in Paperclip/Image/File icons, attachment badges, and remove (X) actions.
  • Mail & document detail cleanup: removed the unfinished inline edit/save UI from batches/mails/[id]/page.tsx; deleted the legacy 938-line (dashboard)/mails/page.tsx grid and dropped MailContextProvider from the mails layout; converted the document viewer's idle-preload from any-typed requestIdleCallback shims to typed fallbacks.
  • Add Mail / Address Manager refactor: exported typed option models (ContactOption, DepartmentOption, OrganizationOption, SenderOrRecipientDetails) from MailForm, added safe option normalization in AddMailsModal, rebuilt AddressManager with typed address records, and threaded an isEditing prop through MailOverview.
  • Data grid filter reset (PR #497): added a resetOnStatusChange prop (clearFilters / clearSearch) to data-grid.tsx and stabilized grid search-reset handling.
  • Comments system (PR #498): tooltip for deleted users, hardened mention handling, and removed any across CommentsDrawer, ThreadView, MessageBubble, and mention utilities.
  • Type-safety / lint pass (PRs #496, #467): removed any and eslint-disable headers across auth, dashboard, admin hub, column filters, export modal, and rich-text editor; swapped <img> for next/image in FilePreview; deleted dead src/actions/auth-action.ts.
  • Docs/config (PR #495): added coding rules to AGENTS.md (no hard-coded values, mandatory pnpm lint, ban on any), added CLAUDE.md/GEMINI.md symlinks, and moved BROWSER_NOTIFICATIONS.md into ai_docs/.

Risk & mitigation

Moderate breadth, low-to-moderate risk. The change touches ~100 files (2,574 additions / 4,344 deletions), but the bulk is type tightening and dead-code removal rather than new logic. Main risks: (1) deleting the standalone /mails grid page and the mail context could break any lingering links or shared state that depended on them; (2) the new resetOnStatusChange grid behavior could over-clear or under-clear filters in unexpected views; (3) the newly enabled attachment flow is brand-new functionality and needs end-to-end validation. Mitigation: this reached the QA branch (not Production) specifically so these paths can be exercised before promotion.

QA validation focus

  • Mail external share: open Share via Email, add and remove attachments, verify icons/badges render and the email sends successfully with attachments.
  • Data grids: switch status filters on mail/batch/document grids and confirm filters and search clear correctly and results refresh.
  • Mail detail screen: confirm the old inline "Edit Details / Save Changes" control is gone and the overview/resolution tabs still work.
  • Add Mail / Address Manager: create a mail, select organizations/departments/contacts as sender and recipient, and confirm options load and save without errors.
  • Comments: verify mentions still resolve, deleted-user comments show a tooltip, and threads render.
  • Regression sweep: smoke-test login/auth, dashboard notifications, document viewer/file preview, and the organization switcher (subclient + client name display).