feat(cua-driver-rs)(uninstall): opt-in --reset-tcc to revoke TCC grants - #1759
Conversation
Off by default — the bundle id com.trycua.driver is shared with the retired Swift driver, and keeping grants across a reinstall avoids a re-prompt, so wiping TCC state should be a deliberate choice, not a side effect of uninstall (matches how brew et al. leave OS privacy state alone). `uninstall.sh --reset-tcc` revokes Accessibility + ScreenCapture + AppleEvents for com.trycua.driver via tccutil, printing the shared-Swift caveat first. macOS-only; no-op elsewhere. Default run is unchanged and keeps the manual-reset hint (now also pointing at the flag).
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
📝 WalkthroughWalkthroughThe uninstall script adds an opt-in ChangesmacOS TCC Reset Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
libs/cua-driver/scripts/uninstall.sh (1)
511-529:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winManual hint omits the Automation (AppleEvents) grant that
--reset-tccrevokes.
maybe_reset_tccrevokes three services (Accessibility, ScreenCapture, AppleEvents), but this hint — offered as the equivalent alternative ("or re-run with--reset-tcc") — lists only the first two. Following the printed commands leaves the Automation grant in place, so the manual path isn't actually the "clean re-install flow" it claims to be. Add the third command for parity.Separately, the header comment at Line 53 (
Does NOT revoke TCC grants on macOS) is now stale given the new opt-in flag and is worth updating.📝 Align the manual hint with what
--reset-tccdoestccutil reset Accessibility com.trycua.driver tccutil reset ScreenCapture com.trycua.driver + tccutil reset AppleEvents com.trycua.driver🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@libs/cua-driver/scripts/uninstall.sh` around lines 511 - 529, The manual uninstall message in uninstall.sh omits the AppleEvents (Automation) tcc reset that maybe_reset_tcc actually revokes; update the printed hint block (the heredoc under the Darwin uninstall branch) to include the third command "tccutil reset AppleEvents com.trycua.driver" so the manual steps match maybe_reset_tcc, and also update the header comment that currently reads "Does NOT revoke TCC grants on macOS" to reflect the new opt-in --reset-tcc behavior; changes should reference maybe_reset_tcc and the Darwin uninstall heredoc/FINALUNMSG and the stale header comment string so reviewers can find where to edit.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@libs/cua-driver/scripts/uninstall.sh`:
- Around line 511-529: The manual uninstall message in uninstall.sh omits the
AppleEvents (Automation) tcc reset that maybe_reset_tcc actually revokes; update
the printed hint block (the heredoc under the Darwin uninstall branch) to
include the third command "tccutil reset AppleEvents com.trycua.driver" so the
manual steps match maybe_reset_tcc, and also update the header comment that
currently reads "Does NOT revoke TCC grants on macOS" to reflect the new opt-in
--reset-tcc behavior; changes should reference maybe_reset_tcc and the Darwin
uninstall heredoc/FINALUNMSG and the stale header comment string so reviewers
can find where to edit.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9477eb50-13a2-4213-b61e-814aa573aa45
📒 Files selected for processing (1)
libs/cua-driver/scripts/uninstall.sh
Adds an opt-in
--reset-tccflag touninstall.shthat revokes Accessibility + Screen Recording + Automation grants forcom.trycua.driver.Off by default on purpose: the bundle id is shared with the retired Swift driver, and keeping grants across a reinstall avoids a re-prompt — so wiping OS privacy state is a deliberate choice, not a silent side effect of uninstall (consistent with brew/most uninstallers). The default run keeps the manual-reset hint, now also mentioning the flag.
Verified:
bash -nclean; default +--reset-tccpaths covered in both Rust and Swift branches.🤖 Generated with Claude Code
Summary by CodeRabbit
--reset-tccflag to the uninstaller that revokes system permissions granted to the driver during uninstallation on macOS.