-
Notifications
You must be signed in to change notification settings - Fork 229
feat(compass-assistant): connection error entrypoint COMPASS-9605 #7224
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: main
Are you sure you want to change the base?
Conversation
@@ -134,6 +165,8 @@ const openConnectionFailedToast = ( | |||
) => { | |||
const failedToastId = connectionInfo?.id ?? 'failed'; | |||
|
|||
// TODO: close the existing connection toast and make a new one for the |
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.
Not happy about this idea because it will cause some weird animations if we close the connection toast and immediately open it again. Still mulling it over, might address this stacking issue in a separate PR.
> | ||
<Home {...props}></Home> | ||
</CompassConnections> | ||
<CompassAssistantProvider> |
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.
CompassAssistantProvider has to wrap CompassConnections so that CompassConnections has access to it.
|
||
Error message: | ||
${connectionError}`, | ||
displayText: 'Provide an explanation of this connection error.', |
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.
I'm not sure if we want overriding displayText in this case. Connection errors aren't big like explain plans 🤔
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.
Oh wait there is actually design for this https://www.figma.com/design/ygGZcSTLaiqmNfgEsK0Feq/EXPO-5133---Compass-AI-Assistant?node-id=4838-34952&t=r7s4k125pEQFvr7q-0
const connectionString = redactConnectionString( | ||
connectionInfo.connectionOptions.connectionString | ||
); | ||
const connectionError = error.toString(); |
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.
Do we want more than just the error as a string?
some TODOs, needs tests.