MacDownApp / MacDownApp/macdown

"Open Recent" list is always empty.

Open
#1,356 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Rich Text Format
Stars
9.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Creating a new issue for this because it's an important fundamental feature that is obviously still broken. This was previously reported at https://github.com/MacDownApp/macdown/issues/845#issuecomment-333741653

The "Open Recent" menu is blank, with "clear menu" greyed out. This is not a mac os issue because this feature works in all other relevant apps on this computer.

I have diagnosed the problem, but I have neither the time nor the skillset to fix this.

The problem is that in newer versions of macOS, every app must be granted specific permissions to access protected folders such as the documents folder, desktop, downloads, etc. The first time an app tries to access a file in one of these folders, the OS displays a consent dialogue and requires the user to allow access explicitly. This registers the application to access that folder.

The appropriate usage description keys must be present in the Info.plist file, like NSDocumentsFolderUsageDescription, NSDownloadsFolderUsageDescription, and NSDesktopFolderUsageDescription or the consent dialogue is not displayed and the app never gets registered as being allowed to access the folder.

I note that MacDown does not pop up the consent dialogue on the first access to a folder. It bypasses that and goes directly to the folder. This is probably allowed because it is a direct user action through the file dialogue that accesses that folder, so the OS allows it. Unfortunately, because the app is never registered to access that folder independently, it cannot access the file list and therefore cannot populate the "open recent" menu because it has no access to the files.

This should be a reasonably easy fix for someone familiar with programming Mac apps. It seems to be simply a matter of incorporating the correct info.plist keys so that the proper behaviour is initiated.

Image
Image
Image

Image

Contributor guide

Open the contributing guide

Research direction

Inspect the app's Info.plist and the macOS permission behavior described in the issue. Reproduce the empty "Open Recent" menu on a newer macOS version, then verify that the appropriate folder-usage descriptions trigger access and allow recent files to appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.