Skip to content

fix(permissions): stop repeated accessibility prompts, add grant actions to menu#47

Merged
missuo merged 1 commit into
missuo:mainfrom
erning:fix/accessibility-prompt-spam
Apr 6, 2026
Merged

fix(permissions): stop repeated accessibility prompts, add grant actions to menu#47
missuo merged 1 commit into
missuo:mainfrom
erning:fix/accessibility-prompt-spam

Conversation

@erning

@erning erning commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

isAccessibilityGranted was called with kAXTrustedCheckOptionPrompt: @YES in every passive code path — on each dictation session (paste decision) and every time the status bar menu opened. This caused the macOS accessibility permission dialog to appear repeatedly during normal use, which is inconsistent with the documented "degrade to copy-only when accessibility is not granted" behavior.

Prompt separation:

  • isAccessibilityGranted now uses @NO (quiet check) for all passive callers
  • New requestAccessibilityPermission method uses @YES, called only at app startup (checkAllPermissionsWithCompletion:) and from explicit user actions

Permission menu items:
All four permission items in the status bar menu are now clickable when not granted (with a indicator), giving users a clear path to fix missing permissions:

  • Accessibility — triggers the system permission prompt
  • Microphone — opens System Settings → Privacy → Microphone
  • Input Monitoring — opens System Settings → Privacy → Input Monitoring
  • Notifications — triggers the system notification authorization request

Test plan

  • xcodebuild passes
  • With accessibility not granted: open status bar menu — no system prompt appears, item shows "Not Granted ▸" and is clickable
  • Click the accessibility item — system prompt appears
  • Run a dictation session without accessibility — text copied to clipboard, no prompt
  • Verify Microphone/Input Monitoring items open the correct Settings pane
  • Verify Notification item triggers the authorization dialog

…ons to menu

isAccessibilityGranted was called with kAXTrustedCheckOptionPrompt:YES
in every passive code path (paste decision, menu refresh), causing the
system permission dialog to appear repeatedly during normal use.

Split into a quiet check (@no) used by passive callers and an explicit
requestAccessibilityPermission (@yES) used only at app startup and from
user-initiated actions.

All four permission menu items (Microphone, Accessibility, Input
Monitoring, Notifications) are now clickable when not granted:
Accessibility triggers the system prompt directly; Microphone and Input
Monitoring open the corresponding System Settings pane; Notifications
invokes the system authorization request.

@missuo missuo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good UX improvement.

  • Correctly separates quiet check (@NO) from explicit request (@YES)
  • Permission menu items becoming actionable with indicator is a nice touch
  • System Settings URL schemes for Microphone and Input Monitoring look correct
  • requestAccessibilityPermission in checkAllPermissionsWithCompletion: is the right place for the one-time startup prompt

@missuo missuo merged commit 4436cc8 into missuo:main Apr 6, 2026
@erning erning deleted the fix/accessibility-prompt-spam branch April 7, 2026 02:02
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