Repository navigation
Settings toggle to allow screen capture of the main window - #147
Merged
Merged
Conversation
Content protection stays the default; capture is an opt-out the user has to choose. Backfilled on upgrade like hideTaskbarWhileRunning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Protection is now owned by applySurfaceVisibility instead of being set once at window creation, so the setting applies without a restart and stealth always protects, whatever the setting says. Only real changes reach setContentProtection. --disable-content-protection still forces capture outside stealth. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With screen capture allowed, the action-suggestion screenshot included the app window, which can cover the question and feeds the model its own earlier answers. The capture now runs with the window protected, waiting one composition when protection had to be switched on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pt-out Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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
allowScreenCapturesetting, off by default, with a checkbox on the configuration page (EN/RU).applySurfaceVisibility()instead of once at window creation, so the toggle takes effect immediately with no restart.stealth || own capture in progress || !(allowScreenCapture || --disable-content-protection). Stealth always hides the window, whatever the setting says.setContentProtectionis only called when the value changes, so windowshow/restoreevents don't make extra shell calls.withContentProtection(). With capture allowed, the window would otherwise appear in that image, where it can cover the question and show the model its own earlier answers. Protection is switched on for the capture, with a 100ms wait (CAPTURE_PROTECTION_SETTLE_MS) only when it actually had to switch, and the setting is restored afterwards.Test plan
pnpm lint, bothtscconfigs,vite build,pnpm test:maintest/content-protection.test.mjs: protected by default, toggle lifts it, no-op skipped, stealth re-protects, leaving stealth returns to the setting, own capture protects and restores (including on failure), no-op on an already protected windowtest/config-store.test.mjs:allowScreenCapturedefaults to off🤖 Generated with Claude Code