Skip to content

fix: consolidate settings side effects into MonitorViewModel didSet, remove redundant onChange handlers (issue #32)#40

Merged
ShadyUnderLight merged 1 commit intomainfrom
fix/issue32-settings-behavior-drift
Apr 21, 2026
Merged

fix: consolidate settings side effects into MonitorViewModel didSet, remove redundant onChange handlers (issue #32)#40
ShadyUnderLight merged 1 commit intomainfrom
fix/issue32-settings-behavior-drift

Conversation

@ShadyUnderLight
Copy link
Copy Markdown
Owner

fix/issue32-settings-behavior-drift

…el didSet only (issue #32)

Behavior was already consistent (all didSets existed in MonitorViewModel)
but Views.swift had redundant onChange handlers that duplicated didSet work.
SettingsView had none for temperatureMode — not a bug since didSet covers it,
but the inconsistency in where side effects lived was the drift risk.

Changes (all behavioral no-ops):
- Views.swift: remove redundant .onChange for temperatureMode and processLimit
- SettingsView.swift: remove redundant .onChange for processLimit

Canonical side effects remain in MonitorViewModel didSet:
- temperatureMode.didSet → refresh(forceProcesses: true)
- processLimit.didSet → recomputeVisibleProcesses()
- menuBarDisplayMode.didSet → refresh(forceProcesses: false)

Result: both views share the same didSet — future settings changes
cannot accidentally diverge without touching MonitorViewModel.
@ShadyUnderLight ShadyUnderLight merged commit c2574af into main Apr 21, 2026
2 checks passed
@ShadyUnderLight ShadyUnderLight deleted the fix/issue32-settings-behavior-drift branch April 21, 2026 09:43
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.

1 participant