Skip to content

fix: replace dead permission-refresh button with real Quit & Reopen - #10

Merged
Alfredoalv13 merged 1 commit into
mainfrom
fix/permission-banner-quit-reopen
Jul 24, 2026
Merged

fix: replace dead permission-refresh button with real Quit & Reopen#10
Alfredoalv13 merged 1 commit into
mainfrom
fix/permission-banner-quit-reopen

Conversation

@Alfredoalv13

Copy link
Copy Markdown
Owner

Summary

  • The permission banner's refresh button called `getScreenRecordingPermissionStatus`/`getAccessibilityPermissionStatus` again, but macOS caches those results for the life of the process - a grant made in System Settings is invisible until the app actually restarts. The button could never work, by construction.
  • Closing the window doesn't quit an Electron app on macOS (`window-all-closed` is a no-op here), so reopening via the Dock just refocuses the same stale process - making this very hard for a tester to self-diagnose, as we found out first-hand this session.
  • Replaced the dead refresh button with a "Quit & Reopen" button that calls a new `relaunch-app` IPC handler (`app.relaunch(); app.exit(0)`), which is the one thing that actually resolves this.

Test plan

  • `tsc --noEmit` clean
  • `npm test` - 94/94 files, 817/817 tests passing
  • Manual: with Screen Recording/Accessibility freshly denied, click "Quit & Reopen" after granting in System Settings, confirm the app restarts and the banner clears without a manual Cmd+Q

…& Reopen

macOS caches getMediaAccessStatus()/isTrustedAccessibilityClient() for the
life of the process, so a permission grant made in System Settings is
invisible to an already-running app no matter how many times its status is
re-checked. The permission banner's "refresh" button called that same
re-check, so it could structurally never work - and closing the window
doesn't quit the app on macOS, so clicking the Dock icon just refocuses the
same stale process, making the loop worse to diagnose.

Replaced it with a button that actually calls app.relaunch() + app.exit()
via a new relaunch-app IPC handler, so a single click does the one thing
that reliably works instead of a button that looks like it should help but
can't.
@Alfredoalv13
Alfredoalv13 merged commit dd37e2f into main Jul 24, 2026
1 check passed
@Alfredoalv13
Alfredoalv13 deleted the fix/permission-banner-quit-reopen branch July 24, 2026 14:44
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