Skip to content

feat: disable actions when permissions are missing#47

Open
iret77 wants to merge 1 commit into
mainfrom
feat/permission-aware-actions
Open

feat: disable actions when permissions are missing#47
iret77 wants to merge 1 commit into
mainfrom
feat/permission-aware-actions

Conversation

@iret77

@iret77 iret77 commented Mar 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Screenshot button is disabled when Screen Recording permission is not granted, shows localized hint subtitle
  • Camera button is disabled when Camera permission is not granted, shows localized hint subtitle
  • Tapping a disabled action opens the relevant System Settings pane (native macOS UX)
  • Chevron hidden when action is unavailable (clean visual cue)
  • QuickSend and Clipboard unchanged (no TCC permission needed)
  • Localized hints in all 4 languages (en/de/fr/es)

How it works

ActionMenuView now observes PermissionMonitor.shared (already registered by ContentView). Two computed properties (hasScreenRecording, hasCamera) drive both the isEnabled styling and the tap behavior.

Test plan

  • Revoke Screen Recording → Screenshot shows "Grant Screen Recording to use", tapping opens Settings
  • Grant Screen Recording → Screenshot works normally with chevron
  • Revoke Camera → Camera shows "Grant Camera access to use", tapping opens Settings
  • Grant Camera → Camera works normally
  • Disconnected + no permission → both hints visible, tapping still opens Settings
  • CI build passes

🤖 Generated with Claude Code

Screenshot and Camera buttons now check PermissionMonitor status and
show a localized hint when the required permission is not granted.
Tapping a disabled action opens the relevant System Settings pane so
the user can fix it without leaving the menu.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant