Skip to content

fix(ai): stop recurring Search-box-AI drift popup with reliable Win11 keys#35

Merged
carterscode merged 1 commit into
mainfrom
fix/search-ai-suggestions-popup
Jun 5, 2026
Merged

fix(ai): stop recurring Search-box-AI drift popup with reliable Win11 keys#35
carterscode merged 1 commit into
mainfrom
fix/search-ai-suggestions-popup

Conversation

@carterscode

Copy link
Copy Markdown
Owner

Problem

On a fresh Win11 PC, "Search box AI suggestions + taskbar companion" keeps firing the drift popup every cycle even with the toggle set to Off + Auto-apply silently.

Root cause

Both the drift signal and the write keyed on HKCU\...\Policies\Microsoft\Windows\Explorer\DisableSearchBoxSuggestions plus a non-existent TaskbarCompanion Advanced value. On most Win11 builds neither is reliable: the Explorer policy often doesn't persist/take effect (and on managed/MDM machines the Policies hive can be locked, so the write throws and is swallowed), and TaskbarCompanion is not a real value name. When the written value doesn't read back, ChangeApplier's verify pass keeps reporting drift → MonitorService applies the 15-min auto-apply backoff → the drift item is promoted to the notification queue → popup recurs every cycle.

Commit 3202e9c only loosened the read heuristic, so it never changed the unreliable mechanism and the loop survived on other PCs.

The real fix

Switch the authoritative mechanism to the values Windows 11 actually honors and that reliably read back:

  • HKCU\...\CurrentVersion\Search\BingSearchEnabled = 0authoritative drift signal (ordinary user setting, always user-writable, persists)
  • HKCU\...\CurrentVersion\SearchSettings\IsDynamicSearchBoxEnabled = 0 — search highlights / companion content
  • DisableSearchBoxSuggestions = 1 kept best-effort only, not read

ReadCurrent is keyed solely on BingSearchEnabled so a Windows-ignored value can never re-trigger the verify-fail/backoff/popup loop again. Per-value best-effort writes mean a locked Policies hive no longer aborts the authoritative write.

Docs (SettingDocs mechanism/apply/verify, SettingDocsCatalog, SETTINGS-REFERENCE.md) updated. Tests: regression guard + live-read no-drift invariant.

Verification

  • dotnet build clean (warnings = errors)
  • dotnet test — all green

🤖 Generated with Claude Code

… keys

User report: on a fresh Win11 PC, "Search box AI suggestions + taskbar
companion" keeps firing the drift popup every cycle even with the toggle
set to Off + Auto-apply silently.

Root cause (the real one this time). Both the drift signal and the write
keyed on HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer\
DisableSearchBoxSuggestions plus a non-existent TaskbarCompanion Advanced
value. On most Win11 builds neither is reliable: the Explorer policy often
doesn't take effect (and on managed/MDM machines the Policies hive can be
locked, so the write throws and is swallowed), and TaskbarCompanion is not
a real value name so it never persists. When the written value doesn't
read back, ChangeApplier's verify pass keeps reporting drift ->
MonitorService applies the 15-min auto-apply backoff -> the drift item is
promoted to the notification queue -> the popup recurs every cycle.

Commit 3202e9c only loosened the *read* heuristic (companion != 1), so it
never changed the unreliable mechanism and the loop survived on other PCs.

The real fix. Switch the authoritative mechanism to the values Windows 11
actually honors and that reliably read back:
  - HKCU\...\CurrentVersion\Search\BingSearchEnabled = 0  (authoritative
    drift signal; ordinary user setting, always user-writable, persists)
  - HKCU\...\CurrentVersion\SearchSettings\IsDynamicSearchBoxEnabled = 0
    (search highlights / the companion content)
  - DisableSearchBoxSuggestions = 1 kept as best-effort only, NOT read.
ReadCurrent is keyed solely on BingSearchEnabled so a Windows-ignored
value can never re-trigger the verify-fail/backoff/popup loop again. Per-
value best-effort writes mean a locked Policies hive no longer aborts the
authoritative write.

Docs (SettingDocs mechanism/apply/verify, SettingDocsCatalog, SETTINGS-
REFERENCE.md) updated to the new keys. Tests: regression guard asserting
the surfaces use BingSearchEnabled and no longer reference the bogus
TaskbarCompanion, plus a live-read no-drift invariant test. 162/162 pass;
build clean (warnings = errors).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
using var key = Registry.CurrentUser.CreateSubKey(subKey, writable: true);
key?.SetValue(name, value, RegistryValueKind.DWord);
}
catch { }
using var key = Registry.CurrentUser.CreateSubKey(subKey, writable: true);
key?.SetValue(name, value, RegistryValueKind.DWord);
}
catch { }
@carterscode carterscode merged commit 9e89959 into main Jun 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants