fix(task-refactor)migrate widgets to SDK state-machine-driven uiControls#668
fix(task-refactor)migrate widgets to SDK state-machine-driven uiControls#668akulakum wants to merge 1 commit intowebex:task-refactorfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2227d693dc
ℹ️ 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".
| if (lastWrapupAuxCodeIdRef.current) { | ||
| const wrapUpReason = store.wrapupCodes.find((code) => code.id === lastWrapupAuxCodeIdRef.current)?.name; | ||
| if (onWrapUp) { |
There was a problem hiding this comment.
Restore onWrapUp callback for SDK-driven wrapups
wrapupCallCallback now emits onWrapUp only when lastWrapupAuxCodeIdRef.current is present, but that ref is only set in wrapupCall(). As a result, wrapups triggered outside this path (for example auto-wrapup or other SDK-driven/task-synced wrapup events) will fire TASK_WRAPPEDUP but never notify consumers via onWrapUp, which breaks callback-based integrations such as analytics or workflow hooks.
Useful? React with 👍 / 👎.
| </div> | ||
| </> | ||
| )} | ||
| {!controls?.wrapup?.isVisible && isInteractionOnHold(currentTask) && ( |
There was a problem hiding this comment.
Keep consult-state gating for the CAD hold indicator
The hold badge now depends only on isInteractionOnHold(currentTask), which becomes true when either the main leg or consult leg is held. During consult/conference flows one leg is often intentionally held while the agent is active on the other, so this change can incorrectly show an ON HOLD status. The previous logic gated this by consult-state flags, and removing that gating regresses status accuracy.
Useful? React with 👍 / 👎.
COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7779
This pull request addresses
The CC Widgets currently compute button visibility and enablement on the widget side using a complex combination of deviceType, featureFlags, conferenceEnabled, task state flags, and ~22 visibility functions in getControlsVisibility(). This approach duplicates logic that the SDK now handles internally through its state-machine-driven task.uiControls — a property on the ITask object where each of the 17 controls has { isVisible: boolean, isEnabled: boolean } computed from TaskState and TaskContext. This PR migrates all task widgets to consume task.uiControls as the single source of truth, eliminating widget-side control computation and aligning with the SDK's new architecture.
by making the following changes
Core migration — SDK uiControls as single source of truth:
Props removed (SDK handles internally):
Props restored (application-level overrides, not feature flags):
Hold state handling:
Transfer button mapping fix:
Type and Web Component updates:
Migration documentation:
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.