Execution on hold until tab is selected/focused #17528

Closed
opened 2026-01-31 05:45:07 +00:00 by claunia · 4 comments
Owner

Originally created by @matbech on GitHub (May 21, 2022).

Windows Terminal version

1.12.10983.0

Windows build number

10.0.22621.1

Other Software

No response

Steps to reproduce

  • Launch PowerShell in conhost
  • Run
    1..10 | % { wt -w 1 nt --title=$_ pwsh -NoExit -Command "Get-Date -Format HH:mm:ss.ffff" }
    

Expected Behavior

All tabs/commands should run in parallel, without needing to select the tab first.

Actual Behavior

Under some circumstances (it doesn't happen always, no reliable way to reproduce), the commands only start until the tab is being selected/focused.

This behavior does not happen when wt.exe is called once with all the new-tab commands separated by ;

Originally created by @matbech on GitHub (May 21, 2022). ### Windows Terminal version 1.12.10983.0 ### Windows build number 10.0.22621.1 ### Other Software _No response_ ### Steps to reproduce * Launch PowerShell in conhost * Run ```pwsh 1..10 | % { wt -w 1 nt --title=$_ pwsh -NoExit -Command "Get-Date -Format HH:mm:ss.ffff" } ``` ### Expected Behavior All tabs/commands should run in parallel, without needing to select the tab first. ### Actual Behavior Under some circumstances (it doesn't happen always, no reliable way to reproduce), the commands only start until the tab is being selected/focused. This behavior does not happen when wt.exe is called once with all the new-tab commands separated by ;
Author
Owner

@zadjii-msft commented on GitHub (May 23, 2022):

You know, I do see this from time to time when restoring the Terminal session. Basically, the pane needs to be displayed in the UI tree once to actually get started, so for something that's creating a bunch of tabs/panes all at once, only the one that ends up displayed starts.

For things like just running a shell it's not too punishing, but for starting any sort of background script, yea it sucks.

We should figure this out.

Thanks!

@zadjii-msft commented on GitHub (May 23, 2022): You know, I do see this from time to time when restoring the Terminal session. Basically, the pane needs to be displayed in the UI tree once to actually get started, so for something that's creating a bunch of tabs/panes all at once, only the one that ends up displayed starts. For things like just running a shell it's not too punishing, but for starting any sort of background script, yea it sucks. We should figure this out. Thanks!
Author
Owner

@Hukuma1 commented on GitHub (May 24, 2022):

I'm not sure if it's related, but I also open WT with 4 split panes and another tab. Prior releases used to load immediately and now I almost have WT hanging/not responding for 5 seconds. It used to load just fine, the console would appear a bit after as it connected. Now it seems to try to wait for everything to load in the background (e.g. connecting to servers) before drawing the screen. Is there anyway to go back to the previous behavior? Or figure out this rendering block?

@Hukuma1 commented on GitHub (May 24, 2022): I'm not sure if it's related, but I also open WT with 4 split panes and another tab. Prior releases used to load immediately and now I almost have WT hanging/not responding for 5 seconds. It used to load just fine, the console would appear a bit after as it connected. Now it seems to try to wait for everything to load in the background (e.g. connecting to servers) before drawing the screen. Is there anyway to go back to the previous behavior? Or figure out this rendering block?
Author
Owner

@brupelo commented on GitHub (Mar 21, 2024):

As mentioned in the related #16896 I encountered an unexpected behavior while setting up a local microservices cluster using wt and I wanted to share it here.

While attempting to spin up a local microservices cluster, I encountered unexpected 500 errors. After some investigation, I realized that the issue stemmed from the tab activation behavior in wt. In my setup, I had dockerized the microservices resources in one tab, and in other tabs, I was spinning up individual web servers for the services. However, I noticed that the tab processes were not starting automatically unless I explicitly clicked on them.

This behavior seemed unusual to me, as I assumed that the tab processes should start automatically without requiring manual intervention. Hence, I suspect it might be a bug rather than intended behavior.

I mean, I'm under the assumption the intended behaviour would be spinning up the tab processes in parallel (without any dependencies between them)

That said, this one is pretty annoying cos sometimes you're switching a lot of branches and want to try different versions of the cluster by respawning this multi-tab setup but you forget to click in all tabs (~10) so you end up context switching, etc... 😅

@brupelo commented on GitHub (Mar 21, 2024): As mentioned in the related #16896 I encountered an unexpected behavior while setting up a local microservices cluster using wt and I wanted to share it here. While attempting to spin up a local microservices cluster, I encountered unexpected 500 errors. After some investigation, I realized that the issue stemmed from the tab activation behavior in wt. In my setup, I had dockerized the microservices resources in one tab, and in other tabs, I was spinning up individual web servers for the services. However, I noticed that the tab processes were not starting automatically unless I explicitly clicked on them. This behavior seemed unusual to me, as I assumed that the tab processes should start automatically without requiring manual intervention. Hence, I suspect it might be a bug rather than intended behavior. I mean, I'm under the assumption the intended behaviour would be spinning up the tab processes in parallel (without any dependencies between them) That said, this one is pretty annoying cos sometimes you're switching a lot of branches and want to try different versions of the cluster by respawning this multi-tab setup but you forget to click in all tabs (~10) so you end up context switching, etc... 😅
Author
Owner

@brupelo commented on GitHub (Mar 21, 2024):

Just for the sake of completeness, the syntax I'm using is slightly different to this thread's reproducer, ie:

run_services.cmd

wt -w %~n0 ^
nt --title="shared" --startingDirectory=%ALIAS_DIR% %COMMAND_SHARED% ; ^
nt --title="svc0:5000" --startingDirectory=%svc0% %COMMAND% ; ^
nt --title="svc1:5001" --startingDirectory=%svc1% %COMMAND% ; ^
nt --title="svc2:5002" --startingDirectory=%svc2% %COMMAND% ; ^
nt --title="svc3:5003" --startingDirectory=%svc3% %COMMAND% ; ^
nt --title="svc4:5005" --startingDirectory=%svc4% %COMMAND% ; ^
nt --title="svc5:5006" --startingDirectory=%svc5% %COMMAND% ; ^
nt --title="svc6:5007" --startingDirectory=%svc6% %COMMAND% ; ^
nt --title="svc7:5009" --startingDirectory=%svc7% %COMMAND%

But I guess we're talking about the same bug as @zadjii-msft already marked it as dup.

@brupelo commented on GitHub (Mar 21, 2024): Just for the sake of completeness, the syntax I'm using is slightly different to this thread's reproducer, ie: **run_services.cmd** ``` wt -w %~n0 ^ nt --title="shared" --startingDirectory=%ALIAS_DIR% %COMMAND_SHARED% ; ^ nt --title="svc0:5000" --startingDirectory=%svc0% %COMMAND% ; ^ nt --title="svc1:5001" --startingDirectory=%svc1% %COMMAND% ; ^ nt --title="svc2:5002" --startingDirectory=%svc2% %COMMAND% ; ^ nt --title="svc3:5003" --startingDirectory=%svc3% %COMMAND% ; ^ nt --title="svc4:5005" --startingDirectory=%svc4% %COMMAND% ; ^ nt --title="svc5:5006" --startingDirectory=%svc5% %COMMAND% ; ^ nt --title="svc6:5007" --startingDirectory=%svc6% %COMMAND% ; ^ nt --title="svc7:5009" --startingDirectory=%svc7% %COMMAND% ``` But I guess we're talking about the same bug as @zadjii-msft already marked it as dup.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17528