Skip to content
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

[feature] add reconnect tab to command palette and hotkey #8201

Merged
merged 3 commits into from
Apr 12, 2023

Conversation

Clem-Fern
Copy link
Contributor

@Clem-Fern Clem-Fern commented Apr 11, 2023

Hi @Eugeny,

This PR adds reconnect command into the palette like asked in #7723.

In the view to add this feature in the most generic way, I choose to create an interface named Reconnectable which Serial, Telnet and SSH tab component are implementing. With this approach, the reconnect command in only added if the current tab can be reconnected. It works as expected but as I am not really familiar with interface in typescript, I let you tell me if it is a correct way to proceed or not...

A more simple way would probably be to provide a context menu for each reconnectable tab (in tabby-serial, tabby-ssh and tabby-telnet).

Secondly, I also added an hotkey to reconnect the current tab. I saw that a restart tab hotkey already exists but it duplicates the current tab and close the old one. Since the restart and reconnect are two different behaviors and reconnect applicable to serial/ssh/telnet only, I thought it could be interesting to have the two options.

I hope i didn't miss anything this time, feel free to ask if any change needed.

@Eugeny
Copy link
Owner

Eugeny commented Apr 12, 2023

Looking good! At some point in the future I might add a base class for all "connectable" sessions like serial/telnet/SSH but for now this is the best solution

@Eugeny Eugeny merged commit ada47d0 into Eugeny:master Apr 12, 2023
@Clem-Fern
Copy link
Contributor Author

Clem-Fern commented Apr 12, 2023

At some point in the future I might add a base class for all "connectable" sessions like serial/telnet/SSH but for now this is the best solution

If you're okay with that, i would like to give a try on this. I think the PR #8206 could be cleaner too with this refactoring.

@Eugeny
Copy link
Owner

Eugeny commented Apr 13, 2023

For sure!

@Clem-Fern Clem-Fern deleted the feat#7723 branch April 15, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants