Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

impl: enhanced workflow for network disruptions#162

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fioan89 merged 5 commits intomainfromimpl-improved-workflow-after-network-goes-down
Jul 25, 2025

Conversation

fioan89
Copy link
Collaborator

Currently, when the network connection drops, the Coder TBX plugin resets itself, redirects users to the authentication page, and terminates active SSH sessions to remote IDEs. This disrupts the user experience, forcing users to manually reconnect once the network is restored. Additionally, since the SSH session to the remote IDE is lost, the JBClient is unable to re-establish a connection with the remote backend.

This PR aims to improve that experience by adopting a behavior similar to the SSH plugin. Instead of clearing the list of workspaces or dropping existing SSH sessions during a network outage, we retain them. Once the network is restored, the plugin will automatically reinitialize the HTTP client and regenerate the SSH configuration—only if the number of workspaces has changed during the disconnection—without requiring user intervention.

Additionally we also add support for remembering SSH connections that were not manually disconnected by the user. This allows the plugin to automatically restore those connections on the next startup enabling remote IDEs that remained open to reconnect once the SSH link is re-established.

Currently, when the network connection drops, the Coder TBX plugin resets itself, redirects users to the authentication page, and terminates active SSH sessions to remote IDEs. This disrupts the user experience, forcing users to manually reconnect once the network is restored. Additionally, since the SSH session to the remote IDE is lost, the JBClient is unable to re-establish a connection with the remote backend.This PR aims to improve that experience by adopting a behavior similar to the SSH plugin. Instead of clearing the list of workspaces or dropping existing SSH sessions during a network outage, we retain them. Once the network is restored, the plugin will automatically reinitialize the HTTP client and regenerate the SSH configuration—only if the number of workspaces has changed during the disconnection—without requiring user intervention.
Adds support for remembering SSH connections that were not manually disconnected by the user.This allows the plugin to automatically restore those connections on the next startupenabling remote IDEs that remained open to reconnect once the SSH link is re-established.
Comment on lines +211 to +214
if (isManual) {
// if the user manually disconnects the ssh connection we should not connect automatically
context.settingsStore.updateAutoConnect(this.id,false)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Why this choice? If the user manually disconnects and then connects again, we should still try to resume the last active connection if possible.

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

If you take a look atbeforeConnection we set auto-connect to true. In other words:

  • user connects the ssh, and then TBX is closed -> at the next restart we automatically reconnect.
  • user connects to the ssh, manually disconnects and then TBX is closed -> at the next restart we no longer reconnect automatically because the user made a conscious choice to disconnect.
  • user connects to the ssh, manually disconnects, then reconnects again the ssh session, and then TBX is closed -> at the next restart we automatically reconnect.

Copy link
Member

@matifalimatifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I have a few questions and suggestions.

@matifali
Copy link
Member

Tested on macOS with both Coder Desktop and without, and the connection seems to recover gracefully. I noticed some delay (5-10s) in showingConnecting in Toolbox after seeing Connecting in IDE first.

@fioan89fioan89 marked this pull request as ready for reviewJuly 24, 2025 21:28
@fioan89
Copy link
CollaboratorAuthor

Tested on macOS with both Coder Desktop and without, and the connection seems to recover gracefully. I noticed some delay (5-10s) in showingConnecting in Toolbox after seeing Connecting in IDE first.

This looks like it is under JetBrains control. I can reproduce the same thing with the SSH plugin. The "Connecting" is a state from from JetBrains.

matifali reacted with thumbs up emoji

@fioan89fioan89 requested a review frommatifaliJuly 24, 2025 21:31
Copy link
Member

@matifalimatifali left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks. I tested and it works as expected.

Auto connect will now happen everytime at start up if there is a url and token available.
Reason for the major change: major changes in how we handle network disruptions
@fioan89fioan89 merged commit296e311 intomainJul 25, 2025
6 checks passed
@fioan89fioan89 deleted the impl-improved-workflow-after-network-goes-down branchJuly 25, 2025 13:47
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@matifalimatifalimatifali approved these changes

@f0sself0sselAwaiting requested review from f0ssel

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@fioan89@matifali

[8]ページ先頭

©2009-2025 Movatter.jp