fix(store): update task-refactor with latest next 27th May#688
fix(store): update task-refactor with latest next 27th May#688Shreyas281299 wants to merge 23 commits into
Conversation
…able releases (webex#661) Co-authored-by: Bharath Balan <62698609+bhabalan@users.noreply.github.com> Co-authored-by: Kesava Krishnan Madavan <mkesavan13@gmail.com>
Co-authored-by: Shreyas Sharma <shreyassharma9912@gmail.com> Co-authored-by: Shreyas Sharma <72344404+Shreyas281299@users.noreply.github.com>
Co-authored-by: molker <molker@cisco.com>
Co-authored-by: Kesava Krishnan Madavan <mkesavan13@gmail.com>
Co-authored-by: ciscoRankush <ciscoRankush@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Rankush Kumar <rankkuma+cisco@cisco.com>
…coverage, and bug-fix pipeline (webex#636) Co-authored-by: Kesava Krishnan Madavan <mkesavan13@gmail.com>
…on [PSIRT-0974799192] (webex#676) Co-authored-by: Bharath Balan <62698609+bhabalan@users.noreply.github.com>
Co-authored-by: Christina Mullen <chrmulle@cisco.com>
…gn Select/Option (webex#665)
Co-authored-by: Matthew Olker <molker@cisco.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b68e6448d8
ℹ️ 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".
| // Inbound: ani = caller's number, dn = entry point dialed by caller | ||
| // Outdial: ani = agent's originating number (entry point), dn = customer's dialed number | ||
| const outboundType = currentTask?.data?.interaction?.outboundType; | ||
| const callerNumber = getCallerIdentifier(ani, dn, outboundType); |
There was a problem hiding this comment.
| CallControlComponentProps, | ||
| CallAssociatedDataMap, | ||
| getCallerIdentifier, | ||
| CallAssociatedDataMap, |
There was a problem hiding this comment.
Remove the duplicate imported symbol
CallAssociatedDataMap is now listed twice in the same import declaration, which creates a duplicate local binding and blocks TypeScript/Babel parsing of this module. Please keep a single import for each symbol before shipping this change.
Useful? React with 👍 / 👎.
| return liveTranscriptEntries; | ||
| } | ||
|
|
||
| return transcriptLines.map((line) => mapTranscriptLineToEntry(line, currentTaskId)); |
There was a problem hiding this comment.
Scope transcript rows to the active task
When an agent switches from one active task to another, store.realtimeTranscriptionData is not cleared by setCurrentTask, and this hook maps every stored transcript line to whatever currentTaskId is currently selected. That makes live transcript text from the previous call appear under the newly selected task until the old task is removed; filter/store transcript data by interaction/conversation before rendering it.
Useful? React with 👍 / 👎.
Co-authored-by: Christina Mullen <chrmulle@cisco.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ffb2ebfd68
ℹ️ 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".
| deviceType, | ||
| featureFlags, |
There was a problem hiding this comment.
Remove undefined call-control options
When CallControlInternal renders, these shorthand properties read deviceType and featureFlags, but neither name is declared in this module or destructured from store. That makes the widget fail to compile (or throw a ReferenceError before reaching the current-task guard in non-typechecked builds); these values are not part of useCallControlProps, so drop them or define them before passing props.
Useful? React with 👍 / 👎.
| deviceType, | ||
| featureFlags, |
There was a problem hiding this comment.
Remove undefined CAD call-control options
When CallControlCADInternal renders, these shorthand properties reference deviceType and featureFlags, but this file never declares them or pulls them from store. That blocks the task package build (or throws at render time before the null-task guard in non-typechecked builds); since useCallControl does not consume these props, remove them or explicitly define them.
Useful? React with 👍 / 👎.
| export function isCampaignPreviewTask(task: ITask): boolean { | ||
| const interaction = task.data?.interaction; | ||
| if (!interaction) return false; | ||
| const outboundType = interaction.outboundType ?? ''; | ||
| const cpd = interaction.callProcessingDetails as unknown as CampaignCallProcessingDetails; | ||
| const campaignType = cpd?.campaignType ?? ''; | ||
|
|
||
| return ( | ||
| CAMPAIGN_PREVIEW_OUTBOUND_TYPES.includes(outboundType) || CAMPAIGN_PREVIEW_CAMPAIGN_TYPES.includes(campaignType) |
There was a problem hiding this comment.
Import the campaign utility dependencies
This new exported helper uses ITask, CampaignCallProcessingDetails, and the campaign preview constants, but task-util.ts still only imports Interaction. Any import of isUnacceptedCampaignPreview (now used by both call-control widgets) therefore fails the task package build with unresolved symbols before the campaign-preview guard can work.
Useful? React with 👍 / 👎.
| const campaignType = cpd?.campaignType ?? ''; | ||
|
|
||
| return ( | ||
| CAMPAIGN_PREVIEW_OUTBOUND_TYPES.includes(outboundType) || CAMPAIGN_PREVIEW_CAMPAIGN_TYPES.includes(campaignType) |
There was a problem hiding this comment.
Import the outbound campaign constants
The predicate now checks CAMPAIGN_PREVIEW_OUTBOUND_TYPES, but the import at the top of this file only brings in CAMPAIGN_PREVIEW_CAMPAIGN_TYPES. Building or rendering TaskList with this module will fail on the unresolved constant, so import it from @webex/cc-store alongside the campaign-type constants.
Useful? React with 👍 / 👎.
COMPLETES #< INSERT LINK TO ISSUE >
This pull request addresses
< DESCRIBE THE CONTEXT OF THE ISSUE >
by making the following changes
< DESCRIBE YOUR CHANGES >
Change Type
The following scenarios were tested
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.