Workspaces does not retain application order
Microsoft PowerToys version
0.86.0
Installation method
GitHub
Running as admin
No
Area(s) with issue?
Workspaces
Steps to reproduce
Starting in the 0.86.0 update, Workspaces no longer opens applications in the correct order. To replicate:
- Open the same application multiple times with different files
- Capture the workspace, and specify the command line arguments to open the correct file for each instance of the application if necessary
- Close all files and launch the workspace. The files do not open in the order specified in the workspace
✔️ Expected Behavior
In version 0.85.1 and prior, the applications launched in the order they are shown in the workspace edit section (1 opens first, 2 second, etc). When there are multiple instances of a single application, this affects the order in which the files appear on the taskbar when hovering over the app.
❌ Actual Behavior
Workspaces does not respect the order in which the apps are listed in the edit workspace section, at least when a single app is open multiple times with a different file specified for each instance of the app. I did not test with multiple apps. Reverting back to 0.85.1 and the apps are opened in the correct order.
Other Software
No response
We've found some similar issues:
- #34613 , similarity score: 83%
If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.
Note: You can give me feedback by 👍 or 👎 this comment.
@funky-d did the app order in the dialogue modal that pops up on launch also change? In theory we haven't made direct changes here though we've fixed some issues related to CLI arguments not being applied to the correct app instance (if multiple were present).
/needinfo
Technically workspaces only can impact the order in which we make the launch call but adding better launch ordering support and a Z-gripper control to the editor so that users can easily change order is something to look into.
@plante-msft apologies for my delayed response. The dialogue modal only shows the application name, not the CLI arguments that would reflect what file is being opened. Consider the following test:
- Create six text documents, named 1.txt through 6.txt.
- Open the documents in order in Notepad.
- Create a workspace, with a command line option for the file location of each document in order 1-6.
- When closing all documents and launching the workspace, they open in a different order than reflected in the workspace.
I tested the above with two different workspaces, and each instance opened the text documents in different orders than were specified by the command line option for each document.
Thank you for your response, and I hope this information is helpful!
The issue should be solved in the next release (mid Dec. approx.). @funky-d Would be great to retest the scenario after the update and close the issue. Thanks!
please retest with the new 0.87 PT version and if the issue persists send a /bugreport. Thanks!
Thank you for looking into this issue. The bug still appears to be present in 0.87. However, I did notice that after creating a workspace, it consistently opened multiple instances of the application in the same wrong order. This order seemed to change when creating a new workspace.
For instance, when using the example in my post above to open up text documents 1, 2, 3, 4, 5, 6, in that order, the workspace opened consistently in the order 6, 5, 3, 4, 2, 1. If the workspace was deleted and created again, it would open consistently in a new wrong order. The 0.85.1 release consistently opens in the correct order. *Edit: I tested 0.86 again, and noticed it also opens consistently in the same wrong order. I'm not sure if this order is maintained after reboots.
Attached is a bug report, however this issue can easily be recreated using the example in my post above.
@funky-d Thanks for your feedback. I have to admit I misunderstood the issue previously. I was thinking that the apps do not appear on the right position (Notepad with "1.txt" and Notepad with "2.txt" swapping places for example). I suppose all your apps are on the right position. As regarding the order of the apps there is no ordering implemented so you can take it as random. (At the point of creating a workspace we get a list of apps from the system, where I suppose the last modified window is on the top. We store it with no modification on the order and when launching we take this list). However if it helps you, you can manually modify the workspace file, which can be found in c:\Users\ Yours \AppData\Local\Microsoft\PowerToys\Workspaces\workspaces,json If you look into the file, search for your workspace (there are all the workspaces) and under the "applications" you can freely modify the order of your apps. Just beware of changing the syntax, I mean watch out for the commas and so. To be honest the issue (or feature request) to enable the ordering in the editor will be low prio due to having more disturbing issues. Thanks for your understanding, best regards
However if it helps you, you can manually modify the workspace file, which can be found in c:\Users\ Yours \AppData\Local\Microsoft\PowerToys\Workspaces\workspaces,json If you look into the file, search for your workspace (there are all the workspaces) and under the "applications" you can freely modify the order of your apps.
@donlaci Thank you for your response. I took a look at the JSON file, and the apps are listed in the correct order. Workspaces doesn't seem to be launching applications in the configuration file in the order they are listed, however. As you can see below, the command line arguments are in order, but the files are not opened in the order 1-4 when launching the workspace:
{
"workspaces": [
{
"id": "{74A23EAD-1F55-4AA1-9245-0E897A73AEA7}",
"name": "Workspace 1",
"creation-time": 1734596003,
"last-launched-time": 0,
"is-shortcut-needed": false,
"move-existing-windows": false,
"monitor-configuration": [
{
"id": "Default_Monitor",
"instance-id": "1\u0026c528b8a\u00260\u0026UID256",
"monitor-number": 1,
"dpi": 96,
"monitor-rect-dpi-aware": {
"top": 0,
"left": 0,
"width": 2736,
"height": 1074
},
"monitor-rect-dpi-unaware": {
"top": 0,
"left": 0,
"width": 2736,
"height": 1074
}
}
],
"applications": [
{
"id": "{c812b275-e1cc-40db-826f-59e27117aad9}",
"application": "Notepad",
"application-path": "C:\\Windows\\system32\\notepad.exe",
"title": "1.txt - Notepad",
"package-full-name": "",
"app-user-model-id": "{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\notepad.exe",
"pwa-app-id": "",
"command-line-arguments": "\u0022C:\\Users\\WDAGUtilityAccount\\Desktop\\1.txt\u0022",
"is-elevated": false,
"can-launch-elevated": true,
"minimized": false,
"maximized": false,
"position": {
"X": 331,
"Y": 108,
"width": 2052,
"height": 749
},
"monitor": 1
},
{
"id": "{7f4049bb-4a3e-4b34-9e05-d80dc99e51f5}",
"application": "Notepad",
"application-path": "C:\\Windows\\system32\\notepad.exe",
"title": "2.txt - Notepad",
"package-full-name": "",
"app-user-model-id": "{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\notepad.exe",
"pwa-app-id": "",
"command-line-arguments": "\u0022C:\\Users\\WDAGUtilityAccount\\Desktop\\2.txt\u0022",
"is-elevated": false,
"can-launch-elevated": true,
"minimized": false,
"maximized": false,
"position": {
"X": 273,
"Y": 149,
"width": 2052,
"height": 749
},
"monitor": 1
},
{
"id": "{3d1b8290-2611-4d29-b7e1-c77eec427996}",
"application": "Notepad",
"application-path": "C:\\Windows\\system32\\notepad.exe",
"title": "3.txt - Notepad",
"package-full-name": "",
"app-user-model-id": "{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\notepad.exe",
"pwa-app-id": "",
"command-line-arguments": "\u0022C:\\Users\\WDAGUtilityAccount\\Desktop\\3.txt\u0022",
"is-elevated": false,
"can-launch-elevated": true,
"minimized": false,
"maximized": false,
"position": {
"X": 229,
"Y": 201,
"width": 2052,
"height": 749
},
"monitor": 1
},
{
"id": "{7ef68c03-6841-447d-ada4-51a5c338bb48}",
"application": "Notepad",
"application-path": "C:\\Windows\\system32\\notepad.exe",
"title": "4.txt - Notepad",
"package-full-name": "",
"app-user-model-id": "{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\notepad.exe",
"pwa-app-id": "",
"command-line-arguments": "\u0022C:\\Users\\WDAGUtilityAccount\\Desktop\\4.txt\u0022",
"is-elevated": false,
"can-launch-elevated": true,
"minimized": false,
"maximized": false,
"position": {
"X": 185,
"Y": 242,
"width": 2052,
"height": 749
},
"monitor": 1
}
]
}
]
}
I will likely just stick with versions 0.85.1 for now, as that version typically will open the apps in the order they are listed in the workspaces GUI. I say "typically", as sometimes the first time I load the workspace it is in a different order, but closing the apps and launching the workspace again will launch in the correct order.
Thank you again for your time!
same issue - I like to open MS Teams on top of Outlook, but smaller so I can see outlook previews to left of MS Teams -
This still persists in v0.90.1. In my case launch order is what determines taskbar order which I use in my workflow with overlapping windows. Any idea as to when this might be resolved?