fix: consolidate settings side effects into MonitorViewModel didSet, remove redundant onChange handlers (issue #32)#40
Merged
ShadyUnderLight merged 1 commit intomainfrom Apr 21, 2026
Conversation
…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.
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.
fix/issue32-settings-behavior-drift