Moving tabs out of terminal doesn't work properly with startupActions #20567

Open
opened 2026-01-31 07:17:45 +00:00 by claunia · 0 comments
Owner

Originally created by @Jackenmen on GitHub (Sep 28, 2023).

Originally assigned to: @zadjii-msft on GitHub.

Windows Terminal version

1.18.2681.0

Windows build number

10.0.19045.3448

Other Software

No response

Steps to reproduce

  1. Set startupActions in the Terminal's configuration (you can set config to the below JSON, it seems that the terminal will auto-generate the rest after and it's still reproducible):
{
    "startupActions": "new-tab -p \"PowerShell\" ; new-tab -p \"Command Prompt\""
}
  1. Start a terminal.
  2. In the PowerShell tab, run some command to get some output (I use this to show whether it's still the same tab after dragging out)
  3. Try dragging out the PowerShell tab.
  4. Notice the wrong behaviour

Expected Behavior

I expected the new window to contain the dragged-out tab, without startupActions being ran.

Actual Behavior

The new window does not contain the dragged-out tab and is started as it was the first terminal window per the startupActions. The old window no longer has the dragged-out tab either.

https://github.com/microsoft/terminal/assets/6032823/64705355-6d95-44c6-9ea5-32c0fe54025d

Originally created by @Jackenmen on GitHub (Sep 28, 2023). Originally assigned to: @zadjii-msft on GitHub. ### Windows Terminal version 1.18.2681.0 ### Windows build number 10.0.19045.3448 ### Other Software _No response_ ### Steps to reproduce 1. Set `startupActions` in the Terminal's configuration (you can set config to the below JSON, it seems that the terminal will auto-generate the rest after and it's still reproducible): ```json { "startupActions": "new-tab -p \"PowerShell\" ; new-tab -p \"Command Prompt\"" } ``` 2. Start a terminal. 3. In the PowerShell tab, run some command to get some output (I use this to show whether it's still the same tab after dragging out) 4. Try dragging out the PowerShell tab. 5. Notice the wrong behaviour ### Expected Behavior I expected the new window to contain the dragged-out tab, without `startupActions` being ran. ### Actual Behavior The new window does not contain the dragged-out tab and is started as it was the first terminal window per the `startupActions`. The old window no longer has the dragged-out tab either. https://github.com/microsoft/terminal/assets/6032823/64705355-6d95-44c6-9ea5-32c0fe54025d
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20567