Skip to content

Add top memory processes feature with configurable count#5

Merged
ysyyork merged 5 commits into
mainfrom
feature/memory-process-settings
Jan 18, 2026
Merged

Add top memory processes feature with configurable count#5
ysyyork merged 5 commits into
mainfrom
feature/memory-process-settings

Conversation

@ysyyork

@ysyyork ysyyork commented Jan 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add TOP MEMORY section to CPU tab showing processes sorted by memory usage
  • Add configurable process count settings for both CPU and memory process lists
  • Fix Settings window not opening on subsequent clicks in menu bar app

Test plan

  • Verify TOP MEMORY section appears in CPU tab with memory-sorted processes
  • Verify Settings > CPU > Processes shows both CPU and memory steppers
  • Verify changing memory process count (e.g., to 6) updates the displayed list
  • Verify Settings window opens reliably on repeated clicks
  • Run tests: xcodebuild test -scheme MacStatusBar -destination 'platform=macOS'

🤖 Generated with Claude Code

ysyyork and others added 3 commits January 17, 2026 23:41
- 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>
@ysyyork

ysyyork commented Jan 18, 2026

Copy link
Copy Markdown
Owner Author

Code review

No 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 👎.

ysyyork and others added 2 commits January 18, 2026 14:25
- 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>
@ysyyork ysyyork merged commit 1c7ed07 into main Jan 18, 2026
1 check passed
@ysyyork ysyyork deleted the feature/memory-process-settings branch January 18, 2026 23:49
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