fix(cc-task): align consult/transfer tabs and lists with agent desktop (CAI-8354) - #733
fix(cc-task): align consult/transfer tabs and lists with agent desktop (CAI-8354)#733akulakum wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b92884739
ℹ️ 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.
Select a visible category when Agents is hidden
When accessBuddyTeam is NONE, this removes the Agents button but the hook still initializes selectedCategory to Agents and the list rendering at line 254 is not gated by isAgentsTabVisibleFlag. The popover therefore opens with no visible active tab and can still display/select any preloaded buddy agents despite the profile restriction; initialize the selection to the first permitted category and gate the Agents content as well.
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.
Route the new task type through the store
Both CallControl widget shells now import ITask directly from @webex/contact-center, bypassing the store boundary and coupling the widget layer to the SDK. Use the ITask type already exported by @webex/cc-store, or derive this context in the store/hook, so SDK changes remain isolated.
AGENTS.md reference: AGENTS.md:L61-L62
Useful? React with 👍 / 👎.
| const response = await this.store.cc.getQueues({ | ||
| ...(params ?? {}), | ||
| desktopProfileFilter: true, | ||
| } as ContactServiceQueueSearchParams); |
There was a problem hiding this comment.
Use a typed SDK contract for desktopProfileFilter
The new queue and entry-point calls force desktopProfileFilter through assertions to SDK parameter types that do not declare it, suppressing the contract check for both endpoints. If the pinned SDK does not support or serialize this flag, the requested profile filtering is silently ineffective; update and verify the SDK surface or add a verified typed adapter instead of asserting the objects.
AGENTS.md reference: AGENTS.md:L56-L57
Useful? React with 👍 / 👎.
| /** Desktop Profile collaboration access for queues */ | ||
| accessQueue?: string; | ||
|
|
||
| /** Desktop Profile collaboration access for entry points */ | ||
| accessEntryPoint?: string; | ||
|
|
||
| /** Desktop Profile collaboration access for buddy teams */ | ||
| accessBuddyTeam?: string; |
There was a problem hiding this comment.
Update the owning cc-components spec
This adds collaboration-access props and changes Consult/Transfer tab behavior in cc-components, but the commit updates only the store and task specs; packages/contact-center/cc-components/ai-docs/cc-components-spec.md remains unchanged. Document the new props, visibility rules, and access behavior in the owning module spec in this change.
AGENTS.md reference: AGENTS.md:L68-L68
Useful? React with 👍 / 👎.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
COMPLETES CAI-8354
This pull request addresses
In Epic CTI (embedded cc-widgets), the Consult/Transfer popover did not match Agent Desktop:
consultToQueueis off butaccessQueueisSPECIFIC).accessEntryPoint,accessBuddyTeam).desktopProfileFilter, so results could include items outside the agent's desktop profile.Root cause: widgets did not consume SDK profile collaboration access flags or pass
desktopProfileFilteron list fetches.Depends on SDK: webex/webex-js-sdk#5157 (profile flags +
EntryPointSearchParams.desktopProfileFilter).by making the following changes
Store (
@webex/cc-store)accessQueue,accessEntryPoint, andaccessBuddyTeamfrom agent profile on the MobX store.desktopProfileFilter: trueingetQueues()andgetEntryPoints()SDK calls.storeEventsWrapperfor widgets.cc-components
consult-transfer-tab.utils.tswith Agent Desktop–aligned tab visibility rules:accessBuddyTeam !== NONEaccessQueue !== NONE+ direction/consultToQueue/outdialTransferToQueueEnabledgating for voiceshowEntryPointTab+ voice +accessEntryPoint !== NONECallControl→ConsultTransferPopover.Task widgets (
@webex/cc-task)CallControlandCallControlCAD.Docs
store-spec.mdandtask-spec.md(spec-currency).Out of scope (deferred)
sortBy/sortOrdervssort=name,ASC). No client-side sort added in this PR.Change Type
The following scenarios were tested
yarn workspace @webex/cc-components test:unit— consult-transfer tab utils, popover unit/snapshot testsyarn workspace @webex/cc-store test:unit --testPathPattern=storeEventsWrapper— profile flags,desktopProfileFilteron queue/EP fetchesyarn workspace @webex/cc-task test:unit(CallControl paths)yarn test:styles— eslint/prettier pass on touched packagesThe GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.