Summary of work done

Extended Sam's Operations Center with a read-only Litify/Salesforce live data path. The app now has src/lib/dashboard-data.ts as the live-or-mock provider, src/lib/adapters/litify-salesforce.ts as the aggregate adapter, and /api/dashboard-data as the dashboard data endpoint.

Live mode is enabled with COMMAND_CENTER_DATA_MODE=live and expects the sf CLI alias LITIFY_ORG, or LITIFY_ORG_ALIAS if overridden. The live adapter uses aggregate, read-only SOQL only. It does not pull client-sensitive detail rows.

Live validated against LITIFY_ORG, org 00D5e000005AnDpEAK, user sam@kylawoffice.com, instance https://samaguiarinjurylawyers2.my.salesforce.com. Current live object volumes confirmed: 49,680 Intakes, 16,555 Matters, 13,985 CallRail call logs, 1,050 Monthly Marketing Spend rows, and 1,098 Review records.

Live cards now show 13 new leads today, 383 leads MTD, 81 signed intakes MTD, 97 Matters opened MTD, 22 CallRail calls today, 396 CallRail logs linked to intakes MTD, and $31,378 current-month Litify marketing spend. The app flags 41 current-month intakes missing Source and 186 current-month intakes missing Case State. It also labels attribution fields QA-only: 46 intakes with GCLID, 45 with UTM Source, and 1 with Exact Source MTD.

Non-Litify connectors are now marked connector pending in live mode so mock values do not look like current source data. This was corrected after browser QA showed stale mock cards could otherwise appear too official.

Commit pushed: faef0f1 Add read-only Litify live data path at https://github.com/samaguiar1982-cpu/sail-command-center/commit/faef0f1.

Reason for session ending

The read-only Litify MVP path is implemented, pushed, and verified. Next work should either persist these aggregates into Postgres sync tables or add the next live connector, likely CallRail or Google Ads.

Verification

npm test passed: 10 tests in 4 files. npm run lint passed. npm run build passed. /api/dashboard-data returned mode: live with live_error: null. /api/health returned data_mode: live and connector summary. Browser QA used Playwright because the Browser/IAB tool was not available in this turn. Desktop and mobile screenshots were saved at /Users/samaguiar/Documents/Projects/Repos/sail-command-center/artifacts/qa/2026-05-23/live-litify-1920x1080.png and /Users/samaguiar/Documents/Projects/Repos/sail-command-center/artifacts/qa/2026-05-23/live-litify-mobile-390x844.png. The accepted concept and latest screenshots were inspected with view_image.

Known package advisory remains: npm audit --audit-level=moderate reports two moderate Next/PostCSS advisories, and the forced fix would downgrade Next to 9.3.3, so it was not applied.

Handoff for a future agent

Start in /Users/samaguiar/Documents/Projects/Repos/sail-command-center; git status should be clean on main. Run live mode with COMMAND_CENTER_DATA_MODE=live npm run dev -- --hostname 127.0.0.1 --port 3007. Read README.md, docs/architecture.md, src/lib/dashboard-data.ts, and src/lib/adapters/litify-salesforce.ts first.

Keep the adapter aggregate-only until an explicit detail-row requirement exists. Do not rely on UTM, GCLID, or Exact Source as KPI sources yet; they should stay QA signals. The next useful build is to move this read path into a real sync-run model with Postgres, then wire CallRail and Google Ads as separate connectors. A hosted deployment should not proceed without explicit approval because the Google ADK deploy skill requires approval before deploy and this app will eventually expose firm operating data.

Importance: High. Status: Live Litify read path complete, persistence and additional connectors pending.