Follow-up to refactor/settings-store (which migrated Tier A — the four audit-named drift fields — and Tier B — seven other globals already on SettingsStore). Tracks every remaining direct settings call site and what should happen to it.
Migrate to SettingsStore (next PR — ~25 LOC total)
Move to a different owner (each its own PR, mostly small)
Stays as-is (justified, no action)
dismissedTmuxSessions — runtime state on BoardViewModel+TmuxRecovery, not a preference.
repositories (expanded-repo / expanded-branch keys) — sidebar tree state on WorktreeSidebarViewModel. Could become @SceneStorage, not store-bound.
feature.harnessTab — feature flag. Move to a FeatureFlags type when there's a second flag.
sidebarCollapsed — ephemeral UI state on ContentView. Could become @SceneStorage.
SUAutomaticallyChecksForUpdates, SUIncludeBetaReleases — Sparkle-owned key names; we read but don't take ownership.
AppleLanguages — Cocoa system pref, mirrored from preferredLanguage.
preferredLanguage — paired with AppleLanguages in SupportedLanguage. Migration possible but low value.
BackupManager.Keys.* (backupFrequency, backupRetentionCount, lastBackupDate) — backup-domain, self-contained.
GlobalEnvironmentManager.storageKey — encrypted env-var blob.
YNHDetector.ynhHomeOverrideKey, capabilitiesMinOverrideKey — debug-only overrides.
DataDirectoryManager.userDefaultsKey — install config, runs at startup.
MarketplaceStore.defaultsSeedKey — first-run seed flag.
Pre-existing inconsistency (its own issue/PR, user-visible)
TerminalHostView.allowOscClipboard (Sources/TermQ/Views/TerminalHostView.swift:192) defaults to true when unset, while SettingsStore.Defaults.allowOscClipboard is false (matching SettingsView's pre-PR default). After this PR, SettingsView reads through the store; TerminalHostView still reads UserDefaults directly with a default-true fallback. So a never-touched user sees "Off" in Settings but TerminalHostView's runtime gate returns true until they explicitly toggle.
This is pre-existing — the audit didn't catch it, and it's beyond "drift fix" scope. Recommended fix: migrate TerminalHostView to SettingsStore.shared.allowOscClipboard, decide whether to preserve the default-true behavior for existing users via a one-shot migration, and CHANGELOG it. Worth its own issue.
Follow-up to
refactor/settings-store(which migrated Tier A — the four audit-named drift fields — and Tier B — seven other globals already onSettingsStore). Tracks every remaining direct settings call site and what should happen to it.Migrate to SettingsStore (next PR — ~25 LOC total)
copyOnSelect—SettingsView.swift:39,TerminalHostView.swift:472. Same shape as the four named fields.defaultWorkingDirectory—SettingsView.swift:40,BoardViewModel.swift:697. Same shape, defaultNSHomeDirectory().diagnosticsVerboseMode—TermQLogBuffer.swift:14, 18, 22. Removes the only direct-UserDefaults pair in the diagnostics service.Move to a different owner (each its own PR, mostly small)
marketplaceAutoRefresh→MarketplaceStore(1 site).defaultHarnessAuthorDirectory→HarnessAuthorPreferencesor ontoHarnessAuthor(5 sites:HarnessWizardSheet,ForkHarnessSheet,DuplicateHarnessSheet,SettingsMarketplacesView,HarnessesSidebarTab).sidebar.selectedTab→WorktreeSidebarViewModelor a smallSidebarState(3 sites:SidebarView,HarnessDetailView,HarnessWizardSheet— three Views coordinating via@AppStorageis fragile).protectedBranches→ dedicatedGitConfigStoreor stays onWorktreeSidebarViewModel. Not user-pref-shaped; don't fold intoSettingsStore.Stays as-is (justified, no action)
dismissedTmuxSessions— runtime state onBoardViewModel+TmuxRecovery, not a preference.repositories(expanded-repo / expanded-branch keys) — sidebar tree state onWorktreeSidebarViewModel. Could become@SceneStorage, not store-bound.feature.harnessTab— feature flag. Move to aFeatureFlagstype when there's a second flag.sidebarCollapsed— ephemeral UI state onContentView. Could become@SceneStorage.SUAutomaticallyChecksForUpdates,SUIncludeBetaReleases— Sparkle-owned key names; we read but don't take ownership.AppleLanguages— Cocoa system pref, mirrored frompreferredLanguage.preferredLanguage— paired withAppleLanguagesinSupportedLanguage. Migration possible but low value.BackupManager.Keys.*(backupFrequency, backupRetentionCount, lastBackupDate) — backup-domain, self-contained.GlobalEnvironmentManager.storageKey— encrypted env-var blob.YNHDetector.ynhHomeOverrideKey,capabilitiesMinOverrideKey— debug-only overrides.DataDirectoryManager.userDefaultsKey— install config, runs at startup.MarketplaceStore.defaultsSeedKey— first-run seed flag.Pre-existing inconsistency (its own issue/PR, user-visible)
TerminalHostView.allowOscClipboard(Sources/TermQ/Views/TerminalHostView.swift:192) defaults totruewhen unset, whileSettingsStore.Defaults.allowOscClipboardisfalse(matching SettingsView's pre-PR default). After this PR, SettingsView reads through the store; TerminalHostView still readsUserDefaultsdirectly with a default-truefallback. So a never-touched user sees "Off" in Settings but TerminalHostView's runtime gate returnstrueuntil they explicitly toggle.This is pre-existing — the audit didn't catch it, and it's beyond "drift fix" scope. Recommended fix: migrate TerminalHostView to
SettingsStore.shared.allowOscClipboard, decide whether to preserve the default-true behavior for existing users via a one-shot migration, and CHANGELOG it. Worth its own issue.