fix(cc): call recording pause resume fix - #727
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ac251a9f3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Mirrors the SDK's own precedence: isPaused wins when present, otherwise | ||
| // recordInProgress is the active recording signal. |
There was a problem hiding this comment.
Document the new recording-state precedence
Update the cc-components and task module specs to describe boolean normalization, isPaused precedence, and the recordInProgress fallback. The commit changes the recording-state contract and adds remount/refresh behavior tests, but leaves packages/contact-center/cc-components/ai-docs/cc-components-spec.md and packages/contact-center/task/ai-docs/task-spec.md unchanged, so the canonical documentation can no longer validate or protect this fix.
AGENTS.md reference: AGENTS.md:L68-L68
Useful? React with 👍 / 👎.
| store.setDeviceType('BROWSER'); | ||
| store.store.featureFlags = {isEndCallEnabled: true, isEndConsultEnabled: true, webRtcEnabled: true}; | ||
| store.store.logger = { | ||
| log: jest.fn(), |
There was a problem hiding this comment.
Reset the store singleton after each recording test
Add per-test teardown that restores or resets the store singleton. This suite mutates cc, agentId, featureFlags, currentTask, and taskList, while every fake task reuses the same interaction ID; consequently later cases begin with the previous task and can take the isSameTask path during promoteTask, making results order-dependent and allowing stale state/listeners to mask regressions.
AGENTS.md reference: AGENTS.md:L87-L88
Useful? React with 👍 / 👎.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-8389
This pull request addresses
The CallControl recording toggle could display the wrong action after a recording was paused or resumed. The Contact Center SDK normalizes
callProcessingDetails.isPausedto a boolean, but the widget compared it with the string"true". As a result, a booleantruevalue could be interpreted as an active recording, leaving the control on Pause Recording instead of Resume Recording. The state could remain incorrect after later task updates or a widget remount.Vidcast: https://app.vidcast.io/share/c1fb7f9e-b343-4c44-bcc3-236f300ab403
by making the following changes
isPausedandrecordInProgressvalues from both SDK booleans and legacy"true"/"false"strings.isPausedas the primary recording-state signal and fall back torecordInProgresswhenisPausedis absent.Change Type
The following scenarios were tested
yarn workspace @webex/cc-components test:unit --runInBand— 49 suites passed; 813 tests passed, 4 skipped; 228 snapshots passed.yarn workspace @webex/cc-task test:unit --runInBand— 11 suites and 260 tests passed.The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.