QA Promotion: Tenant Navigation Alignment, Folder Edit Fixes, and Vendor Task Detail Hardening
Executive summary
This release promotes a batch of frontend fixes from development into the QA environment for validation. It completes the renaming of the legacy "Entity" concept to "Tenant" across Admin navigation and the tenant-type API, fixes how AdminHub folder edits save status and tenant links, and makes vendor task-detail statistics more resilient to incomplete data from the backend.
Why this was needed
After the broader Entity-to-Tenant terminology change, several Admin links still pointed at the retired /entities route and the old entity-types API path, leaving broken navigation and stale labels. Separately, the AdminHub folder editor was sending the wrong field name for folder status and could not reliably clear a tenant or subtenant association, and vendor task-detail screens could render misleading numbers (negative counts, missing badges, skewed success rates) when the backend returned partial or missing statistics.
Client / user impact
- Admin users get working navigation: the dashboard "View All Tenants" button and the "Create Tenant" quick action now route to
/tenants, and the page title and breadcrumb read "Tenants" / "Tenant Management". - AdminHub folder edits now correctly persist the active/inactive status and allow a tenant or subtenant link to be explicitly cleared.
- Vendor task-detail views show consistent, non-negative counts, a sensible "Pending" status for files awaiting conversion, and a stable success-rate figure even when the backend has not yet reported totals.
- This batch reaches the QA environment only; it is not yet in Production.
Technical scope
Promotion of dev into qa. Notable changes (folded-in PRs #812, #813):
- Admin routing/labels: dashboard
page.tsxandAdminHeader.tsxswitch/entitiesto/tenantsfor the CTA, quick action, page titles, and breadcrumbs;admin.routes.ts/admin.services.tspoint tenant-types at/api/v1/tenants/tenant-types. - Mail tenant-type API alignment: hooks, services, routes, and query keys renamed entity→tenant (
useGetTenantTypes,useGetTenantsForResolution,getTenantTypesWithMapping,TENANT_TYPES_QUERY_KEY, endpoint/v1/tenants/tenant-types), with backward-compatible aliases retained for old names. - AdminHub folder payload: Add/Edit folder modals and the folder mutation type send
statusinstead ofis_active;EditFolderModalparses tenant/subtenant IDs and sendsnullto explicitly clear, omitting the field when unchanged. - Vendor task detail:
tasks/[taskId]/page.tsxclamps stats to non-negative integers with task-level fallbacks and derives progress when the API omits it;TaskFileListfalls back throughconversion_status → upload_status → statusand shows a "Pending" badge;TaskProgressBarclamps to 0–100;TaskStatsGridstabilizes the success-rate denominator; new optionalstatus/upload_statusfields added toTaskFileItem.
Risk & mitigation
Low to moderate, and well-suited to QA validation. The Admin entity-to-tenant API path change depends on the backend exposing /v1/tenants/tenant-types; if that endpoint is not live, tenant-type dropdowns could fail to load. The folder is_active→status field rename must match the backend contract or folder status saves could be ignored. Mitigations: backward-compatible aliases preserve old hook/route names during migration, vendor changes are defensive (fallbacks only, no behavior change when data is complete), and the change set is isolated to admin, mail adminhub, and vendor task-detail surfaces.
QA validation focus
- On the Admin dashboard, confirm "View All Tenants" opens
/tenantsand the "Create Tenant" quick action opens/tenants?action=create. - On
/tenants, verify the header title shows "Tenants" and the breadcrumb shows "Tenant Management / Tenants". - Verify tenant-type dropdowns load (resolution add/assign modals, share-within-system dialog) against the new
tenant-typesendpoint. - In AdminHub, edit a folder: toggle active/inactive and confirm it persists; set then clear a tenant and subtenant and confirm the association is removed.
- On a vendor task detail page, check that counts are never negative, the progress bar stays within 0–100%, files with no conversion status show "Pending", and the success rate looks correct for in-progress tasks.