You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If a user navigates from workspace A to workspace B and makes no edits on a file to workspace B then clicks Cmd+Z / Ctrl+Z, the content in that file is completely overridden by the content from the corresponding file in workspace A.
More generally, if a user navigates from workspace A to workspace B, makes x edits in workspace B then clicks Cmd+Z / Ctrl+Z x+1 times, the content in that file is also completely overridden by the content from the corresponding file in workspace A.
I believe this to be because what's happening underneath the hood is the currentWorkspace state is being swapped when a user navigates to a different workspace, so the "previous" state that Cmd+Z tries to go back to is what was in that previous workspace.
(the only keys clicked in these examples are Cmd+Z, no copy paste)
To Reproduce
Have at least two workspaces in your saved tab
Click on workspace A
Click on workspace B
Click Cmd+Z / Ctrl+Z (windows) on workspace B
Or
Have at least two workspaces in your saved tab
Click on workspace A
Click on workspace B
Make x edits on workspace B
Click Cmd+Z / Ctrl+Z (windows) x+1 times on workspace B
The text was updated successfully, but these errors were encountered:
We only change the value of MonacoEditor whenever we switch workspaces, and this probably made monaco treat the previous workspace as a re-playable state. In principle, we'd want to dispose the instance and mount again or do something special to flush the undo queue.
Since #1737 is ongoing, this issue might be out of date soon.
Describe the bug
If a user navigates from workspace A to workspace B and makes no edits on a file to workspace B then clicks Cmd+Z / Ctrl+Z, the content in that file is completely overridden by the content from the corresponding file in workspace A.
More generally, if a user navigates from workspace A to workspace B, makes x edits in workspace B then clicks Cmd+Z / Ctrl+Z x+1 times, the content in that file is also completely overridden by the content from the corresponding file in workspace A.
I believe this to be because what's happening underneath the hood is the currentWorkspace state is being swapped when a user navigates to a different workspace, so the "previous" state that Cmd+Z tries to go back to is what was in that previous workspace.
Screen.Recording.2024-06-10.at.10.16.22.AM.mov
Screen.Recording.2024-06-10.at.10.19.28.AM.mov
(the only keys clicked in these examples are Cmd+Z, no copy paste)
To Reproduce
Have at least two workspaces in your saved tab
Click on workspace A
Click on workspace B
Click Cmd+Z / Ctrl+Z (windows) on workspace B
Or
Have at least two workspaces in your saved tab
Click on workspace A
Click on workspace B
Make x edits on workspace B
Click Cmd+Z / Ctrl+Z (windows) x+1 times on workspace B
The text was updated successfully, but these errors were encountered: