feat: align memory metric naming with implementation semantics (issue #33)#43
Merged
ShadyUnderLight merged 2 commits intomainfrom Apr 21, 2026
Merged
Conversation
added 2 commits
April 21, 2026 18:11
TemperatureParsingTests: 17 tests covering extractTemperature boundaries (valid range 1-120°C), invalid inputs, and multiple-number handling. EnumSavedValueTests: 18 tests for TemperatureMode and MenuBarDisplayMode savedValue initializers — both modern rawValue strings and legacy display-name strings (e.g. 'Hottest CPU'). LocalizationTests: 15 tests for L10n localizationCandidates fallback chain across en-*/zh-*/fr-/ja-JP locales, deduplication, and edge cases. DiagnosticsTests: 17 tests for ProcessSnapshotDiagnostics state machine (markAttempt / markSuccess / markFailure) and full lifecycle transitions. MonitorViewModelTests: 15 tests for ViewModel defaults, legacy settings migration (temperatureMode + menuBarDisplayMode), and fallbacks. TestExpose.swift: test-only L10n wrapper exposing localizationCandidates to the test target. Source changes: - Localization.swift: make localizationCandidates internal (was private) - SystemMetricsProvider.swift: add nonisolated extractTemperatureTest
…33) Rename memory UI copy to 'Memory pressure' to accurately reflect the system-wide active+inactive+wired+compressor metric rather than implying a simple used/total partition. Changes: - Views.swift: memorySummary now shows pressure % instead of used/total bytes; SummaryCardView gains optional subtitle parameter to show bytes detail; RAM card displays 'XX%' with 'X GB / Y GB' as subtitle - MonitorViewModel.swift: menuBarTitle now uses memoryPressurePercent for all three display modes (compact/labeled/temperatureFirst) instead of shortMemoryString(bytes:); aligned with popup semantic model - en.lproj: summary.ram 'RAM (System-wide)' -> 'Memory pressure'; metric.used_percent -> metric.memory_pressure '%.0f%%'; menu_bar_title.labeled 'CPU %@ RAM %@ %@' -> 'CPU %@ Mem %@ %@'; health.line 'RAM' -> 'Mem'; trend.ram -> 'Memory pressure' - zh-Hans.lproj: summary.ram '内存 (系统级)' -> '内存压力'; metric.used_percent -> metric.memory_pressure '%.0f%%'; trend.ram -> '内存压力' - README.md / README.zh-CN.md: 'Memory used / total memory' now reads 'Memory pressure (system-wide active + inactive + wired + compressor)' Consistent memory pressure semantics across all UI surfaces: - Summary card: '72%' primary + '8 GB / 16 GB' subtitle - Menu bar compact: '50% 72% 65°' (CPU · Mem · Temp) - Menu bar labeled: 'CPU 50% Mem 72% 65°' - Menu bar temperature_first: '65° CPU 50% Mem 72%'
2dff129 to
951d702
Compare
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
Renames the memory UI copy from "used / total memory" to "Memory pressure" to accurately reflect the actual metric (system-wide active + inactive + wired + compressor pages), reducing product-semantic ambiguity raised in issue #33.
Changes
Views.swift
MonitorViewModel.swift
en.lproj Localizable.strings
zh-Hans.lproj Localizable.strings
README.md / README.zh-CN.md
Consistent memory pressure semantics across ALL UI surfaces
All 104 tests pass.