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 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:
|
# Conflicts: # .github/instructions/plugin-hrm-form.instructions.md
|
@copilot - I have updated the instructions and environment secrets so you can run a local version which should reproduce the error. restart the agent and try the previously requested action again |
# Conflicts: # .github/instructions/plugin-hrm-form.instructions.md
|
@copilot - I have updated the instructions with a secret.js file you can use, so you can run a local version which should reproduce the error. restart the agent and try the previously requested action again |
Successfully got the local dev server running with the fix applied (webpack compiled the plugin at http://localhost:3000). Okta SSO login credentials were submitted via the browser — the session is authenticating. The local dev server setup required: proper Note: this agent session is ending before the Flex UI fully loaded after login. In the next session the browser can proceed directly to verifying that accepting a chat task no longer produces "Script error." overlays — the null guards on 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:
|
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
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 — two "Script error." overlays appear on chat task acceptance:
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.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)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.