Display connection state in tab & add tab context menu entry for restarting connection #19456

Closed
opened 2026-01-31 06:43:53 +00:00 by claunia · 5 comments
Owner

Originally created by @xyang-zh on GitHub (Feb 25, 2023).

Environment

CPU AMD Ryzen 7 3700X 8-Core Processor 3.60 GHz
Memory 32.0 GB
OS 64-bit

Description of the new feature/enhancement

1、Add a status indicator to the tab indicates connection status
2、Add connect and disconnect buttons to the tab's Pop-up list(or somewhere)

Describe

The two functions above are closely linked and I have written them together
1、I want to disconnect the terminal from the background program without closing the terminal page (I need to see the contents,),and reconnect if necessary,more often than not, I prefer to reopen the current terminal page rather than closing it and creating another
Snipaste_2023-02-25_21-58-25
Add connect/disconnect buttons to above list(or somewhere)

2、Let's use an elegant dynamic icon to indicate the current connection status. Every time the connection is accidentally disconnected, the error report on the first line is of little use to me except for the last line which tells me to enter to reconnect (it's a strange feeling that the connection is now disconnected and the content is printed in the terminal...”)
like this:
Snipaste_2023-02-25_21-56-36

Proposed technical implementation details (optional)

It would be great to have both functions(connect/disconnect button) in one button


maintainer edit space:

### Tasks
* [ ] When a connection is `Closed`, set an indicator in the tab itself. This could be like the zoom one we have currently. 
* [ ] When the active pane in a tab's connection state is `Closed`, we could add a "Restart connection" action to the tab context menu (ala #14549)
Originally created by @xyang-zh on GitHub (Feb 25, 2023). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Environment CPU AMD Ryzen 7 3700X 8-Core Processor 3.60 GHz Memory 32.0 GB OS 64-bit # Description of the new feature/enhancement 1、Add a status indicator to the tab indicates connection status 2、Add connect and disconnect buttons to the tab's Pop-up list(or somewhere) <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Describe **The two functions above are closely linked and I have written them together** 1、I want to disconnect the terminal from the background program without closing the terminal page (I need to see the contents,),and reconnect if necessary,more often than not, I prefer to reopen the current terminal page rather than closing it and creating another ![Snipaste_2023-02-25_21-58-25](https://user-images.githubusercontent.com/33871402/221361825-74a4f80e-92c0-48e0-b50a-ec6c51d4b555.png) Add connect/disconnect buttons to above list(or somewhere) 2、Let's use an elegant dynamic icon to indicate the current connection status. Every time the connection is accidentally disconnected, the error report on the first line is of little use to me except for the last line which tells me to enter to reconnect (it's a strange feeling that the connection is now disconnected and the content is printed in the terminal...”) like this: ![Snipaste_2023-02-25_21-56-36](https://user-images.githubusercontent.com/33871402/221361863-756c960e-2720-4dce-ba0f-9314676ee872.png) # Proposed technical implementation details (optional) It would be great to have both functions(connect/disconnect button) in one button <!-- A clear and concise description of what you want to happen. --> <hr> _maintainer edit space:_ ```[tasklist] ### Tasks * [ ] When a connection is `Closed`, set an indicator in the tab itself. This could be like the zoom one we have currently. * [ ] When the active pane in a tab's connection state is `Closed`, we could add a "Restart connection" action to the tab context menu (ala #14549) ```
Author
Owner

@carlos-zamora commented on GitHub (Mar 8, 2023):

Hi @Window-YANG. We're having a bit of trouble understanding how detach works and how it impacts the tab hosting that application. Could you please elaborate on that a bit?

As for the "restarting" aspect of this request, does #14060 sound like what you're looking for?

@carlos-zamora commented on GitHub (Mar 8, 2023): Hi @Window-YANG. We're having a bit of trouble understanding how detach works and how it impacts the tab hosting that application. Could you please elaborate on that a bit? As for the "restarting" aspect of this request, does #14060 sound like what you're looking for?
Author
Owner

@xyang-zh commented on GitHub (Mar 13, 2023):

Hi @Window-YANG. We're having a bit of trouble understanding how detach works and how it impacts the tab hosting that application. Could you please elaborate on that a bit?

As for the "restarting" aspect of this request, does #14060 sound like what you're looking for?
Problem 1: restart。Refer to secureCRT.
reconnect1

Restart is 1409, but there are some shortcomings, 1409 confuses me: I can't find any place to actively disconnect (unless I close the terminal or enter a command in the terminal to exit the background program), so it's better to design a button ,no matter what the background program is, I can easily disconnect and reconnect with one click in the terminal

Proble 2: status
As for technical details like how to disconnect, I can't give much advice (one possible way: close the background program and recreate a new one?)

@xyang-zh commented on GitHub (Mar 13, 2023): > Hi @Window-YANG. We're having a bit of trouble understanding how detach works and how it impacts the tab hosting that application. Could you please elaborate on that a bit? > > As for the "restarting" aspect of this request, does #14060 sound like what you're looking for? Problem 1: restart。Refer to secureCRT. ![reconnect1](https://user-images.githubusercontent.com/33871402/224592376-b853a78b-e22f-4bdb-9ea3-0a10b742a47a.png) Restart is 1409, but there are some shortcomings, 1409 confuses me: I can't find any place to actively disconnect (unless I close the terminal or enter a command in the terminal to exit the background program), so it's better to design a button ,no matter what the background program is, I can easily disconnect and reconnect with one click in the terminal Proble 2: status As for technical details like how to disconnect, I can't give much advice (one possible way: close the background program and recreate a new one?)
Author
Owner

@zadjii-msft commented on GitHub (Mar 13, 2023):

Okay, I think I can see the cross-tabs here. There's a couple things we can do here:

I'll xlink with #6700 which has some similar thoughts in it.

Thanks for the suggestion!

@zadjii-msft commented on GitHub (Mar 13, 2023): Okay, I think I can see the cross-tabs here. There's a couple things we can do here: * When a connection is `Closed`, set an indicator in the tab itself. This could be like the zoom one we have currently. * When the active pane in a tab's connection state is `Closed`, we could add a "Restart connection" action to the tab context menu ~(ala #14549)~ I MEAN, #15241 I'll xlink with #6700 which has some similar thoughts in it. Thanks for the suggestion!
Author
Owner

@mpela81 commented on GitHub (Jul 13, 2023):

* When the active pane in a tab's connection state is `Closed`, we could add a "Restart connection" action to the tab context menu 

Do we want to add it to the tab's context menu, the (experimental) right-click context menu, or maybe both?

@mpela81 commented on GitHub (Jul 13, 2023): > * When the active pane in a tab's connection state is `Closed`, we could add a "Restart connection" action to the tab context menu Do we want to add it to the tab's context menu, the (experimental) right-click context menu, or maybe both?
Author
Owner

@zadjii-msft commented on GitHub (Jul 13, 2023):

both-is-good

@zadjii-msft commented on GitHub (Jul 13, 2023): ![both-is-good](https://github.com/microsoft/terminal/assets/18356694/0c809b7c-0e38-4ed2-a6a2-03c0750ab2cc)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19456