feat: support refresh rate presets (power saving / balanced / real-time) for issue #47#53
Merged
ShadyUnderLight merged 3 commits intomainfrom Apr 29, 2026
Merged
Conversation
added 3 commits
April 21, 2026 19:15
Fixes documentation drift from current implementation: EN README.md: - Notes on CPU temperature: replaces 'falls back to `--`' with Apple Silicon HID priority + actionable hint behavior (no silent `--`) - Roadmap: removes 'Sparklines / history' (already implemented) and plain 'Per-process actions'; keeps only 'Per-process actions (e.g. kill, priority adjustment)' ZH README.zh-CN.md: - 关于 CPU 温度: replaces '回退显示为 `--`' with Apple Silicon HID priority + actionable hint behavior - Roadmap 想法: removes '趋势图 / 历史曲线' and plain '针对进程的操作按钮'; keeps only the clarified wording with examples All outdated lines removed; all new lines added. No code changes.
…for issue #47 - Add RefreshRatePreset enum with powerSaving, balanced, realTime cases - Add refreshRatePreset published property to MonitorViewModel with didSet - Replace hardcoded summaryRefreshInterval and processRefreshInterval with configurable ones - Add refresh rate picker to SettingsView - Add localization strings for all three presets (en/zh-Hans) - Add unit tests for default value and migration scenarios
…val takes effect immediately Before: changing preset while sleeping would only take effect on next sleep cycle. After: cancel existing refresh task and create a new one with the updated interval. Also extracted createRefreshTask() helper to avoid duplication.
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.
Summary
RefreshRatePresetenum with three cases:powerSaving(10s),balanced(2s),realTime(0.5s)SettingsViewadds a refresh rate picker;MonitorViewModelpersists selection to UserDefaultsFiles changed
SystemModels.swift: AddedRefreshRatePresetenumMonitorViewModel.swift: AddedrefreshRatePresetproperty, replaced hardcoded intervalsSettingsView.swift: Added refresh rate pickerLocalizable.strings(en/zh-Hans): Added localization for presetsMonitorViewModelTests.swift: Added tests for default value, modern and legacy string migrationTesting