Add top memory processes feature with configurable count#5
Merged
Conversation
- Add TOP MEMORY section to CPU tab showing processes by memory usage - Add memoryProcessCount setting (default 5, configurable 1-10) - Add Stepper in CPU Settings for both CPU and memory process counts - Fix Settings window not opening on subsequent clicks - Update CPUMonitor to use settings for process counts instead of hardcoded 5 - Add ProcessMemoryUsage struct and getTopMemoryProcesses() method - Update tests with proper UserDefaults isolation in setUp() - Update README and CLAUDE.md documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use @Environment(\.openSettings) instead of private selector to properly open the Settings scene while still activating the app. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add detailed documentation in SharedViews.swift explaining why @Environment(\.openSettings) must be used instead of sendAction - Update MenuFooterButtonsTests with comments explaining the requirement - Add Settings Button section to CLAUDE.md to prevent future breakage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Owner
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
- Read process count settings via UserDefaults (thread-safe) instead of accessing @published properties from background thread - Pass process limits as parameters to avoid AppSettings.shared access - Add upper-bound validation for memory values (max 1TB) These changes address potential threading issues identified in code review. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Environment(\.openSettings) requires macOS 14+ SDK which may not be available on all CI environments. Reverting to standard SettingsLink. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
Test plan
xcodebuild test -scheme MacStatusBar -destination 'platform=macOS'🤖 Generated with Claude Code