Repository navigation
feat(contact-center): add Granular Agent State V2 widget (WXCC-15791) - #761
ashish-cisco wants to merge 5 commits into
Conversation
- Add new @webex/cc-granular-agent-state widget package with r2wc web component - Add GranularAgentState component to cc-components (channel avatars, state menu, manage-channel-availability panel) - Extend store with V2 surface: isGranularAgentStateActive, channelStatesMap, refreshAgentStateControl() - Wire V2 events in storeEventsWrapper: handleChannelStateChange, handleChannelStateChangeFailed, bootstrapSession relogin recovery - Register widget-cc-granular-agent-state in cc-widgets wc.ts - Add V1/V2 coexistence guard in user-state helper - Update sample app with V2 widget integration - Add feature spec, design, contracts, tasks, implementation plans, and test strategy - yarn.lock: updated for new workspace package
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c5015aac8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
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: 68fe523caa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53f2eb7306
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
- Filter the platform ENGAGED code from selectable idle reasons and fallback selection - Add coverage for selectable and fallback idle-code filtering - Align WXCC-15791 AI docs with the profile-based SDK gate, sample integration, store types, and Manage Apply error behavior - Correct stale test notes, implementation statuses, and broken documentation links - Document the V1 response timestamp guard while clarifying that its UI flow remains unchanged
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: abdd72730e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const manifest = readCandidates(candidateDirectory); | ||
| const candidates = manifest.filter((entry) => entry.name.startsWith('@webex/cc-')); | ||
| if (candidates.length !== 9) throw new Error('Expected all nine Contact Center package archives.'); | ||
| if (candidates.length !== 10) throw new Error('Expected all ten Contact Center package archives.'); |
There was a problem hiding this comment.
Update the consumer-build instructions for the tenth archive
The custom-candidate instructions in ai-docs/CONSUMER_BUILDS.md:81–82 still require nine Contact Center archives, but run() now rejects that documented package count before invoking its installation/build steps. The current release sequence at line 40 also still describes nine packages. Update the standing doc to include the new @webex/cc-granular-agent-state archive alongside this change, as required by the root AGENTS.md “Spec-currency” rule.
AGENTS.md reference: AGENTS.md:L68-L68
Useful? React with 👍 / 👎.
…indings Widget: - Add compact pill mode with ResizeObserver for label overflow - Use capture-phase mousedown to close panel reliably - Wrap onStateChange callback in try/catch Fixes: - Fix WC sample typo in lastIdleCodeChangeTimestamp property access - Update WC sample CDN from webex@3.8.0 to webex@3.13.0 - Add missing onToggleMute to CallControl WC prop definitions - Remove console.log from Store singleton Cleanup: - Remove completed WXCC-15791 feature planning docs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 43d30c3fb2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| onEnd: 'function', | ||
| onWrapUp: 'function', | ||
| onRecordingToggle: 'function', | ||
| onToggleMute: 'function', |
There was a problem hiding this comment.
Document the newly exposed Web Component mute callback
For Web Component consumers, this change exposes onToggleMute on both widget-cc-call-control and widget-cc-call-control-cad, but ai-docs/CONTRACTS.md:24–25 and the cc-widgets spec's public-surface table still enumerate only the previous four callbacks. Neither contract documents the new callback or its {isMuted: boolean, task: ITask} payload, leaving hosts without the integration signature for this newly supported property. Update those entries alongside the prop maps, as required by the root AGENTS.md Spec-currency rule.
AGENTS.md reference: AGENTS.md:L68-L68
Useful? React with 👍 / 👎.
Summary
Adds the widget-side support for Granular Agent State V2, providing a
per-channel state management UI (telephony, chat, email, social) that
coexists with the existing V1
UserStatewidget. This is the companionto the SDK-side PR in
webex-js-sdk.JIRA
WXCC-15791
Changes
New Package —
@webex/cc-granular-agent-statepackages/contact-center/granular-agent-state/widget-cc-granular-agent-state) wrapping the ReactGranularAgentState component
helper.tshooks:useGranularAgentState,useChannelStates,useAgentStateControl— subscribe to store V2 surface and dispatchchannel-level state changes via the SDK
New UI Components —
@webex/cc-componentspackages/contact-center/cc-components/src/components/GranularAgentState/GranularAgentStateManageChannelAvailabilityGranularStateMenuChannelStatePreviewChannelAvatargetChannelIcon,getStateColor,formatChannelLabel,buildChannelStatePayloadStore V2 Surface —
@webex/cc-storeisGranularAgentStateActivebooleangetterchannelStatesMapMap<ChannelType, ChannelState>agentStateControlStatusAgentStateControlStatusrefreshAgentStateControl()storeEventsWrapper.ts: wiresAGENT_CHANNEL_STATE_CHANGED,AGENT_CHANNEL_STATE_CHANGE_FAILED,AGENT_CHANNEL_AVAILABILITY_CHANGED,and session relogin recovery into the store
V1 / V2 Coexistence —
@webex/cc-user-statehelper.ts: whenisGranularAgentStateActiveis true, the V1UserStatewidget hides its state-change controls and defers to the V2widget
Widget Registration —
@webex/cc-widgetsindex.ts+wc.ts: registerwidget-cc-granular-agent-statewebcomponent alongside existing widgets
package.json: add@webex/cc-granular-agent-stateworkspace dependencySample App
samples-cc-react-app: conditionally renders theGranularAgentStatewidget when V2 session is active; Webpack alias added for the new package
AI Docs
task breakdown (W1–W3), implementation plans, and test strategy
ARCHITECTURE.md,CONTRACTS.md,GLOSSARY.md,SERVICE_STATE.md,SPEC_INDEX.mdTesting
@webex/cc-granular-agent-state(widget + hooks)@webex/cc-componentsGranularAgentState components & utils@webex/cc-store(V2 store getters + mutations)storeEventsWrapperV2 event wiring tests@webex/cc-user-state(V1/V2 coexistence guard)yarn.lockupdated for the new workspaceDependencies
webex-js-sdkcommitd2ddc637b3on the same branch(
feature/WXCC-15791-Support-Granular-Agent-State)Breaking Changes
None - V2 widget only renders when the SDK session is pinned to V2 via the
manageChannelAvailabilityprofile flag. Existing V1UserStatewidgetbehavior is unchanged for V1 sessions.
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.