fix(permissions): clear stale TCC entries on upgrade and grant click#153
Merged
quiet-node merged 1 commit intomainfrom May 8, 2026
Merged
fix(permissions): clear stale TCC entries on upgrade and grant click#153quiet-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
last_launched_version, so the existingtccutil resetpath skipped them. Stale Accessibility/ScreenCapture entries (with the previous binary's csreq) lingered in System Settings, leaving users with a "granted" toggle that didn't actually work for the new build.should_reset_for_upgrade(None, _)now returnstrueso the cleanup also covers migrations from sidecar-less builds.Grant Accessibility/Open Screen Recording Settingsnow invokereset_and_relaunch_for_grant, which clears the requested service's TCC entry and relaunches sotccdre-registers the new csreq cleanly. A persistedlast_reset_for_versionmarker lets the click-time flow skip when the startup-time reset already cleaned for this version, keeping the typical upgrade UX at one auto-restart.PermissionsStepmounts callconsume_pending_grant_resumeand auto-resume the right step on the post-restart launch, so the user does not have to clickGrantagain.Test plan
bun run test:all:coverage— full vitest + cargo--fail-under-lines 100gate green.bun run validate-build— lint, format, typecheck, release bundle all clean.~/Library/Application Support/com.quietnode.thuki/updater_state.jsonwithlast_launched_version: "0.0.0", install worktree build over current/Applications/Thuki.app, launch. Observed: brief auto-relaunch (A's reset+restart), onboarding shows, clickGrant Accessibilityopens System Settings with no stale Thuki entry, polling registers the new csreq, toggle appears waiting.