Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As of 1.61, re-opening a workspace doesn't remember folder collapse states #134665

Closed
mgabeler-lee-6rs opened this issue Oct 8, 2021 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues important Issue identified as high-priority insiders-released Patch has been released in VS Code Insiders regression Something that used to work is now broken verified Verification succeeded
Milestone

Comments

@mgabeler-lee-6rs
Copy link

mgabeler-lee-6rs commented Oct 8, 2021

Issue Type: Bug

  1. Make a multi-folder workspace
  2. Collapse everything (click the [-] button in the explorer view until everything is collapsed)
  3. Quit VSCode
  4. Start VSCode again

Expected results, as observed with 1.60.x and prior versions:

  • VSCode remembers the collapsed/expanded state of each folder and restores that on re-launch

Actual results:

  • VSCode opens every root folder in the workspace

More:

  • If some "inner" folders (sub-directories within one of the workspace root folders) are expanded, vscode does remember that and re-expand them on re-launch
  • But it always expands every root folder on re-launch, even if they were collapsed on quit

VS Code version: Code 1.61.0 (ee8c7de, 2021-10-07T18:11:02.929Z)
OS version: Linux x64 5.10.0-8-amd64
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz (8 x 4499)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 31.20GB (3.89GB free)
Process Argv --unity-launch --crash-reporter-id 9e173b1d-a097-4ad7-aa26-9a9bb4af3128
Screen Reader no
VM 0%
DESKTOP_SESSION gnome-xorg
XDG_CURRENT_DESKTOP GNOME
XDG_SESSION_DESKTOP gnome-xorg
XDG_SESSION_TYPE x11
Extensions (22)
Extension Author (truncated) Version
vscode-openapi 42C 4.6.3
Bookmarks ale 13.2.2
markdown-preview-github-styles bie 0.2.0
vscode-markdownlint Dav 0.44.4
vscode-eslint dba 2.2.1
xml Dot 2.5.1
EditorConfig Edi 0.16.4
prettier-vscode esb 9.0.0
gc-excelviewer Gra 3.0.44
vscode-peacock joh 3.10.1
vscode-styled-components jpo 1.6.6
bash-ide-vscode mad 1.11.0
auto-barrel mik 1.10.0
vscode-json5 mrm 1.0.0
uuid-generator net 0.0.4
vscode-commons red 0.0.6
vscode-yaml red 0.23.0
lit-plugin run 1.2.1
vscode-workspace-switcher sad 1.15.3
vscode-nginx sha 0.6.0
rewrap stk 1.14.0
code-spell-checker str 2.0.9

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vstes627:30244334
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
vsccppwt:30378364
pythonvssor306:30344512
bridge0708:30335490
pygetstartedt2:30371810
dockerwalkthru:30377721
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedt:30364666
pythonvspyt187:30373474
pydsgsc2:30361791
vsqsis300:30374797
vsaa593cf:30376535

@gjsjohnmurray
Copy link
Contributor

Does the problem also happen after you run the command to reload with all extensions disabled?

@mgabeler-lee-6rs
Copy link
Author

Yes it does

@JacksonKearl JacksonKearl added bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues regression Something that used to work is now broken labels Oct 8, 2021
@JacksonKearl JacksonKearl added this to the October 2021 milestone Oct 8, 2021
@Quitch
Copy link

Quitch commented Oct 10, 2021

I am experiencing the same issue as well. Would it be helpful to open a new ticket and cross-reference this one?

@JacksonKearl
Copy link
Contributor

We can track in just this issue. The problem was likely introduced here:

const previousInput = this.tree.getInput();
const promise = this.tree.setInput(input, viewState).then(async () => {
if (Array.isArray(input)) {
if (!viewState || previousInput instanceof ExplorerItem || !previousInput) {
// There is no view state for this workspace, expand all roots. Or we transitioned from a folder/empty workspace.
await Promise.all(input.map(async item => {
try {
await this.tree.expand(item);
} catch (e) { }
}));

where I added support for expanding folders when transitioning from an empty workspace to one with folders. I will look into this during the current iteration.

@akhomyakov
Copy link

seeing same issue

Screen.Recording.2021-10-13.at.7.00.52.AM.mov

@Vallek
Copy link

Vallek commented Oct 16, 2021

Same here

@globules-io
Copy link

Please makes this a priority, very frustrating when working with multiple workspaces

@thedoc31
Copy link

Also seeing this regression. It's definitely annoying. Is there any workaround in the meantime?

@JacksonKearl
Copy link
Contributor

Thanks all for your patience, this should be fixed in the next Insiders, and the Stable coming out in roughly a week.

Now the explorer will only auto-expand a multi-root workspace's folders when the workspace only contains a single root folder, and there is a new setting, explorer.expandSingleFolderWorkspaces that can be set false if you'd prefer single-folder multi-root workspaces to also not auto-expand.

@zeroidentidad
Copy link

same case for me, I face with this issue
VSCode version 1.61.2

@gjsjohnmurray
Copy link
Contributor

1.62 is due to ship later this week, and should resolve this issue.

@LouDou
Copy link

LouDou commented Nov 5, 2021

Just got the 1.62 update, I can confirm seems to be working correctly again now. Thanks!

@zeroidentidad
Copy link

nice, thx for the advice

@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues important Issue identified as high-priority insiders-released Patch has been released in VS Code Insiders regression Something that used to work is now broken verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

12 participants