fix(updater): relaunch after TCC reset so System Settings can re-register Thuki#151
Merged
quiet-node merged 1 commit intomainfrom May 7, 2026
Merged
fix(updater): relaunch after TCC reset so System Settings can re-register Thuki#151quiet-node merged 1 commit intomainfrom
quiet-node merged 1 commit intomainfrom
Conversation
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After the TCC reset on app upgrade lands the user in a state where Thuki is gone from System Settings → Privacy & Security → Accessibility but cannot be re-added through the in-app onboarding flow. Clicking "Grant Accessibility" opens System Settings, but Thuki never appears in the list. The user has to manually quit Thuki (Cmd+Q) and reopen for the next AX call to re-register Thuki with macOS's
tccddaemon.Why
The Accessibility grant flow uses
open_accessibility_settings(anopenURL launch) rather thanAXIsProcessTrustedWithOptions(prompt: true). The design assumed Thuki was already in the TCC list. Aftertccutil resetwipes the entry, that assumption breaks — and the running process keeps stale per-PID tracking intccdthat suppresses re-registration on subsequent AX calls.A fresh process sidesteps the issue entirely:
tccdsees a brand-new PID and registers it normally on the first AX query from onboarding's polling. Empirically the user reproduced this exact recovery — manually quitting and reopening the app worked every time.Changes
tccutil_resetruns inlib.rssetup, the newlast_launched_versionis persisted to the sidecar before any restart (so the post-restart launch reads a sidecar that no longer indicates an upgrade — without this, the app would restart-loop).app.restart(), so Tauri finishes wiring up the rest ofsetupbefore tearing down.should_reset_for_upgradeand the sidecar round-trips. The restart hook itself is a thin runtime wrapper (coverage(off)-style behavior) so no new unit test is added; the value is verified end-to-end by upgrading from v0.8.3 to v0.8.4.Test plan
bun run test:all:coverageclean (100% line and function coverage)bun run validate-buildclean