Dropdown menu lists profiles in wrong order; doesn't match settings.json #9824

Closed
opened 2026-01-31 02:04:46 +00:00 by claunia · 13 comments
Owner

Originally created by @KalleOlaviNiemitalo on GitHub (Jul 24, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.388]
Windows Terminal version (if applicable): Windows Terminal Preview Version: 1.2.2022.0

PowerShell 6.2.7 (PowerShell-6.2.7-win-x64.msi)
PowerShell 7.1.0-preview.5 (PowerShell-7.1.0-preview.5-win-x64.msi)
Visual Studio Professional 2017 Version 15.9.25

Steps to reproduce

Define these profiles in settings.json:

    "profiles":
    {
        "defaults":
        {
            // Put settings here that you want to apply to all profiles.
        },
        "list":
        [
            {
                "guid": "{dc9f4186-52a8-4b9f-a659-0c438c764b58}",
                "commandline": "\"%ProgramFiles%\\Git\\bin\\bash.exe\" -i -l",
                "name": "Git Bash",
                "icon": "%ProgramFiles%\\Git\\mingw64\\share\\git\\git-for-windows.ico",
                "startingDirectory": "C:\\Projects",
                "hidden": false
            },
            {
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore",
                "hidden": false
            },
            {
                "guid": "{a3a2e83a-884a-5379-baa8-16f193a13b21}",
                "name": "PowerShell 7 Preview",
                "source": "Windows.Terminal.PowershellCore",
                "hidden": true
            },
            {
                "guid": "{2595cd9c-8f05-55ff-a1d4-93f3041ca67f}",
                "name": "PowerShell Preview (msix)",
                "source": "Windows.Terminal.PowershellCore",
                "hidden": true
            },
            {
                "guid": "{049b895c-b0b8-55de-bce3-27d3220d7ab3}",
                "name": "PowerShell Core 6",
                "source": "Windows.Terminal.PowershellCore",
                "hidden": false
            },
            {
                // Make changes here to the powershell.exe profile.
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false
            },
            {
                "guid": "{9366fe6a-7c14-4115-a32b-0c59fd2cf264}",
                "commandline": "%comspec% /k \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\Tools\\VsDevCmd.bat\"",
                "name": "Developer Command Prompt for VS 2017",
                "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
                "tabTitle": "VS2017 Dev Command Prompt",
                "hidden": false
            },
            {
                // Make changes here to the cmd.exe profile.
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "Command Prompt",
                "commandline": "cmd.exe",
                "hidden": false
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure",
                "useAcrylic": false,
                "hidden": false
            }
        ]
    },

The profiles with "hidden": true refer to PowerShell versions that are not currently installed.

Expected behavior

The dropdown menu should list the "hidden": false profiles in the same order as settings.json:

image

Actual behavior

The dropdown menu lists the profiles in a different order; Command Prompt appears between the PowerShell versions:

image

However, if I comment out the profiles that have "hidden": true, then I get the order that I expect.

Originally created by @KalleOlaviNiemitalo on GitHub (Jul 24, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows [Version 10.0.19041.388] Windows Terminal version (if applicable): Windows Terminal Preview Version: 1.2.2022.0 PowerShell 6.2.7 (PowerShell-6.2.7-win-x64.msi) PowerShell 7.1.0-preview.5 (PowerShell-7.1.0-preview.5-win-x64.msi) Visual Studio Professional 2017 Version 15.9.25 ``` # Steps to reproduce Define these profiles in settings.json: ```yaml "profiles": { "defaults": { // Put settings here that you want to apply to all profiles. }, "list": [ { "guid": "{dc9f4186-52a8-4b9f-a659-0c438c764b58}", "commandline": "\"%ProgramFiles%\\Git\\bin\\bash.exe\" -i -l", "name": "Git Bash", "icon": "%ProgramFiles%\\Git\\mingw64\\share\\git\\git-for-windows.ico", "startingDirectory": "C:\\Projects", "hidden": false }, { "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "name": "PowerShell", "source": "Windows.Terminal.PowershellCore", "hidden": false }, { "guid": "{a3a2e83a-884a-5379-baa8-16f193a13b21}", "name": "PowerShell 7 Preview", "source": "Windows.Terminal.PowershellCore", "hidden": true }, { "guid": "{2595cd9c-8f05-55ff-a1d4-93f3041ca67f}", "name": "PowerShell Preview (msix)", "source": "Windows.Terminal.PowershellCore", "hidden": true }, { "guid": "{049b895c-b0b8-55de-bce3-27d3220d7ab3}", "name": "PowerShell Core 6", "source": "Windows.Terminal.PowershellCore", "hidden": false }, { // Make changes here to the powershell.exe profile. "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "Windows PowerShell", "commandline": "powershell.exe", "hidden": false }, { "guid": "{9366fe6a-7c14-4115-a32b-0c59fd2cf264}", "commandline": "%comspec% /k \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\Tools\\VsDevCmd.bat\"", "name": "Developer Command Prompt for VS 2017", "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png", "tabTitle": "VS2017 Dev Command Prompt", "hidden": false }, { // Make changes here to the cmd.exe profile. "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "name": "Command Prompt", "commandline": "cmd.exe", "hidden": false }, { "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", "name": "Azure Cloud Shell", "source": "Windows.Terminal.Azure", "useAcrylic": false, "hidden": false } ] }, ``` The profiles with `"hidden": true` refer to PowerShell versions that are not currently installed. # Expected behavior The dropdown menu should list the `"hidden": false` profiles in the same order as `settings.json`: ![image](https://user-images.githubusercontent.com/46201428/88382944-2e20dd80-cdb2-11ea-967c-20fcaf8910e7.png) # Actual behavior The dropdown menu lists the profiles in a different order; Command Prompt appears between the PowerShell versions: ![image](https://user-images.githubusercontent.com/46201428/88383083-7b04b400-cdb2-11ea-9434-f51775732023.png) However, if I comment out the profiles that have `"hidden": true`, then I get the order that I expect.
Author
Owner

@WSLUser commented on GitHub (Jul 24, 2020):

I would actually be happier with the first one if that was my setup. It's provided in order of usefulness. (Yes I consider the developer command prompt more useful than regular CMD) and the Azure being completely useless in my case (and hence hidden).

@WSLUser commented on GitHub (Jul 24, 2020): I would actually be happier with the first one if that was my setup. It's provided in order of usefulness. (Yes I consider the developer command prompt more useful than regular CMD) and the Azure being completely useless in my case (and hence hidden).
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Jul 25, 2020):

I would actually be happier with the first one if that was my setup.

Sure, the first screen shot is the expected behavior, and matches the order in settings.json.

@KalleOlaviNiemitalo commented on GitHub (Jul 25, 2020): > I would actually be happier with the first one if that was my setup. Sure, the first screen shot is the expected behavior, and matches the order in settings.json.
Author
Owner

@WSLUser commented on GitHub (Jul 25, 2020):

Ah. I thought it was the other way around. We are in agreement then

@WSLUser commented on GitHub (Jul 25, 2020): Ah. I thought it was the other way around. We are in agreement then
Author
Owner

@DHowett commented on GitHub (Jul 27, 2020):

Wow, and this mixed up order is persistent across restarts/reloads? I know we're tracking a bug related to dynamic profiles coming in in the wrong order, but that's supposed to only apply when they're first generated..

@DHowett commented on GitHub (Jul 27, 2020): Wow, and this mixed up order is persistent across restarts/reloads? I know we're tracking a bug related to dynamic profiles coming in in the wrong order, but that's supposed to only apply when they're first generated..
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Jul 28, 2020):

Yes, it is persistent. I uncommented the hidden profiles, closed Windows Terminal, verified from Task Manager that there was no WindowsTerminal.exe running, started it again, and the dropdown list still was jumbled the same way as I had reported.

@KalleOlaviNiemitalo commented on GitHub (Jul 28, 2020): Yes, it is persistent. I uncommented the hidden profiles, closed Windows Terminal, verified from Task Manager that there was no WindowsTerminal.exe running, started it again, and the dropdown list still was jumbled the same way as I had reported.
Author
Owner

@beppler commented on GitHub (Sep 24, 2020):

It was working on version 1.2, After I changed preview (1.4) then it started to show entries out of order as shown on this issue.

@beppler commented on GitHub (Sep 24, 2020): It was working on version 1.2, After I changed preview (1.4) then it started to show entries out of order as shown on this issue.
Author
Owner

@rashil2000 commented on GitHub (Mar 25, 2021):

Can confirm this problem on my end too.

However I noticed it only after Settings UI was introduced. Searching among the old issues, this issue tells me it actually predates the Settings UI.

@rashil2000 commented on GitHub (Mar 25, 2021): Can confirm this problem on my end too. However I noticed it only after Settings UI was introduced. Searching among the old issues, this issue tells me it actually predates the Settings UI.
Author
Owner

@DavoDC commented on GitHub (Aug 25, 2021):

I would like for a feature to be added where you change the order of the profiles just by dragging them in settings

@DavoDC commented on GitHub (Aug 25, 2021): I would like for a feature to be added where you change the order of the profiles just by dragging them in settings
Author
Owner

@zadjii-msft commented on GitHub (Aug 25, 2021):

@DavoDC We're tracking that functionality over in #1571

@zadjii-msft commented on GitHub (Aug 25, 2021): @DavoDC We're tracking that functionality over in #1571
Author
Owner

@zadjii-msft commented on GitHub (Aug 25, 2021):

There's a halfway decent chance that this might just get better on its own in 1.11 with some of the changes in the works.

@zadjii-msft commented on GitHub (Aug 25, 2021): There's a halfway decent chance that this might just get better on its own in 1.11 with some of the changes in the works.
Author
Owner

@NPittinger commented on GitHub (Oct 22, 2021):

FYI, this appears to be working for me. I only have four profiles defined, so it would probably be best for someone with more profiles to confirm.

Environment Details:

Windows build: Windows 11 Version 21H2 (OS Build 22000.258)
Windows Terminal version: 1.11.2921.0

Git for Windows 2.33.1 (Git-2.33.1-64-bit.exe)
PowerShell 7.1.5.0 (PowerShell-7.1.5-win-x64.msi)

settings.json Profiles Section

    "profiles": 
    {
        "defaults": {},
        "list": 
        [
            {
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "hidden": false,
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore"
            },
            {
                "commandline": "powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": true,
                "name": "Windows PowerShell"
            },
            {
                "commandline": "cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },
            {
                "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}",
                "hidden": false,
                "name": "Git Bash",
                "source": "Git"
            }
        ]
    },
@NPittinger commented on GitHub (Oct 22, 2021): FYI, this appears to be working for me. I only have four profiles defined, so it would probably be best for someone with more profiles to confirm. ### Environment Details: ``` Windows build: Windows 11 Version 21H2 (OS Build 22000.258) Windows Terminal version: 1.11.2921.0 Git for Windows 2.33.1 (Git-2.33.1-64-bit.exe) PowerShell 7.1.5.0 (PowerShell-7.1.5-win-x64.msi) ``` ### settings.json Profiles Section ```json "profiles": { "defaults": {}, "list": [ { "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "hidden": false, "name": "PowerShell", "source": "Windows.Terminal.PowershellCore" }, { "commandline": "powershell.exe", "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "hidden": true, "name": "Windows PowerShell" }, { "commandline": "cmd.exe", "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "hidden": false, "name": "Command Prompt" }, { "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}", "hidden": false, "name": "Git Bash", "source": "Git" } ] }, ```
Author
Owner

@zadjii-msft commented on GitHub (Oct 25, 2021):

@KalleOlaviNiemitalo You still seeing this by any chance? After the big-ol' settings refactor in the last two releases, I'm suspecting this was fixed as fallout

@zadjii-msft commented on GitHub (Oct 25, 2021): @KalleOlaviNiemitalo You still seeing this by any chance? After the big-ol' settings refactor in the last two releases, I'm suspecting this was fixed as fallout
Author
Owner

@ghost commented on GitHub (Nov 3, 2021):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Nov 3, 2021): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9824