All updates
ProductionQAFrontend

Resolution Center, Document Types & Bulk Actions: Usability Fixes and Viewer Layout Persistence

PR #712pixbox-supportNov 4, 2025 · 10:28 UTC
QANov 4, 2025
ProductionNov 4, 2025

Executive summary

A QA batch bundling several front-end fixes and refactors across the Resolution Center, Document Type admin, bulk actions, and organization setup. It resolves a blocker where users could not configure columns for new document types, repairs tag editing on resolution documents, makes folder-assignment and bulk-action overlays easier to use, and restores reliable persistence of the document/mail viewer split-pane layout.

Why this was needed

Multiple reported usability issues had accumulated: the 'Client' field on document types was mandatory, which blocked some users from progressing to the column-management screen; saving tag changes on a resolution document used the wrong payload shape, causing tags to disappear or fail to save; the folder-assignment dropdown opened downward and hid the confirm/cancel buttons; bulk-action overlays stayed open after clicking elsewhere; and the viewer's resizable split-pane did not consistently remember its width. A redundant 'Press Enter to select' hint also cluttered the comment mention list.

Client / user impact

  • Users can now create document types without selecting a Client and proceed to column management.
  • Editing tags on a resolution document saves correctly, including clearing all tags and creating new tags.
  • The 'assign folders to mail' dropdown opens upward so the action buttons stay visible.
  • Bulk-action overlays close automatically when clicking outside them.
  • The document and mail viewer remembers its panel split between visits.
  • Cleaner comment mention dropdown (removed redundant hint); improved contrast for multi-select tags across theme presets.

Technical scope

  • Document Types (AddDocumentTypeModal.tsx, EditDocumentTypeModal.tsx): client_id Zod schema changed from required (min(1)) to int().positive().optional(); removed the required * marker and 'optional' copy; client onValueChange now guards against NaN.
  • Resolution document tags (DocumentBasicDetails.tsx): new_tags now sent as objects [{ name }] instead of raw strings; tags always sent as a numeric array (enables clearing); tag-reset moved out of a mount effect into handleFieldChange to stop tags clearing on initial load.
  • Bulk actions (bulk-actions.tsx): added a pointerdown outside-click listener (portal-aware) to dismiss the active overlay.
  • Assign folders (AssignFoldersToMailModal.tsx): passes dropdownPlacement=UP to the multi-selector.
  • Mentions (MentionPopover.tsx): removed the inline 'Press Enter to select' hint.
  • Viewer layout persistence (resolution-center/document/[id]/page.tsx, resolution-center/mail/[id]/page.tsx, use-document-viewer.ts, use-mail-viewer.ts): centralized localStorage keys/defaults, added validated parseStoredPanelLayout, and rAF-based hydration via ImperativePanelGroupHandle.
  • Organization modal (CreateOrganizationModal.tsx): removed any, added typed payload/response, normalizeOptionalSelectValue/toNumericId helpers, and reset of parent_organization_id when unchecked.
  • Select styling (select.constants.ts): multi-value chips switched to accent-foreground theme tokens for contrast.

Risk & mitigation

Low-to-moderate. Mostly localized UI fixes plus a typing refactor of the organization modal and a shared viewer-layout change. Main risks: the document-type 'Client' field is now optional, so backend handling of document types without a client should be confirmed; the tag payload shape changed (new_tags objects, always-sent tags array), which depends on the backend update contract; and the viewer layout-persistence rewrite touches shared hooks/pages. Mitigation: changes are guarded (NaN/empty checks, validated stored layouts) and confined to specific surfaces; verify on QA before promotion to production.

QA validation focus

  • Create a document type with and without selecting a Client; confirm you can reach the column-management screen and saving works.
  • On a resolution document, add existing tags, create new tags, and remove all tags; confirm each persists after save and tags do not vanish on open.
  • Open the 'assign folders to mail' modal; confirm the dropdown opens upward and confirm/cancel buttons remain visible.
  • Open a bulk-action overlay, then click outside it; confirm it closes (and clicking inside the overlay does not).
  • Resize the document/mail viewer split-pane, reload and switch tabs (including Activity for mail); confirm width is restored.
  • Create an organization with/without client, sub-client, and parent organization; confirm correct payload and the parent selector clears when unchecked.
  • Verify comment mention dropdown no longer shows 'Press Enter to select' and multi-select tag chips are legible across light/dark themes.