-
Notifications
You must be signed in to change notification settings - Fork 62
feat(call-control): enhance agent name display logic in multi-agent conferences #585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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 result = getControlsVisibility(deviceType, featureFlags, task, 'agent1', true); | ||
|
|
||
| // End button should be enabled when switched back to main call from consult | ||
| expect(result.end.isEnabled).toBe(true); | ||
| expect(result.end.isVisible).toBe(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End button stays disabled after consult is put on hold
The newly added consult scenarios expect the main End button to become enabled once the consult leg is on hold (e.g., after switching back to the main call), but getEndButtonVisibility still unconditionally disables End whenever any consult is in progress (!isConsultInitiatedOrAcceptedOrBeingConsulted), regardless of whether the consult media is on hold. With the data in this test (consult mType held, main call active), the function currently returns isEnabled: false, so this test will fail and the agent still cannot hang up the main call after returning from a consult. Consider updating the End-button logic to account for the consult hold status before expecting it to be enabled.
Useful? React with 👍 / 👎.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
| const [consultTimerLabel, setConsultTimerLabel] = useState<string>(TIMER_LABEL_CONSULTING); | ||
| const [consultTimerTimestamp, setConsultTimerTimestamp] = useState<number>(0); | ||
| const [lastTargetType, setLastTargetType] = useState<'agent' | 'queue'>('agent'); | ||
| const [lastTargetType, setLastTargetType] = useState<'agent' | 'queue' | 'entryPoint' | 'dialNumber'>('agent'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace the inline union type
useState<'agent' | 'queue' | 'entryPoint' | 'dialNumber'>
with a shared enum or constant-based TargetType to avoid string duplication, improve type safety, and make future refactors safer.
| (participant as Participant).pType === 'Agent' && (participant as Participant).id !== myAgentId | ||
| ); | ||
| // For Entry Point or Dial Number consults, check if destination agent has joined | ||
| if (lastTargetType === 'entryPoint' || lastTargetType === 'dialNumber') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add enum or constant-based TargetType to avoid string duplication
akulakum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
COMPLETES #CAI-7461
This pull request addresses
Consulting agent / EP / DN names are incorrect after an MPC
by making the following changes
Fix name enumeration logic
Vidcast: https://app.vidcast.io/share/e38ade5c-6537-45ec-81b7-c4d97a2fbb33
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.