feat(chat): output init error for Duo Chat
Description
The changes in this MR introduce error-handling mechanisms to gracefully handle scenarios where the webview fails to initialize within a specified time. This is the second step in the course of Duo Chat: in the WebView, pass errors down to G... (#1229 - closed).
Previously, we have increased the timeout, which concludes a problem initializing the webview from 2 seconds to 5 seconds. This MR takes it one step further and increases this timeout to 10 seconds. If the webview fails to load within this timeout, an error message is displayed to the user clearly stating the cause of the failed Duo Chat.
Additionally, the web view application for Duo Chat now displays a loading indicator by default and renders the chat interface only when the application is ready and there was not loading error. These improvements provide a more user-friendly and reliable chat experience.
Since these things are tightly coupled to each other it makes sense to put all of them into the same MR.
Related Issues
Related to #1229 (closed)
How has this been tested?
- VSCode
- Web IDE
Screenshots (if appropriate)
Before | After |
---|---|
We showed the generic error if Web View was not initialized within 5 (after the previous fix) seconds: | We introduce two new states to Duo Chat webview: a) loading (while waiting for Web View), b) error (if Web View was not initialized in 10 seconds). Note, that we increase the timeout to 10 seconds in this MR |
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap