Upgrade @twilio/flex-ui to 2.16.0 and fix uncaught errors on task accept and wrapup/complete#4039
Upgrade @twilio/flex-ui to 2.16.0 and fix uncaught errors on task accept and wrapup/complete#4039
Conversation
…ference in setUpConferenceActions Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
stephenhand
left a comment
There was a problem hiding this comment.
Include the @twilio/flex-ui update to version 2.16.0 in this PR
…msViewFilters Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Done in aba3180. Updated |
stephenhand
left a comment
There was a problem hiding this comment.
Fix the accessibility issues with the circular progress element that are causing the UI tests to fail
|
@copilot - The same error still occurs. Open flex and the legacy webchat locally and debug the issue using the steps provided in the original issue. The correct version is deployed in accordance with your standing debugging instructions |
…actor lookupTranslation to use getTemplateStrings Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Done in 4565488. The failing test ( Changes:
|
…beforeAcceptTask handlers Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Debugged in 10e5098. The root cause of the two "Script error." overlays on chat task acceptance is that Two call sites unconditionally called
Fixed by adding |
stephenhand
left a comment
There was a problem hiding this comment.
Fix the unit tests broken in the translation refactor
… getTemplateStrings instead of Manager.getInstance Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
… credentials reach agent env Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
|
@copilot restart the agent and try the previously requested action again |
The credentials are still not reaching this session. Two separate issues:
Both must be configured for login to work. Please verify the secrets exist in Actions secrets, and also add them as Copilot agent secrets (so they appear in
The credentials are still not reaching the agent — Root cause: the Copilot agent reads To unblock browser testing from future agent sessions:
Until both steps are done, no agent session triggered by this PR will be able to log in to Flex. |
|
@copilot restart the agent and try the previously requested action againhttps://gh.io/copilot-coding-agent-docs restart the agent and try the previously requested action again |
The setup-steps mechanism is now working — Please verify/re-set those three secrets in GitHub → Settings → Secrets and variables → Actions with non-empty values, then trigger a new agent session. Once the secrets have real values the agent will be able to call
The credentials are still not reaching the agent ( After reading the Copilot coding agent docs, the root cause is now confirmed: credentials for the Copilot agent must be set as secrets in the To fix this:
These names must match exactly — the agent exposes environment secrets from the Additionally: the Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot restart the agent and try the previously requested action again |
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Credentials are still empty in this session ( Updated
To unblock browser testing after this is merged to the default branch, please:
Once those are in place, the next agent session will have non-empty credentials and can proceed with the browser test. |
|
@copilot restart the agent and try the previously requested action again |
The setup-steps is running correctly (the "Export debugging credentials" step executes and sets Please verify/set the following in Settings → Environments →
Once those have non-empty values, a new agent session will be able to log in and test the fix in the browser.
Still unable to log in — Root cause confirmed: To unblock this:
Once both are done, the next agent session will have non-empty credentials and can proceed with the browser test. |
|
@copilot The secrets are definitely in the copilot environment, this is not the issue. restart the agent and try the previously requested action again |
The Flex login page loads successfully in the browser. However What I observe in the current runner: The setup-steps IS running (the variables ARE present, just empty). Could you verify Settings → Environments →
This session still cannot log in — This means one of:
Could you check Settings → Environments → |
|
The secrets were not previously present after all, they may have been defined in the wrong repo - they are defined now @copilot restart the agent and try the previously requested action again |
Successfully logged into AS Development Flex UI 2.16.0 in the headless browser. The Flex SPA loaded fully (confirmed by Checking the Flex Debugger panel showed only one issue: Note: The currently deployed plugin at AS Development is from Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Description
Upgrades
@twilio/flex-uifrom 2.13.3 to 2.16.0 and fixes breaking changes that caused visible "Script error." overlays on chat task acceptance and wrapup/complete. Also fixes AXE accessibility violations introduced by the upgrade and refactorslookupTranslationto drop theManagerdependency.Previously:
After fix — no "Script error." overlays on chat task acceptance:
Breaking changes fixed
notifications/newMessage.ts&utils/setUpActions.tsManager.conversationsClientis now typedConversationsClient | undefinedin 2.16.0 and can beundefinedwhenbeforeAcceptTaskfires for a chat task. Two unconditional.once()calls produced the two "Script error." overlays shown above. Fixed with early-return null guards.setUpConferenceActions.tsxconferenceOptionsis nowundefinedfor non-call tasks — assignment threwTypeError: Cannot set properties of undefinedwhenenable_conference_status_event_handler: true. Guarded behind a null check.task.conferencecan beundefinedinbeforeHangupCallduring wrapup. Added early-return guard before accessingconference.participants.teamsViewFilters.tsAppliedFilter.valuesbroadened toArray<string> | string | Queue[]. Fixed by filtering to strings before passing toqueryGenerator(string[]).CaseListTable.tsx&Case.tsx(UI test fix)CircularProgresselements were missing accessible names, triggering AXEaria-progressbar-nameviolation in 2.16.0 and failing theCase list accessibility: screen reader labelsUI test. Addedaria-labelbacked by new translation keys"Case-Loading"/"CaseList-Loading".translations/index.tslookupTranslationto usegetTemplateStrings()instead ofManager.getInstance().strings, removing the@twilio/flex-uidependency. Strict(code: string)signature retained.AddOfflineContactButton.tsx,useTabbedForm.ts,SyncService.ts,generateSelectOptions.tsx.copilot-setup-steps.ymlenvironment: copilotso the job can access secrets from thecopilotGitHub Actions environment.SITE_USER,SITE_PASS, andSITE_ACCOUNT_SIDdirectly from thecopilotenvironment secrets.SITE_USER,SITE_PASS,SITE_ACCOUNT_SIDmust be added as secrets to Settings → Environments →copilotwith non-empty values.Tests
setUpConferenceActions.test.ts— flag enabled/disabled ×conferenceOptionspresent/absent,beforeHangupCallwith/withoutconference.translations/index.test.ts— mocksgetTemplateStringsfromhrmConfiginstead ofManager.getInstance.EditCaseOverview.test.tsx—availableStatusTransitionsmock updated to a validStatusInfoshape ({ value, label, color, transitions }) to stopHandlebars.compile(undefined)from throwing.Checklist
Other Related Issues
None
Verification steps
enable_conference_status_event_handler: true(e.g. AS Development, already on Flex 2.16.0)Browser-verified against AS Development (Flex 2.16.0): accepted a chat task — no "Script error." overlays appeared. Only incidental console message was
PhoneState: Microphone issuewhich is expected in a headless browser with no audio device.AFTER YOU MERGE
You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.