fix(cc-task): delegate consult transfer list policy to SDK (CAI-8354) - #736
fix(cc-task): delegate consult transfer list policy to SDK (CAI-8354)#736rsarika wants to merge 7 commits into
Conversation
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ae5a6c414
ℹ️ 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".
| {CATEGORY_AGENTS} | ||
| </Button> | ||
| {allowConsultToQueue && ( | ||
| {isAgentsTabVisibleFlag && ( |
There was a problem hiding this comment.
Stop rendering a hidden Agents category
When accessBuddyTeam is NONE, this condition hides only the Agents button; selectedCategory still initializes to Agents, and the list body still renders buddyAgents whenever that category is selected. Consequently, opening the popover can display and allow selection of agents that the desktop profile explicitly hides. Initialize the selection to the first visible category or also gate agent loading and rendering on isAgentsTabVisibleFlag.
Useful? React with 👍 / 👎.
| import {CallControlProps} from '../task.types'; | ||
| import {CallControlComponent} from '@webex/cc-components'; | ||
| import {isUnacceptedCampaignPreview} from '../Utils/task-util'; | ||
| import {ITask} from '@webex/contact-center'; |
There was a problem hiding this comment.
Import task types through the store boundary
Import ITask from @webex/cc-store rather than directly from @webex/contact-center in this widget shell and the matching CallControlCAD shell. The store already re-exports this type, and these new imports bypass the repository's required store-only SDK boundary, coupling a widget package that does not declare the SDK dependency directly to the SDK.
AGENTS.md reference: AGENTS.md:L59-L62
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7395d5788d
ℹ️ 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".
| consultTransferDestinations: { | ||
| consult: | ||
| overrides?.consultTransferDestinations?.consult ?? | ||
| base.consultTransferDestinations.consult, |
There was a problem hiding this comment.
Add destination arrays to the Jest SDK defaults
In the @webex/cc-task and @webex/cc-store unit suites, tests/setupContactCenterMock.js mocks getDefaultUIControls() with only activeLeg, main, and consult. Consequently, the many tests that call createMockTaskUIControls() reach this dereference with base.consultTransferDestinations undefined and throw before their assertions run. Update both SDK mocks to include the consult/transfer destination arrays, or make this fixture provide a safe fallback.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3cc7a18f13
ℹ️ 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".
| const agents = await store.getBuddyAgents(action); | ||
| logger.info(`Loaded ${agents.length} buddy agents`, {module: 'helper.ts', method: 'loadBuddyAgents'}); | ||
| setBuddyAgents(agents); |
There was a problem hiding this comment.
Prevent stale agent loads after action switches
When an agent opens Consult and then opens Transfer before the Consult request finishes, both requests update the same buddyAgents state without checking which action is still active. If the Consult response resolves last, the Transfer popover displays the Consult-eligible population and allows selecting an agent the SDK excluded from transfers; an earlier request failure can similarly erase the current result. Track the latest action/request and ignore stale completions, or cancel the previous request.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e9b5ccbb0
ℹ️ 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".
| ...(filter ? {filter} : {}), | ||
| ...(params ?? {}), |
There was a problem hiding this comment.
Preserve the task channel filter when merging parameters
When a non-telephony task is active and a direct @webex/cc-store caller supplies params.filter, spreading params after the generated filter overwrites the complete queueType/channelType/active predicate. The SDK request can therefore return queues for the wrong task channel; the same merge ordering is repeated in getEntryPoints. Combine the predicates or otherwise ensure the task-scoping filter cannot be replaced.
Useful? React with 👍 / 👎.
…g-queue-transfer-epic-cti # Conflicts: # packages/contact-center/cc-components/ai-docs/cc-components-spec.md # packages/contact-center/store/tests/util.ts
COMPLETES CAI-8354
This pull request addresses
The embedded Contact Center widgets showed Consult/Transfer destination lists in a different order from Agent Desktop and duplicated policy that belongs in the SDK.
Depends on SDK: webex/webex-js-sdk#5179.
Changes
ConsultorTransferaction through initial loading and reloads.Impact
Agents, dial numbers, queues, and entry points now use SDK defaults out of the box. Widgets no longer make reusable ordering or eligibility decisions; consumers needing supported custom behavior can pass explicit SDK options.
Validation
Change Type
GAI Coding Policy