fix(privacy): make privacy shield toggles bidirectional#63
Conversation
Privacy Shield toggles were one-directional — once enabled, protection could never be disabled. This made it impossible for users to revert settings they were only testing. Add revert() to all 57 Windows privacy settings with correct undo logic: - Policy registry keys: delete value (restores Windows default) - HKCU user keys: set back to default enabled value - Scheduled tasks: re-enable via schtasks - Services: set start type to Manual (3) Add PRIVACY_REVERT IPC channel, preload bridge, and update the UI toggle to call apply or revert based on current state. Non-reversible settings (macOS/Linux, where revert is not yet implemented) stay locked when enabled via a new `reversible` flag on PrivacySetting. Fixes #63 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7556e6ea08
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…e missing reg values - disableService now captures the original Start type (e.g. Automatic=2) before overwriting to Disabled=4, stored in an in-memory Map - enableService restores the captured value, falling back to Manual=3 if the app was restarted and the original is unknown - regDeleteValue now silently succeeds if the value was already deleted or never existed, avoiding confusing error toasts on double-revert Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1cff8154f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Settings that report enabled=true because the underlying resource doesn't exist (browser not installed, task missing, service absent) should not offer a revert toggle. Added `applicable` checks for all task, service, and browser settings so the UI correctly disables the toggle when the resource is absent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ypes P1: regDeleteValue now only swallows "unable to find" errors (key/value doesn't exist). Access denied and other failures are re-thrown so revertPrivacySettings reports them accurately instead of silently claiming success. P2: Original service start types are now persisted to a JSON file in userData instead of an in-memory Map. This means an apply → app restart → revert flow correctly restores the original start mode (Automatic, Manual, etc.) instead of always falling back to Manual (3). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35b0bfcab7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…vert Move the cache delete + persist to after the registry write so a failed revert (access denied, timeout, etc.) retains the original value for retry instead of silently falling back to Manual (3). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
revert()methods to all 57 Windows privacy settings with correct undo logic per setting type (registry policy keys are deleted to restore Windows default; HKCU user keys are set back to their default value; scheduled tasks are re-enabled; services are set to Manual start).PRIVACY_REVERTIPC channel end-to-end (channels, main handler, preload bridge, renderer) so the existing toggle UI now callsprivacyApplyorprivacyRevertdepending on current state.reversibleflag onPrivacySetting.Test plan
dependsOn) still show the dependency warning and stay disabled when the parent is offFixes #63
🤖 Generated with Claude Code