microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.61k stars 28.14k forks source link

Remove history entries when removing a folder from workspace #166380

Closed capnajax closed 1 year ago

capnajax commented 1 year ago

Type: Bug

When I use ⌘P to search for a file, many of the files that show are files that are no longer in my workspace and haven't been there for a long time. This frequently causes me to open files in an old project instead of a new one without knowing.

I have removed the project from the workspace, and I also noticed they didn't disappear from the source control (this is another issue) so I removed them there too. But the files still come up in my ⌘P search results.

VS Code version: Code 1.73.1 (Universal) (6261075646f055b99068d3688932416f2346dd3b, 2022-11-09T02:08:38.961Z) OS version: Darwin arm64 22.1.0 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Apple M1 Ultra (20 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|5, 5, 4| |Memory (System)|128.00GB (8.97GB free)| |Process Argv|--crash-reporter-id 04103f14-c8dc-42a8-b7b2-1ffef3657f3f| |Screen Reader|no| |VM|0%|
Extensions (35) Extension|Author (truncated)|Version ---|---|--- vscode-zonefile|Com|0.0.4 systemd-unit-file|coo|1.0.6 doxdocgen|csc|1.4.0 copilot|Git|1.58.7236 vscode-pull-request-github|Git|0.54.0 vscode-graphql|Gra|0.8.3 vscode-graphql-execution|Gra|0.1.6 vscode-graphql-syntax|Gra|1.0.5 better-cpp-syntax|jef|1.16.3 cmake-language-support-vscode|jos|0.0.7 ldif|jta|0.2.0 bash-ide-vscode|mad|1.14.0 vscode-docker|ms-|1.22.2 vscode-dotnet-runtime|ms-|1.6.0 isort|ms-|2022.6.0 python|ms-|2022.18.2 vscode-pylance|ms-|2022.11.20 jupyter|ms-|2022.9.1202862440 vscode-jupyter-cell-tags|ms-|0.1.6 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.262.3 remote-ssh|ms-|0.92.0 remote-ssh-edit|ms-|0.84.0 remote-wsl|ms-|0.72.0 cmake-tools|ms-|1.12.27 cpptools|ms-|1.13.3 cpptools-extension-pack|ms-|1.3.0 remote-explorer|ms-|0.0.2 vsliveshare|ms-|1.0.5762 vsliveshare-audio|ms-|0.1.91 sqltools|mtx|0.26.0 sqltools-driver-pg|mtx|0.4.0 vetur|oct|0.36.1 cmake|twx|0.0.17 vscode-arduino|vsc|0.4.12 (3 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vsdfh931:30280409 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 azure-dev_surveyone:30548225 vscccc:30610679 pyindex848cf:30577861 nodejswelcome1:30587005 fc301958:30595537 282f8724:30602487 gswce2:30605431 iaj6b796:30608729 dbltrim-noruby:30604474 89544117:30607850 ```
TylerLeonhardt commented 1 year ago

Where did these files go? Are they actually deleted on disk or did you have a multi-root workspace and then removed the workpace?

One thing I know we have is File: Clear Recently Opened command which will clear out the cmd+p recently opened list... but it will also clear your recently opened workspaces (@bpasero, why does File: Clear Recently Opened also clear workspace list as well?)

capnajax commented 1 year ago

The latter. I have a workspace with many projects. The files in question are part of a project that was once part of the workspace but later removed but the files have not been deleted from the disk.

bpasero commented 1 year ago

why does File: Clear Recently Opened also clear workspace list as well

No particular reason, but I felt it applies for the picker too. But now that you bring it up, maybe it should not since its an action for the recently opened menu, not the picker. Feel free to tweak as you see fit.

TylerLeonhardt commented 1 year ago

@bpasero so I think this question still goes to you since it is about history: When a project (or I guess "workspace" or "folder" as we call them) is no longer a part of a multi-root workspace, should the recently open still have those files in it?

VSCodeTriageBot commented 1 year ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

VSCodeTriageBot commented 1 year ago

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

VSCodeTriageBot commented 1 year ago

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!