neo4j / cypher-language-support

Neo4j's Cypher Language support
https://neo4j.github.io/cypher-language-support/
Apache License 2.0
32 stars 7 forks source link

Adding connection state to database side panel #226

Closed daveajrussell closed 4 months ago

daveajrussell commented 4 months ago

This PR introduces connection state to the database side panel.

At the moment, the side panel is fairly basic and will simply show a state for connected, even if under the hood the connection has failed.

In this change, the side panel becomes much smarter and hooks into newly emitting events from the underlying driver/database connection. The side panel will update itself when a database connection drops, when it reconnects and when it gives up trying to connect to the database.

Also introduced is instant connection status feedback when adding/editing/connecting to/toggling a Connection.. whether this is bad auth, a non existent database or an unreachable server.

In the side panel, when you connect to a connection you are first presented with a "Connecting" state.. the label next to the connection will briefly read connecting... until the connection promise resolves, at which point we switch the label to connected and show a success info message.

For connections that error (and are retriable), we will show a reconnecting... label and an accompanying warning message.

For connections that fail, we will remove the connecting state entirely and display an error message.

changeset-bot[bot] commented 4 months ago

⚠️ No Changeset found

Latest commit: 9d658331fa25921e73b0629dfdff8f56cc817681

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

daveajrussell commented 4 months ago

[VSCode Extension] Synchronicity between DBMS connection and extension