Fix/call analytics schema patches#332
Merged
Merged
Conversation
…ytics duration Backend: - SchemaPatchRunner: add V70a/b (rename stripe_customer_id → payment_customer_id), V71 (rename stripe_subscription_id → payment_subscription_id), V72 (drop NOT NULL on payment_subscription_id), V72b (drop NOT NULL on stripe_subscription_id to fix payment insert failure when old column still exists on prod DB), V73 (add transcription_status to call_recordings) - PostCallTranscriptionService: build speaker label map dynamically from CALL_JOIN telemetry so conference calls with 3+ participants get Speaker 1/2/3 labels instead of marking the 3rd person as Unidentified Speaker Frontend: - post_call_telemetry_summary_screen: anchor _callStart/_callEnd to CALL_JOIN / CALL_END events instead of first/last telemetry event, fixing inflated duration display and misaligned sentiment percentages on the analytics page
CareConnect Quality Gate Report
CareConnect — Security & Quality Analysis ReportReport Header
All timestamps are reported in Coordinated Universal Time (UTC). Pull Request
Commit Details
Legend
Tool Results Summary
Full artifact bundle available in the workflow run artifacts. |
cbmahoney
approved these changes
Mar 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Schema patches (V70–V73): Added missing DB migrations to SchemaPatchRunner so the production Aurora instance picks them up on restart — renames stripe_customer_id → payment_customer_id and stripe_subscription_id → payment_subscription_id, drops NOT NULL on payment_subscription_id, and adds transcription_status column to call_recordings. Also adds V72b to drop NOT NULL on the legacy stripe_subscription_id column if it still exists on prod, fixing a payment insert failure.
Conference call speaker labels: PostCallTranscriptionService now queries CALL_JOIN telemetry events to determine how many participants were on the call and dynamically maps spk_0 → Speaker 1, spk_1 → Speaker 2, spk_2 → Speaker 3, etc. Previously hardcoded to 2 speakers, causing the 3rd participant on a conference call to always show as "Unidentified Speaker."
Call analytics duration & sentiment fix: post_call_telemetry_summary_screen.dart now anchors _callStart / _callEnd to CALL_JOIN / CALL_END typed events instead of the first and last telemetry record. Pre- and post-call sentiment samples were inflating the displayed duration (e.g. 44:31 instead of 19:24), which also skewed all sentiment percentages and timeline positions on the analytics page.