Skip to content

feat: prompt for Full Disk Access on the welcome screen - #5

Merged
phalladar merged 1 commit into
phalladar:mainfrom
petercrocker:feat/full-disk-access-prompt
Oct 3, 2026
Merged

phalladar merged 1 commit into
phalladar:mainfrom
petercrocker:feat/full-disk-access-prompt

Conversation

@petercrocker

@petercrocker petercrocker commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Without Full Disk Access, macOS silently hides folders such as Mail, Messages and other apps' data, so scans under-report sizes with no explanation. The welcome screen now detects this and walks the user to the right setting.

Depends on #4. Review only the last commit until that merges.

Key Changes

  • Detects missing Full Disk Access by probing a TCC-protected file (no prompt or side effects)
  • Dismissible banner on the welcome screen with Open System Settings (deep-links to the Full Disk Access pane), Relaunch (only when running as an app bundle) and Not Now
  • Re-checks when the app becomes active, so the banner clears once access is granted

Documentation Updates

  • README: new Full Disk Access section covering what it unlocks, how to grant it, and that ad-hoc signed rebuilds reset the permission

Test Plan

  • Install via scripts/bundle-app.sh --install with Full Disk Access off: banner appears
  • Open System Settings → enable MacDirStat → switch back / Relaunch: banner disappears
  • swift run from a terminal that has Full Disk Access: no banner (the process inherits the terminal's access)
  • Tested on the macOS 27 beta only

🤖 Generated with Claude Code

@petercrocker
petercrocker marked this pull request as ready for review October 3, 2026 10:10
Without Full Disk Access, protected folders are skipped and sizes are
under-reported with no indication why. macOS has no API to request the
permission, so probe a TCC-protected file and, when it cannot be read,
show a dismissible banner that opens the Full Disk Access pane in System
Settings and offers to relaunch the app. The check re-runs when the app
becomes active, so the banner clears once access is granted.
@phalladar
phalladar force-pushed the feat/full-disk-access-prompt branch from 3f4b0af to 8f7cb12 Compare October 3, 2026 14:57
@phalladar

Copy link
Copy Markdown
Owner

@petercrocker Thanks for this! Without Full Disk Access, macOS hides folders and scans come up short with no explanation, which users can't figure out on their own. This banner fixes that.

You'd allowed maintainer edits, so I rebased this onto main myself to get it ready to merge. What changed:

Before pushing, I checked that it builds under Swift 6 strict concurrency. I also confirmed the probe behaves as intended without Full Disk Access: the protected files are visible to stat, but open fails with "Operation not permitted", so the banner shows.

@phalladar
phalladar merged commit e832170 into phalladar:main Oct 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants