Skip to content

fix(v2.4.1): recover from cdhash mismatch, menu bar binding label, tap-failure UX#17

Merged
PatelUtkarsh merged 1 commit into
mainfrom
fix/v2.4.1
May 19, 2026
Merged

fix(v2.4.1): recover from cdhash mismatch, menu bar binding label, tap-failure UX#17
PatelUtkarsh merged 1 commit into
mainfrom
fix/v2.4.1

Conversation

@PatelUtkarsh
Copy link
Copy Markdown
Owner

Summary

v2.4.0 had a silent failure mode that hit on the first launch after every release: the ad-hoc-signed binary has a fresh cdhash, so AXIsProcessTrusted returns false even though the TCC entry says "granted". The app showed full onboarding, the hotkey listener never started, and the user had no signal anything was wrong — fn just did nothing.

This patch addresses the root issue plus four related UX gaps in one release.

Changes

  • Menu bar shows the actual binding. Hotkey: Hold fn was hardcoded. Now driven by HotKeyBindingStore and updates live when the user rebinds in Settings.
  • Onboarding polling reduced from 0.5s to 2s and stops when ready. The previous loop hammered TCC with paired TCCAccessRequest() IPCs every 500ms.
  • Onboarding auto-completes the moment all permissions land. Previously the user had to click "Get Started" to actually start the hotkey listener, even after granting AX in System Settings. The auto-complete avoids the trap where AX is granted but fn still doesn't work because they haven't clicked the button.
  • Slim re-approval flow on cdhash mismatch. New onboardingCompleted UserDefaults flag. On launch: if the flag is set and only Accessibility is missing, show a small ReapproveAccessibilityView ("remove + re-add AudioType in Accessibility") that auto-dismisses when access returns. No more forcing the full first-run flow after every release.
  • Surface tap-creation failure. HotKeyManager now posts .hotKeyTapCreationFailed when CGEvent.tapCreate returns nil. MenuBarController catches that, switches to the error-tinted icon, sets the status row to "Accessibility permission required", and turns the hotkey menu item into a clickable "Open Accessibility Settings…" shortcut. Replaces the previous silent failure.
  • Bump to 2.4.1.

Verification

  • swift build clean.
  • Manual checklist:
    • Default fn still records (regression).
    • Settings → Change → Right Cmd; menu bar item updates to "Hotkey: Hold Right Cmd" immediately.
    • Quit + relaunch the new binary on a machine where v2.4.0 was previously authorized: re-approve flow appears, not full onboarding.
    • With AX revoked, launch app: menu bar icon turns red, status row says "Accessibility permission required", clicking the hotkey item opens System Settings.

…p-failure UX

Five fixes bundled into one patch release. Motivated by silent breakage
when v2.4.0 binary's ad-hoc signature doesn't match the Accessibility
TCC entry from a prior install: the hotkey listener never starts and
nothing tells the user why.

- Menu bar 'Hotkey: Hold fn' is now driven by HotKeyBindingStore and
  updates live when the user rebinds in Settings.
- Onboarding polls permission state at 2s instead of 0.5s and stops
  hammering TCC. As soon as every requirement lands it auto-completes
  and starts the hotkey listener, so the user doesn't have to click
  'Get Started' for fn to begin working.
- New 'onboardingCompleted' UserDefaults flag. When set and only AX is
  missing on launch, show a slim ReapproveAccessibilityView (open the
  pane, auto-dismiss when access returns) instead of the full first-run
  flow. Common path on every release because each ad-hoc-signed build
  has a new cdhash.
- HotKeyManager now posts hotKeyTapCreationFailed when CGEvent.tapCreate
  returns nil. MenuBarController catches that, switches to the error
  icon, sets the status item to 'Accessibility permission required',
  and turns the hotkey menu row into a clickable 'Open Accessibility
  Settings\u2026' shortcut.
- Bump version to 2.4.1.
@PatelUtkarsh PatelUtkarsh enabled auto-merge (squash) May 19, 2026 06:05
@PatelUtkarsh PatelUtkarsh merged commit 7fa16ad into main May 19, 2026
3 checks passed
@PatelUtkarsh PatelUtkarsh deleted the fix/v2.4.1 branch May 19, 2026 06:07
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