Date: 2026-05-13 (continuation of Attorney Hub - Payton: Session Export + Agent Handoff (2026-05-13))

Org: samaguiarinjurylawyers2.my.salesforce.com (Org Id 00D5e000005AnDpEAK) — production

CLI alias: LITIFY_TEMP

Local repo: C:\Users\SAguiar\Documents\Projects\litify-hubs\sfdx

Canonical app page: /lightning/n/Attorney_Hub_Payton


What This Session Shipped

Two bodies of work, both deployed to production with passing tests.

1. Data-quality fixes on the Overview tab

Three concerns from Sam were resolved by switching the underlying KPIs from report grand totals (which depended on report filter integrity) to direct SOQL queries inside AttorneyHubPaytonController.

Concern Root cause Fix shipped Live result
MTD Gross Recovery = R30 Gross Recovery Reports filtered correctly (THIS MONTH vs LAST 30 DAYS) but the 4/13–4/30 window had zero settlements, so values matched by data coincidence. Switched both to SOQL with explicit Closed_Date >= monthStart() and Closed_Date >= today - 30 so the calculation is transparent and will diverge naturally as data flows in. MTD $437,550, R30 $437,550 (same today, will diverge once a settlement falls outside the calendar month).
"Outcomes YTD" label unclear Report 00OUV00000BtWDt2AN counts matters where Closed_Reason != null for THIS YEAR — i.e. all closures regardless of reason. Renamed the key from outcomesYtd to closedYtd in Apex and relabeled the tile to "CLOSED YTD" (and the report rail label to "Closed Cases YTD"). closedYtd = 58.
Checks Pending = 91 with stale pre-2023-02-28 rows Report has no date floor; 81 of 91 rows are Resolutions dated 2022-04 through 2023-02-27 that never had Check_Received filled in. SOQL override on litify_pm__Resolution__c with litify_pm__Resolution_Date__c >= 2023-02-28 (stored as constant CHECKS_PENDING_FLOOR). checksPending = 10.

New Apex helpers added to AttorneyHubPaytonController:

Test class updated to assert the renamed closedYtd key. 1/1 test passing.

2. New Cases tab — editorial LWC live

The second tab of Attorney_Hub_Payton is no longer a raw embedded dashboard. It now hosts a custom LWC attorneyHubPaytonNewCases backed by AttorneyHubPaytonController.getNewCases(). Style mirrors the Overview tab (Aguiar blue #0B212D, accent orange #F89C22, editorial header bar, panel cards, sticky report rail).

What's on the tab, top to bottom:

  1. Header — "Payton Klatt · New Cases" with live timestamp + refresh.