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
{{ message }}
Repository navigation
[regression] Recent list on mac doc doesn't includes folders anymore #57272
bugIssue identified by VS Code Team member as probable bugelectronIssues and items related to ElectronmacosIssues with VS Code on MAC/OS XupstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeededworkbench-historyHistory item issues
Since a few days the recent list in the doc context menu shows almost no entries and seems to show files only. It used to show folder (that I have opened in the past) and files
Johannes Rieken (@jrieken) the list is driven by the list of recently opened files/folders/workspaces and this list can get cleared, e.g. if you run File > Recently Opened > Clear Recently Opened. Can you check the menu entries to see if they match?
Then, whats the contents of this for you:
open /Users/<name>/Library/Application Support/Code - Insiders/storage.json
changed the title [-][regression] Recent list on mac doc doesn't includes folders anymore[/-][+]Recent list on mac doc doesn't includes folders anymore[/+]on Aug 28, 2018
Benjamin Pasero (@bpasero) When I first had the issue I had 1.30.1 stable (with its blue icon) working fine, but 1.31 Insider (green) not adding entries. It would cancel out the possibility of it being an OS issue if, at the same time, on version didn't have an issue while the other did. When I upgraded the stable build past 1.31, then both stopped working.
this.labelService.onDidRegisterFormatter(() => this._onRecentlyOpenedChange.fire()); was removed.
But _onRecentlyOpenedChange should still be fired eventually by onWorkspaceSaved.
My stable is actually showing some issues right now and I haven't cleared the Recent list.
There are entries in File=>Open Recent lists 5 workspaces and 7 files, while the Dock only lists 2 folders and no files. The 3 that aren't in listed in the dock are because they no longer exists.
When I opened a new workspace (folder), Recents shows 6, and Dock shows 3. But still, none of the files are being listed in Dock. I haven't cleared anything yet, so we may be able to diagnose something. My guess is Electron/VS thinks the dock is full (reached max entries), but isn't accounting for Mac OS X is filtering out nonexistent folders/files.
Edit: I figured it out. I used to have a nonexistent file at the top of the File => Recents list. When I clicked it, VSCode told me the file doesn't exist and removed it from the Recent list. After that, it seems it was removed from the Recents list. Now the Dock is showing all the files (as in Recents) that were under that nonexistent file.
What's happening is either Electron, or Mac OS X, when it encounters a recent entry for a file/folder that doesn't exist doesn't process anything that happens after. This is on 1.31.1 Stable.
Edit2: Messing around, opening a file in VSCode, closing it, then deleting the folder it was in in Finder, then trying to quit VSCode, I managed to crash it:
Edit3: Okay, I broke my recently cleared Insider build, the topmost workspace doesn't show up in Recents doesn't show up in the Dock, after all the creating and deleting shenanigans. And that folder exists because that's what I had opened when I was creating and deleting files. I'm trying to get a set of reproducible actions, but it's definitely related to nonexistent files.
VSCode thinks it has reached MAX_ENTRIES simply because it assumes calling app.addRecentDocument will guarantee an entry and that's not the case. If you want to add an item that doesn't exist, you have make it a menu item instead, as answered in this Stackoverflow question.
I still found some peculiarities, but I think checking for the file to exist before adding to the Dock would be the first step.
Carlos Lopez (@clshortfuse) good point, yeah this could be an explanation for some of the issues we are seeing, not sure if all. Definitely worth to see if we can check the file for existence before adding it.
That's a long time ago... Not sure anymore, I do remember tho that it once recovered after a restart. Currently I am in a state where it shows something which is a mixture of stale and recent files/folders
bugIssue identified by VS Code Team member as probable bugelectronIssues and items related to ElectronmacosIssues with VS Code on MAC/OS XupstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeededworkbench-historyHistory item issues
Activity
bpasero commentedon Aug 27, 2018
Johannes Rieken (@jrieken) the list is driven by the list of recently opened files/folders/workspaces and this list can get cleared, e.g. if you run
File > Recently Opened > Clear Recently Opened. Can you check the menu entries to see if they match?Then, whats the contents of this for you:
/Users/<name>/Library/Application Support/Code - Insiders/storage.jsonopenedPathsListkeyjrieken commentedon Aug 27, 2018
yep, files, folders and workspaces in there
jrieken commentedon Aug 27, 2018
excerpt from
storage.json(there are a few more but no errors or such)bpasero commentedon Aug 27, 2018
This could be electron/electron#11159 but I will try to reproduce with those data.
bpasero commentedon Aug 28, 2018
I cannot reproduce this when running out of sources with the provided contents, so this seems to be the same as the reported one.
[-][regression] Recent list on mac doc doesn't includes folders anymore[/-][+]Recent list on mac doc doesn't includes folders anymore[/+]jrieken commentedon Aug 28, 2018
Just saying that this used to work just fine for me and has only stopped to work recently
jrieken commentedon Aug 28, 2018
Benjamin Pasero (@bpasero) So what is the recommendation to get out of this and how could the change from working to broken be caused?
17 remaining items
clshortfuse commentedon Mar 7, 2019
Benjamin Pasero (@bpasero) When I first had the issue I had 1.30.1 stable (with its blue icon) working fine, but 1.31 Insider (green) not adding entries. It would cancel out the possibility of it being an OS issue if, at the same time, on version didn't have an issue while the other did. When I upgraded the stable build past 1.31, then both stopped working.
this.labelService.onDidRegisterFormatter(() => this._onRecentlyOpenedChange.fire());was removed.But _onRecentlyOpenedChange should still be fired eventually by
onWorkspaceSaved.My stable is actually showing some issues right now and I haven't cleared the Recent list.
There are entries in File=>Open Recent lists 5 workspaces and 7 files, while the Dock only lists 2 folders and no files. The 3 that aren't in listed in the dock are because they no longer exists.
When I opened a new workspace (folder), Recents shows 6, and Dock shows 3. But still, none of the files are being listed in Dock. I haven't cleared anything yet, so we may be able to diagnose something. My guess is Electron/VS thinks the dock is full (reached max entries), but isn't accounting for Mac OS X is filtering out nonexistent folders/files.
Edit: I figured it out. I used to have a nonexistent file at the top of the File => Recents list. When I clicked it, VSCode told me the file doesn't exist and removed it from the Recent list. After that, it seems it was removed from the Recents list. Now the Dock is showing all the files (as in Recents) that were under that nonexistent file.
What's happening is either Electron, or Mac OS X, when it encounters a recent entry for a file/folder that doesn't exist doesn't process anything that happens after. This is on 1.31.1 Stable.
Edit2: Messing around, opening a file in VSCode, closing it, then deleting the folder it was in in Finder, then trying to quit VSCode, I managed to crash it:
Edit3: Okay, I broke my recently cleared Insider build, the topmost workspace doesn't show up in Recents doesn't show up in the Dock, after all the creating and deleting shenanigans. And that folder exists because that's what I had opened when I was creating and deleting files. I'm trying to get a set of reproducible actions, but it's definitely related to nonexistent files.
clshortfuse commentedon Mar 7, 2019
Mac OS X won't add URLs that don't exist to Dock if using
noteNewRecentDocumentURLwhich I can confirm is what Electron does: https://github.com/electron/electron/blob/6da939629b490e0a76d7a451bb9fb5ab4a0a1729/atom/browser/browser_mac.mm#L49VSCode thinks it has reached MAX_ENTRIES simply because it assumes calling
app.addRecentDocumentwill guarantee an entry and that's not the case. If you want to add an item that doesn't exist, you have make it a menu item instead, as answered in this Stackoverflow question.I still found some peculiarities, but I think checking for the file to exist before adding to the Dock would be the first step.
bpasero commentedon Mar 7, 2019
Carlos Lopez (@clshortfuse) good point, yeah this could be an explanation for some of the issues we are seeing, not sure if all. Definitely worth to see if we can check the file for existence before adding it.
Johannes Rieken (@jrieken) for you, clearing the list of recently opened did not help right?
jrieken commentedon Mar 7, 2019
That's a long time ago... Not sure anymore, I do remember tho that it once recovered after a restart. Currently I am in a state where it shows something which is a mixture of stale and recent files/folders
bpasero commentedon Mar 7, 2019
Johannes Rieken (@jrieken) stale meaning they are not in the list of recently opened (e.g. from the File menu)?
jrieken commentedon Mar 7, 2019
No, file menu is correct but the dock menu is doing something else
bpasero commentedon Mar 8, 2019
Ok I think this is the issue we still have no real understanding about. I can at least look into not adding dock entries that do not exist on disk.
bpasero commentedon Mar 11, 2019
Pushed a fix to not add paths to the dock that do not exist on disk, this seems to work much better.
PeterRock commentedon Apr 19, 2019
It can not work again
#69754