QA Batch: Vendor Downloads, Resolution Center Reliability, Comments Drawer Refactor & Admin Tenant Fixes
Executive summary
This release promotes a batch of frontend fixes and refactors into the QA environment, spanning the Vendor portal, Mail Resolution Center, the Comments drawer, Admin tenant management, and notifications. The headline user-facing wins are reliable file downloads in the Vendor portal, smoother and more resilient Resolution Center forms, and a redesigned Comments experience with proper loading, empty, and error states.
Why this was needed
Several rough edges had accumulated on the QA-bound dev branch. Vendor download buttons opened files in a new browser tab instead of saving them (the HTML download attribute is ignored for cross-origin S3/Filestack URLs). Resolution Center forms could be double-submitted or show stale data while saving. The Comments drawer had grown into a single oversized file that was hard to maintain and lacked a clear error/retry path. Admin tenant screens were pointed at a renamed backend route, and enterprise tenants could incorrectly retain a parent.
Client / user impact
- Vendor users can now download task and upload-center files directly to disk instead of having them open in a new tab; export buttons show a per-row spinner so it is clear a download is in progress.
- Resolution Center users get forms that lock during save (preventing duplicate submissions) and update instantly via optimistic UI, with cleaner handling of the new
tenant_idfield. - Mail users see a Comments drawer with distinct loading skeletons, an empty-state prompt, and an error state with a Retry button instead of silent failures.
- Admins get correct tenant list/create/update behavior, and creating an enterprise/client tenant no longer keeps a parent tenant.
- All users get more reliable unread-notification counts in the dropdown.
Technical scope
Grounded in the diff (~1800 additions / ~1350 deletions across 49 files, batching ~9 commits):
- Vendor downloads: new
fetchAndDownloadFile(url, filename)helper inapps/vendor/src/lib/utils.tsthat fetches a blob and triggers a save, fixing cross-origin (S3/Filestack) downloads; per-row export spinner inTasksTab. - Vendor layout/responsiveness: task detail page widened (
max-w-4xl->max-w-7xl) with a sidebar layout; upload modal overflow fixes viamin-w-0; richer cloud-upload file list (type icons, tooltips, size formatting) inCloudUploadTab. - Comments drawer refactor: the monolithic
useCommentsDrawer.ts(~721 lines) andCommentsDrawer.tsxwere split into focused modules —drawer/list/InfiniteCommentsList,drawer/states/{EmptyCommentsState,CommentsErrorState},drawer/skeletons/*, andhooks/useCommentsDrawer.{ts,helpers.ts}— adding an explicit error state with retry and hardened payload/error parsing. - Resolution Center:
lock forms during save+ optimistic updates (resolution.mutation.ts,mailOverview.store.ts); migrated entity handling totenant_idacross DTOs/types/services; normalized resolution and mail-detail update payloads. - Admin: tenant routes remapped from
/admin/api/entitiesto/admin/api/tenants;TenantFormDialognow hides the Parent Tenant field and forcesparent_id: nullfor enterprise/client types. - Notifications:
notification-dropdownauto-fetch tuned to find unread items beyond page one while avoiding draining pages after Mark-all-read. - Config: adds
apps/vendor/.env.localpointing the websocket/API env at the dev-api endpoint.
Risk & mitigation
Medium. The Comments drawer was substantially restructured; although behavior is intended to be preserved, regressions in pagination, auto-scroll, optimistic posting, or socket reconciliation are possible. The Admin tenant route rename depends on the matching backend endpoint being live in QA. Note: a committed apps/vendor/.env.local hard-codes dev-api/websocket URLs and localhost app URLs — this should not propagate to higher environments. Mitigation: targeted QA on the touched surfaces and confirming the tenant route exists server-side before promotion.
QA validation focus
- Vendor: download files from task detail and upload-center modals — confirm they save to disk (not a new tab) and the export spinner appears per row.
- Vendor: open the upload modal with long filenames and the cloud-upload tab; verify no overflow and that icons/tooltips/sizes render.
- Resolution Center: submit a resolution and confirm the form locks during save, updates optimistically, and persists with the correct tenant.
- Comments: open the drawer and verify loading skeletons, empty state, and error+Retry behavior; post a comment/reply and confirm optimistic send, success, and failure states.
- Admin: list/create/update/delete tenants against
/admin/api/tenants; create an enterprise/client tenant and confirm the Parent field is hidden and no parent is saved. - Notifications: confirm the unread count is accurate across multiple pages and after Mark-all-read.
- Verify the vendor websocket connects against the dev-api endpoint in QA.