Preserve clipboard history when disabling activity history (#5035)

* chore(tweaks): clarify Activity History tweak description

* fix(tweaks): preserve clipboard history

---------

Co-authored-by: Chris Titus <contact@christitus.com>
This commit is contained in:
Omar
2026-09-02 16:05:02 -05:00
committed by GitHub
co-authored by Chris Titus
parent 87dd643176
commit d1a61790a1
2 changed files with 21 additions and 2 deletions
+2 -2
View File
@@ -1,14 +1,14 @@
{
"WPFTweaksActivity": {
"Content": "Activity History - Disable",
"Description": "Erases recent docs, clipboard, and run history.",
"Description": "Stops Windows from publishing or uploading user activities while preserving clipboard history.",
"category": "Essential Tweaks",
"panel": "1",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
"Name": "EnableActivityFeed",
"Value": "0",
"Value": "1",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
+19
View File
@@ -0,0 +1,19 @@
Describe "Activity history config" {
It "disables activity publishing while preserving clipboard history" {
$configPath = Join-Path $PSScriptRoot "..\config\tweaks.json"
$tweaks = Get-Content -Path $configPath -Raw | ConvertFrom-Json
$activityRegistry = @($tweaks.WPFTweaksActivity.registry)
$activityFeed = @($activityRegistry | Where-Object Name -eq "EnableActivityFeed")
$activityFeed | Should -HaveCount 1
$activityFeed[0].Value | Should -Be "1"
foreach ($policyName in @("PublishUserActivities", "UploadUserActivities")) {
$policy = @($activityRegistry | Where-Object Name -eq $policyName)
$policy | Should -HaveCount 1
$policy[0].Value | Should -Be "0"
}
$activityRegistry.Name | Should -Not -Contain "AllowClipboardHistory"
}
}