Skip to content

fix(macos): recover from stale Accessibility grants - #32

Open
0xNyk wants to merge 1 commit into
mainfrom
fix/accessibility-permission-detection
Open

0xNyk wants to merge 1 commit into
mainfrom
fix/accessibility-permission-detection

Conversation

@0xNyk

@0xNyk 0xNyk commented Sep 17, 2026

Copy link
Copy Markdown
Member

Problem

  • Builds without a stable signing identity get a designated requirement tied to the binary hash (codesign -d -r- shows designated => cdhash H"..."). After a rebuild or update, System Settings still shows Dictx enabled, but AXIsProcessTrusted returns false. Toggling the switch does not fix it; removing the entry and granting again does.
  • The Accessibility trust prompt appears only once per app, so repeat clicks on "Grant Permission" or "Open System Settings" did nothing visible.

Fix

  • Grant buttons always open the Accessibility pane of System Settings (new open_accessibility_settings command).
  • If a grant has not registered 8 seconds after the user starts it, onboarding and the settings card offer "Reset and grant again", which runs tccutil reset Accessibility <bundle id> for Dictx only (new reset_accessibility_permission command) and reopens the pane. If the reset fails, the pane still opens and a toast explains the manual remove-and-add step.
  • New English strings only; other locales fall back to English.

Verification

  • bun run lint, bun run build, Prettier on changed files: pass
  • cargo fmt -- --check, cargo clippy -- -D warnings: pass
  • Reviewed independently; the review's finding (settings card showed the reset hint immediately) is fixed.

Not yet verified on a real Mac: that tccutil reset succeeds when run by the app, and that the trust prompt reappears right after a reset.

The root cause remains ad-hoc signing; only a stable Developer ID signature stops grants going stale.

Ad-hoc signed builds tie the Accessibility grant to the binary hash, so
after a rebuild or update System Settings shows Dictx enabled while
AXIsProcessTrusted reports false. Toggling the switch does not fix it.
The trust prompt also appears only once, so repeat Grant clicks did
nothing visible.

- Grant buttons always open the Accessibility pane of System Settings.
- If a grant has not registered after 8 seconds, onboarding and the
  settings card offer to reset the stale entry (tccutil reset for the
  app's own bundle id) and grant again.
- New commands: open_accessibility_settings,
  reset_accessibility_permission.
@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dictx Ready Ready Preview Sep 17, 2026 10:21am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 08c8407b Deployed Sep 17, 2026 by vercel[bot]
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