fix+feat: morning QA fixes, worklist pagination, misc sidecar improvements

- caller-resolution: drop cache, use indexed phone filter (lead.contactPhone.primaryPhoneNumber.like)
- worklist: externalize page size (WORKLIST_PAGE_SIZE × WORKLIST_MAX_PAGES), paginate getMissedCalls/getAssignedLeads/getPendingFollowUps
- maint: unlock-agent, force-ready, backfill-caller-resolution, clear-analysis-cache, fix-timestamps
- ozonetel agent.service: force logout+re-login on "already logged in"
- ai chat: context expansion
- livekit-agent: updates
- widget: session handling
- masterdata: clinic list cache

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-15 06:49:02 +05:30
parent b6b597fdda
commit fbe782b5ac
17 changed files with 685 additions and 269 deletions

View File

@@ -99,17 +99,9 @@ export class LeadEnrichController {
);
}
// 5. Invalidate the caller cache so the next incoming call from
// this phone number does a fresh platform lookup (and picks
// up the corrected identity + new summary).
if (body?.phone) {
try {
await this.callerResolution.invalidate(body.phone);
this.logger.log(`[LEAD-ENRICH] Caller cache invalidated for ${body.phone}`);
} catch (err) {
this.logger.warn(`[LEAD-ENRICH] Failed to invalidate caller cache: ${err}`);
}
}
// Caller resolution no longer caches — every resolve() hits the
// platform fresh via an indexed phone filter. No invalidation
// needed after enrichment.
this.logger.log(`[LEAD-ENRICH] Lead ${leadId} enriched successfully`);